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<Geometry> clone()
const override;
88 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
93 virtual const Coordinate& getCoordinateN(
size_t n)
const;
103 int getBoundaryDimension()
const override;
106 int getCoordinateDimension()
const override;
113 std::unique_ptr<Geometry> getBoundary()
const override;
115 bool isEmpty()
const override;
117 std::size_t getNumPoints()
const override;
119 virtual std::unique_ptr<Point> getPointN(std::size_t n)
const;
125 virtual std::unique_ptr<Point> getStartPoint()
const;
131 virtual std::unique_ptr<Point> getEndPoint()
const;
133 virtual bool isClosed()
const;
135 virtual bool isRing()
const;
137 std::string getGeometryType()
const override;
141 virtual bool isCoordinate(
Coordinate& pt)
const;
143 bool equalsExact(
const Geometry* other,
double tolerance = 0)
169 void normalize()
override;
172 int compareToSameClass(
const Geometry* ls)
const override;
174 const Coordinate* getCoordinate()
const override;
176 double getLength()
const override;
184 std::unique_ptr<Geometry> reverse()
const override;
199 Envelope::Ptr computeEnvelopeInternal()
const override;
201 CoordinateSequence::Ptr points;
204 getSortIndex()
const override 206 return SORTINDEX_LINESTRING;
211 void validateConstruction();
215 struct GEOS_DLL LineStringLT {
217 operator()(
const LineString* ls1,
const LineString* ls2)
const 219 return ls1->compareTo(ls2) < 0;
224 inline std::unique_ptr<Geometry>
227 return std::unique_ptr<Geometry>(
new LineString(*
this));
237 #endif // ndef GEOS_GEOS_LINESTRING_H Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:47
std::unique_ptr< Geometry > clone() const override
Creates and returns a full copy of this LineString object (including all coordinates contained by it)
Definition: LineString.h:225
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
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
DimensionType
Definition: Dimension.h:31
Definition: GeometryComponentFilter.h:43