21 #ifndef GEOS_UTIL_GEOMETRICSHAPEFACTORY_H
22 #define GEOS_UTIL_GEOMETRICSHAPEFACTORY_H
24 #include <geos/export.h>
28 #include <geos/geom/Coordinate.h>
32 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
41 class GeometryFactory;
67 class GEOS_DLL GeometricShapeFactory {
72 geom::Coordinate base;
73 geom::Coordinate centre;
76 void setBase(
const geom::Coordinate& newBase);
77 void setCentre(
const geom::Coordinate& newCentre);
78 void setSize(
double size);
79 void setWidth(
double nWidth);
80 void setHeight(
double nHeight);
83 std::unique_ptr<geom::Envelope> getEnvelope()
const;
85 const geom::GeometryFactory* geomFact;
86 const geom::PrecisionModel* precModel;
90 geom::Coordinate coord(
double x,
double y)
const;
102 GeometricShapeFactory(
const geom::GeometryFactory* factory);
105 ~GeometricShapeFactory() {}
116 std::unique_ptr<geom::LineString> createArc(
double startAng,
double angExtent);
129 std::unique_ptr<geom::Polygon> createArcPolygon(
double startAng,
double angExt);
136 std::unique_ptr<geom::Polygon> createCircle();
143 std::unique_ptr<geom::Polygon> createRectangle();
153 void setBase(
const geom::Coordinate& base);
162 void setCentre(
const geom::Coordinate& centre);
169 void setHeight(
double height);
174 void setNumPoints(
int nNPts);
182 void setSize(
double size);
189 void setWidth(
double width);
200 #endif // GEOS_UTIL_GEOMETRICSHAPEFACTORY_H