geos::LineString Class Reference

Basic implementation of LineString. More...

#include <geos.h>

Inheritance diagram for geos::LineString:

geos::Geometry geos::LinearRing List of all members.

Public Member Functions

 LineString (CoordinateSequence *pts, const GeometryFactory *newFactory)
 Constructs a LineString taking ownership the given CoordinateSequence.
virtual Geometryclone () const
 Make a deep-copy of this Geometry.
virtual CoordinateSequencegetCoordinates () const
 Returns this Geometry vertices. Caller takes ownership of the returned object.
const CoordinateSequencegetCoordinatesRO () 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 GeometrygetBoundary () 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 CoordinategetCoordinate () const
 Returns a vertex of this Geometry.
virtual double getLength () const
 Returns the length of this Geometry.

Detailed Description

Basic implementation of LineString.


Constructor & Destructor Documentation

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.

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


Member Function Documentation

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

Returns:
the length of the Geometry

Reimplemented from geos::Geometry.


The documentation for this class was generated from the following files:
Generated on Mon Nov 6 20:45:03 2006 for GEOS by  doxygen 1.5.1