00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_OP_BUFFER_OFFSETCURVESETBUILDER_H
00022 #define GEOS_OP_BUFFER_OFFSETCURVESETBUILDER_H
00023
00024 #include <geos/export.h>
00025
00026 #include <vector>
00027
00028 #ifdef _MSC_VER
00029 #pragma warning(push)
00030 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00031 #endif
00032
00033
00034 namespace geos {
00035 namespace geom {
00036 class Geometry;
00037 class CoordinateSequence;
00038 class GeometryCollection;
00039 class Point;
00040 class LineString;
00041 class LinearRing;
00042 class Polygon;
00043 }
00044 namespace geomgraph {
00045 class Label;
00046 }
00047 namespace noding {
00048 class SegmentString;
00049 }
00050 namespace operation {
00051 namespace buffer {
00052 class OffsetCurveBuilder;
00053 }
00054 }
00055 }
00056
00057 namespace geos {
00058 namespace operation {
00059 namespace buffer {
00060
00071 class GEOS_DLL OffsetCurveSetBuilder {
00072
00073 private:
00074
00075
00076
00077 std::vector<geomgraph::Label*> newLabels;
00078
00079 const geom::Geometry& inputGeom;
00080
00081 double distance;
00082
00083 OffsetCurveBuilder& curveBuilder;
00084
00088 std::vector<noding::SegmentString*> curveList;
00089
00102 void addCurve(geom::CoordinateSequence *coord, int leftLoc,
00103 int rightLoc);
00104
00105 void add(const geom::Geometry& g);
00106
00107 void addCollection(const geom::GeometryCollection *gc);
00108
00112 void addPoint(const geom::Point *p);
00113
00114 void addLineString(const geom::LineString *line);
00115
00116 void addPolygon(const geom::Polygon *p);
00117
00136 void addPolygonRing(const geom::CoordinateSequence *coord,
00137 double offsetDistance, int side, int cwLeftLoc,
00138 int cwRightLoc);
00139
00149 bool isErodedCompletely(const geom::LinearRing* ringCoord,
00150 double bufferDistance);
00151
00170 bool isTriangleErodedCompletely(const geom::CoordinateSequence *triCoords,
00171 double bufferDistance);
00172
00173
00174 OffsetCurveSetBuilder(const OffsetCurveSetBuilder& other);
00175 OffsetCurveSetBuilder& operator=(const OffsetCurveSetBuilder& rhs);
00176
00177 public:
00178
00180 OffsetCurveSetBuilder(const geom::Geometry& newInputGeom,
00181 double newDistance, OffsetCurveBuilder& newCurveBuilder);
00182
00184 ~OffsetCurveSetBuilder();
00185
00195 std::vector<noding::SegmentString*>& getCurves();
00196
00198
00202 void addCurves(const std::vector<geom::CoordinateSequence*>& lineList,
00203 int leftLoc, int rightLoc);
00204
00205 };
00206
00207 }
00208 }
00209 }
00210
00211 #ifdef _MSC_VER
00212 #pragma warning(pop)
00213 #endif
00214
00215 #endif // ndef GEOS_OP_BUFFER_OFFSETCURVESETBUILDER_H
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226