21 #ifndef GEOS_GEOS_LINESTRING_H 22 #define GEOS_GEOS_LINESTRING_H 24 #include <geos/export.h> 25 #include <geos/geom/Geometry.h> 26 #include <geos/geom/CoordinateSequence.h> 27 #include <geos/geom/Envelope.h> 28 #include <geos/geom/Dimension.h> 34 #include <geos/inline.h> 38 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 44 class CoordinateArraySequence;
45 class CoordinateSequenceFilter;
86 std::unique_ptr<LineString>
clone()
const 88 return std::unique_ptr<LineString>(cloneImpl());
91 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
96 virtual const Coordinate& getCoordinateN(std::size_t n)
const;
105 std::unique_ptr<CoordinateSequence> releaseCoordinates();
115 int getBoundaryDimension()
const override;
118 uint8_t getCoordinateDimension()
const override;
125 std::unique_ptr<Geometry> getBoundary()
const override;
127 bool isEmpty()
const override;
129 std::size_t getNumPoints()
const override;
131 virtual std::unique_ptr<Point> getPointN(std::size_t n)
const;
137 virtual std::unique_ptr<Point> getStartPoint()
const;
143 virtual std::unique_ptr<Point> getEndPoint()
const;
145 virtual bool isClosed()
const;
147 virtual bool isRing()
const;
149 std::string getGeometryType()
const override;
153 virtual bool isCoordinate(
Coordinate& pt)
const;
155 bool equalsExact(
const Geometry* other,
double tolerance = 0)
181 void normalize()
override;
184 int compareToSameClass(
const Geometry* ls)
const override;
186 const Coordinate* getCoordinate()
const override;
188 double getLength()
const override;
196 std::unique_ptr<LineString>
reverse()
const {
return std::unique_ptr<LineString>(reverseImpl()); }
215 Envelope::Ptr computeEnvelopeInternal()
const override;
217 CoordinateSequence::Ptr points;
220 getSortIndex()
const override 222 return SORTINDEX_LINESTRING;
227 void validateConstruction();
228 void normalizeClosed();
233 struct GEOS_DLL LineStringLT {
235 operator()(
const LineString* ls1,
const LineString* ls2)
const 237 return ls1->compareTo(ls2) < 0;
248 #endif // ndef GEOS_GEOS_LINESTRING_H Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:47
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
std::vector< const LineString * > ConstVect
A vector of const LineString pointers.
Definition: LineString.h:75
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:57
GeometryTypeId
Geometry types.
Definition: Geometry.h:75
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:43
Definition: LineString.h:68
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
std::unique_ptr< LineString > reverse() const
Definition: LineString.h:196
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
LineString * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: LineString.h:211
std::unique_ptr< LineString > clone() const
Creates and returns a full copy of this LineString object (including all coordinates contained by it)...
Definition: LineString.h:86
DimensionType
Definition: Dimension.h:31
Definition: GeometryComponentFilter.h:43