23 #include <geos/export.h>
24 #include <geos/geom/Geometry.h>
25 #include <geos/geom/CoordinateSequence.h>
26 #include <geos/geom/Envelope.h>
27 #include <geos/geom/Dimension.h>
35 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
42 class CoordinateFilter;
43 class CoordinateSequenceFilter;
44 class GeometryComponentFilter;
70 ~
Point()
override =
default;
78 std::unique_ptr<Point>
clone()
const
80 return std::unique_ptr<Point>(cloneImpl());
97 bool hasM()
const override;
99 bool hasZ()
const override;
114 void setXY(
double x,
double y) {
116 coordinates.add(x, y);
118 CoordinateXY& prev = coordinates.front<CoordinateXY>();
122 geometryChangedAction();
126 return isEmpty() ? nullptr : &coordinates.getAt<CoordinateXY>(0);
155 std::unique_ptr<Point> reverse()
const
157 return std::unique_ptr<Point>(reverseImpl());
194 Envelope computeEnvelopeInternal()
const;
196 int compareToSameClass(
const Geometry* p)
const override;
199 getSortIndex()
const override
201 return SORTINDEX_POINT;
205 envelope = computeEnvelopeInternal();
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
void normalize(void) override
Definition: Point.h:150
std::unique_ptr< Geometry > getBoundary() const override
bool equalsIdentical(const Geometry *other) const override
Returns true if the two geometries are of the same type and their vertices corresponding by index are...
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
std::unique_ptr< Point > clone() const
Definition: Point.h:78
bool isEmpty() const override
Returns whether or not the set of points in this Geometry is empty.
Definition: GeometryComponentFilter.h:41
std::string getGeometryType() const override
Return a string representation of this Geometry type.
DimensionType
Definition: Dimension.h:29
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
void geometryChangedAction() override
Notifies this Geometry that its Coordinates have been changed by an external party.
Definition: Point.h:204
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Dimension::DimensionType getDimension() const override
Returns point dimension (0)
Point(CoordinateSequence &&newCoords, const GeometryFactory *newFactory)
Creates a Point taking ownership of the given CoordinateSequence (must have 1 element)
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:55
Point * reverseImpl() const override
Make a geometry with coordinates in reverse order.
Definition: Point.h:192
std::vector< const Point * > ConstVect
A vector of const Point pointers.
Definition: Point.h:68
uint8_t getCoordinateDimension() const override
Returns coordinate dimension.
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
GeometryTypeId
Geometry types.
Definition: Geometry.h:73
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:43
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
void apply_ro(CoordinateSequenceFilter &filter) const override
const Envelope * getEnvelopeInternal() const override
Returns the minimum and maximum x and y values in this Geometry, or a null Envelope if this Geometry ...
Definition: Point.h:160
bool isSimple() const override
Returns false if the Geometry not simple.
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
std::size_t getNumPoints() const override
Returns the count of this Geometrys vertices.
int getBoundaryDimension() const override
Returns Dimension::False (Point has no boundary)
void apply_rw(CoordinateSequenceFilter &filter) override
const CoordinateXY * getCoordinate() const override
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
Definition: Point.h:125
std::unique_ptr< CoordinateSequence > getCoordinates(void) const override
Returns this Geometry vertices. Caller takes ownership of the returned object.
Point * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: Point.h:190
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...