00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
00022 #define GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
00023
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
00033 namespace geos {
00034 namespace geom {
00035
00036
00037 class LineString;
00038
00039 }
00040 }
00041
00042 namespace geos {
00043 namespace operation {
00044 namespace overlay {
00045
00047
00048 class OffsetPointGenerator {
00049
00050 public:
00051
00052 OffsetPointGenerator(const geom::Geometry& geom, double offset);
00053
00055 std::auto_ptr< std::vector<geom::Coordinate> > getPoints();
00056
00057 private:
00058
00059 const geom::Geometry& g;
00060
00061 double offsetDistance;
00062
00063 std::auto_ptr< std::vector<geom::Coordinate> > offsetPts;
00064
00065 void extractPoints(const geom::LineString* line);
00066
00067 void computeOffsets(const geom::Coordinate& p0,
00068 const geom::Coordinate& p1);
00069 };
00070
00071 }
00072 }
00073 }
00074
00075 #endif // ndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
00076
00077
00078
00079
00080