20#ifndef GEOS_GEOS_GEOMETRYCOLLECTION_H
21#define GEOS_GEOS_GEOMETRYCOLLECTION_H
23#include <geos/export.h>
24#include <geos/geom/Geometry.h>
26#include <geos/geom/Envelope.h>
27#include <geos/geom/Dimension.h>
29#include <geos/inline.h>
56class GEOS_DLL GeometryCollection :
public virtual Geometry {
59 friend class GeometryFactory;
61 typedef std::vector<Geometry *>::const_iterator const_iterator;
63 typedef std::vector<Geometry *>::iterator iterator;
65 const_iterator begin()
const;
67 const_iterator end()
const;
76 return new GeometryCollection(*
this);
126 double tolerance=0)
const;
162 GeometryCollection(
const GeometryCollection &gc);
191 std::vector<Geometry *>* geometries;
193 Envelope::AutoPtr computeEnvelopeInternal()
const;
195 int compareToSameClass(
const Geometry *gc)
const;
203# include "geos/geom/GeometryCollection.inl"
The default implementation of CoordinateSequence.
Definition CoordinateArraySequence.h:37
Definition CoordinateFilter.h:43
Definition CoordinateSequenceFilter.h:58
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
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:56
virtual int getBoundaryDimension() const
Returns the maximum boundary dimension of geometries in this collection.
virtual Geometry * clone() const
Definition GeometryCollection.h:75
virtual int getCoordinateDimension() const
Returns coordinate dimension.
virtual Dimension::DimensionType getDimension() const
Returns the maximum dimension of geometries in this collection (0=point, 1=line, 2=surface).
GeometryCollection(std::vector< Geometry * > *newGeoms, const GeometryFactory *newFactory)
Construct a GeometryCollection with the given GeometryFactory. Will keep a reference to the factory,...
virtual std::size_t getNumPoints() const
Returns the count of this Geometrys vertices.
virtual std::string getGeometryType() const
Return a string representation of this Geometry type.
virtual const Coordinate * getCoordinate() const
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
virtual void apply_ro(CoordinateSequenceFilter &filter) const
virtual double getArea() const
Returns the total area of this collection.
virtual const Geometry * getGeometryN(std::size_t n) const
Returns a pointer to the nth Geometry int this collection.
virtual double getLength() const
Returns the total length of this collection.
virtual std::size_t getNumGeometries() const
Returns the number of geometries in this collection.
virtual void normalize()
Converts this Geometry to normal form (or canonical form).
virtual bool isEmpty() const
Returns whether or not the set of points in this Geometry is empty.
virtual bool equalsExact(const Geometry *other, double tolerance=0) const
Returns true if the two Geometrys are exactly equal, up to a specified tolerance.
virtual void apply_rw(CoordinateSequenceFilter &filter)
virtual GeometryTypeId getGeometryTypeId() const
Return an integer representation of this Geometry type.
virtual CoordinateSequence * getCoordinates() const
Collects all coordinates of all subgeometries into a CoordinateSequence.
virtual Geometry * getBoundary() const
Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty.
Definition GeometryComponentFilter.h:43
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:48
Geometry(const Geometry &geom)
Polygon overrides to check for actual rectangle.
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
GeometryTypeId
Geometry types.
Definition Geometry.h:65
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25