22 #include <geos/export.h>
23 #include <geos/geom/Geometry.h>
24 #include <geos/geom/Envelope.h>
25 #include <geos/geom/Dimension.h>
35 class CoordinateSequenceFilter;
56 typedef std::vector<std::unique_ptr<Geometry>>::const_iterator const_iterator;
58 typedef std::vector<std::unique_ptr<Geometry>>::iterator iterator;
60 const_iterator begin()
const
62 return geometries.begin();
65 const_iterator end()
const
67 return geometries.end();
76 std::unique_ptr<GeometryCollection>
clone()
const
78 return std::unique_ptr<GeometryCollection>(cloneImpl());
118 bool hasM()
const override;
120 bool hasZ()
const override;
138 double tolerance = 0)
const override;
190 std::unique_ptr<GeometryCollection>
reverse()
const {
return std::unique_ptr<GeometryCollection>(reverseImpl()); }
193 if (envelope.isNull()) {
194 envelope = computeEnvelopeInternal();
233 getSortIndex()
const override
235 return SORTINDEX_GEOMETRYCOLLECTION;
238 std::vector<std::unique_ptr<Geometry>> geometries;
241 Envelope computeEnvelopeInternal()
const;
247 int compareToSameClass(
const Geometry* gc)
const override;
std::size_t getNumPoints() const override
Returns the count of this Geometrys vertices.
const Geometry * getGeometryN(std::size_t n) const override
Returns a pointer to the nth Geometry in this collection.
void apply_ro(CoordinateSequenceFilter &filter) const override
void apply_rw(CoordinateSequenceFilter &filter) override
std::size_t getNumGeometries() const override
Returns the number of geometries in this collection.
void geometryChangedAction() override
Notifies this Geometry that its Coordinates have been changed by an external party.
Definition: GeometryCollection.h:243
std::unique_ptr< CoordinateSequence > getCoordinates() const override
Collects all coordinates of all subgeometries into a CoordinateSequence.
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
Definition: GeometryComponentFilter.h:41
double getLength() const override
Returns the total length of this collection.
GeometryCollection * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: GeometryCollection.h:228
Dimension::DimensionType getDimension() const override
Returns the maximum dimension of geometries in this collection (0=point, 1=line, 2=surface)
int getBoundaryDimension() const override
Returns the maximum boundary dimension of geometries in this collection.
const CoordinateXY * getCoordinate() const override
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
DimensionType
Definition: Dimension.h:29
std::unique_ptr< GeometryCollection > clone() const
Definition: GeometryCollection.h:76
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...
GeometryCollection * reverseImpl() const override
Make a geometry with coordinates in reverse order.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
uint8_t getCoordinateDimension() const override
Returns coordinate dimension.
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
std::vector< std::unique_ptr< Geometry > > releaseGeometries()
Take ownership of the sub-geometries managed by this GeometryCollection. After releasing the sub-geom...
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...
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:55
bool isEmpty() const override
Returns whether or not the set of points in this Geometry is empty.
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: GeometryCollection.h:192
void normalize() override
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
void setSRID(int) override
Sets the ID of the Spatial Reference System used by the Geometry.
std::unique_ptr< GeometryCollection > reverse() const
Definition: GeometryCollection.h:190
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
GeometryTypeId
Geometry types.
Definition: Geometry.h:73
std::unique_ptr< Geometry > getBoundary() const override
Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty.
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 setToNull()
Makes this Envelope a "null" envelope, that is, the envelope of the empty geometry.
Definition: Envelope.h:240
GeometryCollection(std::vector< std::unique_ptr< T >> &&newGeoms, const GeometryFactory &newFactory)
Convenience constructor to build a GeometryCollection from vector of Geometry subclass pointers.
Definition: GeometryCollection.h:225
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
double getArea() const override
Returns the total area of this collection.
GeometryCollection(std::vector< std::unique_ptr< Geometry >> &&newGeoms, const GeometryFactory &newFactory)
Construct a GeometryCollection with the given GeometryFactory. Will keep a reference to the factory,...
bool isDimensionStrict(Dimension::DimensionType d) const override
Checks whether this Geometry consists only of components having dimension d.
bool hasDimension(Dimension::DimensionType d) const override
Checks whether any component of this geometry has dimension d.
std::string getGeometryType() const override
Return a string representation of this Geometry type.