21#ifndef GEOS_GEOS_LINESTRING_H
22#define GEOS_GEOS_LINESTRING_H
24#include <geos/export.h>
25#include <geos/platform.h>
26#include <geos/geom/Geometry.h>
27#include <geos/geom/Lineal.h>
28#include <geos/geom/CoordinateSequence.h>
29#include <geos/geom/Envelope.h>
30#include <geos/geom/Dimension.h>
36#include <geos/inline.h>
40#pragma warning(disable: 4251)
70class GEOS_DLL LineString:
public virtual Geometry,
public Lineal {
74 friend class GeometryFactory;
79 virtual ~LineString();
95 virtual const Coordinate& getCoordinateN(
int n)
const;
121 virtual Point* getPointN(std::size_t n)
const;
135 virtual bool isClosed()
const;
137 virtual bool isRing()
const;
143 virtual bool isCoordinate(
Coordinate& pt)
const;
174 virtual int compareToSameClass(
const Geometry *ls)
const;
190 LineString(
const LineString &ls);
199 const GeometryFactory *newFactory);
201 Envelope::AutoPtr computeEnvelopeInternal()
const;
203 CoordinateSequence::AutoPtr points;
207 void validateConstruction();
211struct GEOS_DLL LineStringLT {
213 return ls1->compareTo(ls2)<0;
220 return new LineString(*
this);
The default implementation of CoordinateSequence.
Definition CoordinateArraySequence.h:37
Definition CoordinateFilter.h:43
Definition CoordinateSequenceFilter.h:58
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
DimensionType
Definition Dimension.h:31
Definition GeometryComponentFilter.h:43
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:48
Geometry(const Geometry &geom)
Polygon overrides to check for actual rectangle.
Definition LineString.h:70
virtual GeometryTypeId getGeometryTypeId() const
Return an integer representation of this Geometry type.
virtual int getCoordinateDimension() const
Returns coordinate dimension.
LineString(CoordinateSequence *pts, const GeometryFactory *newFactory)
Constructs a LineString taking ownership the given CoordinateSequence.
virtual Geometry * getBoundary() const
Returns a MultiPoint. Empty for closed LineString, a Point for each vertex otherwise.
virtual int getBoundaryDimension() const
Returns Dimension::False for a closed LineString, 0 otherwise (LineString boundary is a MultiPoint).
virtual bool equalsExact(const Geometry *other, double tolerance=0) const
Returns true if the two Geometrys are exactly equal, up to a specified tolerance.
virtual double getLength() const
Returns the length of this Geometry.
void apply_rw(CoordinateSequenceFilter &filter)
virtual bool isEmpty() const
Returns whether or not the set of points in this Geometry is empty.
LineString(CoordinateSequence::AutoPtr pts, const GeometryFactory *newFactory)
Hopefully cleaner version of the above.
virtual std::string getGeometryType() const
Return a string representation of this Geometry type.
Geometry * reverse() const
virtual void normalize()
Normalizes a LineString.
virtual Point * getEndPoint() const
Return the end point of the LineString or NULL if this is an EMPTY LineString.
virtual const Coordinate * getCoordinate() const
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
std::vector< const LineString * > ConstVect
A vector of const LineString pointers.
Definition LineString.h:77
virtual Dimension::DimensionType getDimension() const
Returns line dimension (1).
const CoordinateSequence * getCoordinatesRO() const
Returns a read-only pointer to internal CoordinateSequence.
virtual CoordinateSequence * getCoordinates() const
Returns this Geometry vertices. Caller takes ownership of the returned object.
void apply_ro(CoordinateSequenceFilter &filter) const
virtual Geometry * clone() const
Creates and returns a full copy of this LineString object (including all coordinates contained by it)...
Definition LineString.h:219
virtual Point * getStartPoint() const
Return the start point of the LineString or NULL if this is an EMPTY LineString.
virtual std::size_t getNumPoints() const
Returns the count of this Geometrys vertices.
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
GeometryTypeId
Geometry types.
Definition Geometry.h:65
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25