GEOS: geos::GeometricShapeFactory Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# geos::GeometricShapeFactory Class Reference

Computes various kinds of common geometric shapes. Allows various ways of specifying the location and extent of the shapes, as well as number of line segments used to form them. More...

`#include <geos.h>`

List of all members.

## 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 &centre)
| 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.

## Detailed Description

Computes various kinds of common geometric shapes. Allows various ways of specifying the location and extent of the shapes, as well as number of line segments used to form them.

## Constructor & Destructor Documentation

geos::GeometricShapeFactory::GeometricShapeFactory | ( | const GeometryFactory * | factory | ) |

Create a shape factory which will create shapes using the given GeometryFactory.

Parameters:

  | factory | the factory to use. You need to keep the factory alive for the whole GeometricShapeFactory life time.

## Member Function Documentation

LineString * geos::GeometricShapeFactory::createArc | ( | double | startAng,
|  | double | endAng |
| ) |  |  |

Creates a elliptical arc, as a LineString.

Returns:
  an elliptical arc

Creates a elliptical arc, as a LineString.

Returns:
  an elliptical arc

Polygon * geos::GeometricShapeFactory::createCircle | ( |  | ) |

Creates a circular Polygon.

Returns:
  a circle

Polygon * geos::GeometricShapeFactory::createRectangle | ( |  | ) |

Creates a rectangular Polygon.

Returns:
  a rectangular Polygon

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).

Parameters:

  | base | the base coordinate of the shape

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).

Parameters:

  | 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.

Parameters:

  | centre | the centre coordinate of the shape

Sets the location of the shape by specifying the centre of the shape's bounding box

Parameters:

  | centre | the centre coordinate of the shape

void geos::GeometricShapeFactory::setHeight | ( | double | height | ) |

Sets the height of the shape.

Parameters:

  | height | the height of the shape

Sets the height of the shape.

Parameters:

  | height | the height of the shape

void geos::GeometricShapeFactory::setNumPoints | ( | int | nNPts | ) |

Sets the total number of points in the created Geometry.

Sets the total number of points in the created Geometry

void geos::GeometricShapeFactory::setSize | ( | double | size | ) |

Sets the size of the extent of the shape in both x and y directions.

Parameters:

  | size | the size of the shape's extent

Sets the size of the extent of the shape in both x and y directions.

Parameters:

  | size | the size of the shape's extent

void geos::GeometricShapeFactory::setWidth | ( | double | width | ) |

Sets the width of the shape.

Parameters:

  | width | the width of the shape

Sets the width of the shape.

Parameters:

  | width | the width of the shape

The documentation for this class was generated from the following files:

- util.h
- GeometricShapeFactory.cpp