#include <geos.h>
Public Member Functions | |
LineString (CoordinateSequence *pts, const GeometryFactory *newFactory) | |
Constructs a LineString taking ownership the given CoordinateSequence. | |
virtual Geometry * | clone () const |
Make a deep-copy of this Geometry. | |
virtual CoordinateSequence * | getCoordinates () const |
Returns this Geometry vertices. Caller takes ownership of the returned object. | |
const CoordinateSequence * | getCoordinatesRO () const |
Returns a read-only pointer to internal CoordinateSequence. | |
virtual int | getDimension () const |
Returns line dimension (1). | |
virtual int | getBoundaryDimension () const |
Returns Dimension::False for a closed LineString, 0 otherwise (LineString boundary is a MultiPoint). | |
virtual Geometry * | getBoundary () const |
Returns a MultiPoint. Empty for closed LineString, a Point for each vertex otherwise. | |
virtual bool | isEmpty () const |
Returns whether or not the set of points in this Geometry is empty. | |
virtual int | getNumPoints () const |
Returns the count of this Geometrys vertices. | |
virtual string | getGeometryType () const |
Return a string representation of this Geometry type. | |
virtual GeometryTypeId | getGeometryTypeId () const |
Return an integer representation of this Geometry type. | |
virtual bool | isSimple () const |
Returns false if the Geometry not simple. | |
virtual bool | equalsExact (const Geometry *other, double tolerance) const |
Returns true if the two Geometrys are exactly equal, up to a specified tolerance. | |
virtual void | normalize () |
Normalize a LineString. | |
virtual const Coordinate * | getCoordinate () const |
Returns a vertex of this Geometry. | |
virtual double | getLength () const |
Returns the length of this Geometry. |
geos::LineString::LineString | ( | CoordinateSequence * | newCoords, | |
const GeometryFactory * | factory | |||
) |
Constructs a LineString taking ownership the given CoordinateSequence.
Constructs a LineString
taking ownership of the given CoordinateSequence.
newCoords | the list of coordinates making up the linestring, or null to create the empty geometry. Consecutive points may not be equal. | |
factory | the GeometryFactory used to create this Geometry. |
void geos::LineString::normalize | ( | void | ) | [virtual] |
Normalize a LineString.
Normalizes a LineString. A normalized linestring has the first point which is not equal to it's reflected point less than the reflected point.
Implements geos::Geometry.
double geos::LineString::getLength | ( | ) | const [virtual] |
Returns the length of this Geometry.
Returns the length of this Geometry
. Linear geometries return their length. Areal geometries return their perimeter. They override this function to compute the area. Others return 0.0
Reimplemented from geos::Geometry.