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());
83 void setSRID(
int)
override;
98 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
100 bool isEmpty()
const override;
116 uint8_t getCoordinateDimension()
const override;
118 bool hasM()
const override;
120 bool hasZ()
const override;
122 std::unique_ptr<Geometry> getBoundary()
const override;
129 int getBoundaryDimension()
const override;
131 std::size_t getNumPoints()
const override;
133 std::string getGeometryType()
const override;
137 bool equalsExact(
const Geometry* other,
138 double tolerance = 0)
const override;
140 bool equalsIdentical(
const Geometry* other)
const override;
158 void normalize()
override;
160 const CoordinateXY* getCoordinate()
const override;
163 double getArea()
const override;
166 double getLength()
const override;
169 std::size_t getNumGeometries()
const override;
172 const Geometry* getGeometryN(std::size_t n)
const override;
181 std::vector<std::unique_ptr<Geometry>> releaseGeometries();
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;
239 mutable Envelope envelope;
241 Envelope computeEnvelopeInternal()
const;
244 envelope.setToNull();
247 int compareToSameClass(
const Geometry* gc)
const override;
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
std::unique_ptr< GeometryCollection > reverse() const
Definition: GeometryCollection.h:190
Definition: Coordinate.h:572
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:55
GeometryTypeId
Geometry types.
Definition: Geometry.h:73
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
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 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 geometryChangedAction() override
Notifies this Geometry that its Coordinates have been changed by an external party.
Definition: GeometryCollection.h:243
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
std::unique_ptr< GeometryCollection > clone() const
Definition: GeometryCollection.h:76
GeometryCollection * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: GeometryCollection.h:228
DimensionType
Definition: Dimension.h:29
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
Definition: GeometryComponentFilter.h:41