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