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) // warning C4251: needs to have dll-interface to be used by clients of class
46 class CoordinateArraySequence;
47 class CoordinateSequenceFilter;
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 int compareToSameClass(
const Geometry *ls)
const override;
201 Envelope::Ptr computeEnvelopeInternal()
const override;
203 CoordinateSequence::Ptr points;
207 void validateConstruction();
211 struct GEOS_DLL LineStringLT {
213 return ls1->compareTo(ls2)<0;
230 #endif // ndef GEOS_GEOS_LINESTRING_H
virtual Point * getEndPoint() const
Return the end point of the LineString or NULL if this is an EMPTY LineString.
double getLength() const override
Returns the length of this Geometry.
std::vector< const LineString * > ConstVect
A vector of const LineString pointers.
Definition: LineString.h:77
const Coordinate * getCoordinate() const override
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Definition: GeometryComponentFilter.h:43
Geometry * clone() const override
Creates and returns a full copy of this LineString object (including all coordinates contained by it)
Definition: LineString.h:219
CoordinateSequence * getCoordinates() const override
Returns this Geometry vertices. Caller takes ownership of the returned object.
LineString(CoordinateSequence::Ptr pts, const GeometryFactory *newFactory)
Hopefully cleaner version of the above.
int getBoundaryDimension() const override
Returns Dimension::False for a closed LineString, 0 otherwise (LineString boundary is a MultiPoint)
void apply_ro(CoordinateSequenceFilter &filter) const override
int getCoordinateDimension() const override
Returns coordinate dimension.
void normalize() override
Normalizes a LineString.
DimensionType
Definition: Dimension.h:31
void apply_rw(CoordinateSequenceFilter &filter) override
const CoordinateSequence * getCoordinatesRO() const
Returns a read-only pointer to internal CoordinateSequence.
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:177
Geometry * reverse() const override
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59
Definition: CoordinateSequenceFilter.h:58
Dimension::DimensionType getDimension() const override
Returns line dimension (1)
Geometry * getBoundary() const override
Returns a MultiPoint. Empty for closed LineString, a Point for each vertex otherwise.
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
std::size_t getNumPoints() const override
Returns the count of this Geometrys vertices.
LineString(CoordinateSequence *pts, const GeometryFactory *newFactory)
Constructs a LineString taking ownership the given CoordinateSequence.
GeometryTypeId
Geometry types.
Definition: Geometry.h:75
bool isEmpty() const override
Returns whether or not the set of points in this Geometry is empty.
Definition: CoordinateFilter.h:43
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
std::string getGeometryType() const override
Return a string representation of this Geometry type.
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:48
Definition: LineString.h:70
virtual Point * getStartPoint() const
Return the start point of the LineString or NULL if this is an EMPTY LineString.
bool equalsExact(const Geometry *other, double tolerance=0) const override
Returns true iff the two Geometrys are of the same type and their vertices corresponding by index are...