#include <geos.h>
Public Member Functions | |
GeometricShapeFactory (const GeometryFactory *factory) | |
Create a shape factory which will create shapes using the given GeometryFactory. | |
LineString * | createArc (double startAng, double endAng) |
Creates a elliptical arc, as a LineString. | |
Polygon * | createCircle () |
Creates a circular Polygon. | |
Polygon * | createRectangle () |
Creates a rectangular Polygon. | |
void | setBase (const Coordinate &base) |
Sets the location of the shape by specifying the base coordinate (which in most cases is the * lower left point of the envelope containing the shape). | |
void | setCentre (const Coordinate ¢re) |
Sets the location of the shape by specifying the centre of the shape's bounding box. | |
void | setHeight (double height) |
Sets the height of the shape. | |
void | setNumPoints (int nNPts) |
Sets the total number of points in the created Geometry. | |
void | setSize (double size) |
Sets the size of the extent of the shape in both x and y directions. | |
void | setWidth (double width) |
Sets the width of the shape. |
geos::GeometricShapeFactory::GeometricShapeFactory | ( | const GeometryFactory * | factory | ) |
Create a shape factory which will create shapes using the given GeometryFactory.
factory | the factory to use. You need to keep the factory alive for the whole GeometricShapeFactory life time. |
LineString * geos::GeometricShapeFactory::createArc | ( | double | startAng, | |
double | endAng | |||
) |
Creates a elliptical arc, as a LineString.
References geos::CoordinateSequenceFactory::create(), geos::GeometryFactory::createLineString(), geos::GeometryFactory::getCoordinateSequenceFactory(), geos::Envelope::getHeight(), geos::Envelope::getMinX(), geos::Envelope::getMinY(), geos::GeometryFactory::getPrecisionModel(), geos::Envelope::getWidth(), geos::PrecisionModel::makePrecise(), geos::Coordinate::x, and geos::Coordinate::y.
Polygon * geos::GeometricShapeFactory::createCircle | ( | ) |
Creates a circular Polygon.
References geos::CoordinateSequenceFactory::create(), geos::GeometryFactory::createLinearRing(), geos::GeometryFactory::createPolygon(), geos::GeometryFactory::getCoordinateSequenceFactory(), geos::Envelope::getHeight(), geos::Envelope::getMinX(), geos::Envelope::getMinY(), geos::Envelope::getWidth(), geos::Coordinate::x, and geos::Coordinate::y.
Polygon * geos::GeometricShapeFactory::createRectangle | ( | ) |
Creates a rectangular Polygon.
References geos::CoordinateSequenceFactory::create(), geos::GeometryFactory::createLinearRing(), geos::GeometryFactory::createPolygon(), geos::GeometryFactory::getCoordinateSequenceFactory(), geos::Envelope::getHeight(), geos::Envelope::getMaxX(), geos::Envelope::getMaxY(), geos::Envelope::getMinX(), geos::Envelope::getMinY(), and geos::Envelope::getWidth().
void geos::GeometricShapeFactory::setBase | ( | const Coordinate & | base | ) |
Sets the location of the shape by specifying the base coordinate (which in most cases is the * lower left point of the envelope containing the shape).
base | the base coordinate of the shape |
base | the base coordinate of the shape |
void geos::GeometricShapeFactory::setCentre | ( | const Coordinate & | centre | ) |
Sets the location of the shape by specifying the centre of the shape's bounding box.
centre | the centre coordinate of the shape |
centre | the centre coordinate of the shape |
void geos::GeometricShapeFactory::setHeight | ( | double | height | ) |
Sets the height of the shape.
height | the height of the shape |
height | the height of the shape |
void geos::GeometricShapeFactory::setNumPoints | ( | int | nNPts | ) |
void geos::GeometricShapeFactory::setSize | ( | double | size | ) |
Sets the size of the extent of the shape in both x and y directions.
size | the size of the shape's extent |
size | the size of the shape's extent |
void geos::GeometricShapeFactory::setWidth | ( | double | width | ) |
Sets the width of the shape.
width | the width of the shape |
width | the width of the shape |