00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
00021 #define GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
00022
00023 #include <geos/export.h>
00024 #include <geos/algorithm/PointLocator.h>
00025 #include <geos/geom/Geometry.h>
00026 #include <geos/geom/MultiPoint.h>
00027 #include <geos/geom/Coordinate.h>
00028
00029 #include <vector>
00030 #include <memory>
00031
00032 #ifdef _MSC_VER
00033 #pragma warning(push)
00034 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00035 #endif
00036
00037
00038 namespace geos {
00039 namespace geom {
00040
00041
00042 class LineString;
00043
00044 }
00045 }
00046
00047 namespace geos {
00048 namespace operation {
00049 namespace overlay {
00050 namespace validate {
00051
00053
00054 class GEOS_DLL OffsetPointGenerator {
00055
00056 public:
00057
00058 OffsetPointGenerator(const geom::Geometry& geom, double offset);
00059
00061 std::auto_ptr< std::vector<geom::Coordinate> > getPoints();
00062
00063 private:
00064
00065 const geom::Geometry& g;
00066
00067 double offsetDistance;
00068
00069 std::auto_ptr< std::vector<geom::Coordinate> > offsetPts;
00070
00071 void extractPoints(const geom::LineString* line);
00072
00073 void computeOffsets(const geom::Coordinate& p0,
00074 const geom::Coordinate& p1);
00075
00076
00077 OffsetPointGenerator(const OffsetPointGenerator& other);
00078 OffsetPointGenerator& operator=(const OffsetPointGenerator& rhs);
00079 };
00080
00081 }
00082 }
00083 }
00084 }
00085
00086 #ifdef _MSC_VER
00087 #pragma warning(pop)
00088 #endif
00089
00090 #endif // ndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
00091
00092
00093
00094
00095