20#ifndef GEOS_GEOS_GEOMETRYCOLLECTION_H
21#define GEOS_GEOS_GEOMETRYCOLLECTION_H
23#include <geos/export.h>
24#include <geos/geom/Geometry.h>
25#include <geos/geom/Envelope.h>
26#include <geos/geom/Dimension.h>
28#include <geos/inline.h>
38class CoordinateArraySequence;
39class CoordinateSequenceFilter;
60 typedef std::vector<std::unique_ptr<Geometry>>::const_iterator const_iterator;
62 typedef std::vector<std::unique_ptr<Geometry>>::iterator iterator;
64 const_iterator begin()
const;
66 const_iterator end()
const;
74 std::unique_ptr<Geometry>
131 double tolerance = 0)
const override;
172 std::unique_ptr<Geometry>
reverse()
const override;
212 getSortIndex()
const override
214 return SORTINDEX_GEOMETRYCOLLECTION;
217 std::vector<std::unique_ptr<Geometry>> geometries;
219 Envelope::Ptr computeEnvelopeInternal()
const override;
221 int compareToSameClass(
const Geometry* gc)
const override;
229# include "geos/geom/GeometryCollection.inl"
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition CoordinateFilter.h:43
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition CoordinateSequenceFilter.h:57
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
DimensionType
Definition Dimension.h:31
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:55
void setSRID(int) override
Sets the ID of the Spatial Reference System used by the Geometry.
bool isDimensionStrict(Dimension::DimensionType d) const override
Checks whether this Geometry consists only of components having dimension d.
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:208
std::unique_ptr< Geometry > clone() const override
Definition GeometryCollection.h:75
std::string getGeometryType() const override
Return a string representation of this Geometry type.
const Coordinate * getCoordinate() const override
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
const Geometry * getGeometryN(std::size_t n) const override
Returns a pointer to the nth Geometry in this collection.
uint8_t getCoordinateDimension() const override
Returns coordinate dimension.
GeometryCollection(std::vector< Geometry * > *newGeoms, const GeometryFactory *newFactory)
Construct a GeometryCollection with the given GeometryFactory. Will keep a reference to the factory,...
void apply_ro(CoordinateSequenceFilter &filter) const override
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
std::unique_ptr< Geometry > reverse() const override
std::unique_ptr< CoordinateSequence > getCoordinates() const override
Collects all coordinates of all subgeometries into a CoordinateSequence.
double getArea() const override
Returns the total area of this collection.
std::size_t getNumPoints() const override
Returns the count of this Geometrys vertices.
bool isEmpty() const override
Returns whether or not the set of points in this Geometry is empty.
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.
double getLength() const override
Returns the total length of this collection.
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...
std::unique_ptr< Geometry > getBoundary() const override
Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty.
std::size_t getNumGeometries() const override
Returns the number of geometries in this collection.
void normalize() override
void apply_rw(CoordinateSequenceFilter &filter) override
Definition GeometryComponentFilter.h:43
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:68
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:47
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:188
GeometryTypeId
Geometry types.
Definition Geometry.h:75
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26