Geometry.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2009 2011 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2005 2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: geom/Geometry.java rev. 1.112
*
**********************************************************************/
#pragma once
#ifndef USE_UNSTABLE_GEOS_CPP_API
#ifndef _MSC_VER
# warning "The GEOS C++ API is unstable, please use the C API instead"
# warning "HINT: #include geos_c.h"
#else
#pragma message("The GEOS C++ API is unstable, please use the C API instead")
#pragma message("HINT: #include geos_c.h")
#endif
#endif
#include <geos/export.h>
#include <geos/geom/Envelope.h>
#include <geos/geom/Dimension.h> // for Dimension::DimensionType
#include <geos/geom/GeometryComponentFilter.h> // for inheritance
#include <geos/geom/CoordinateSequence.h> // to materialize CoordinateSequence
#include <algorithm>
#include <string>
#include <iostream>
#include <vector>
#include <memory>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#pragma warning(disable: 4355) // warning C4355: 'this' : used in base member initializer list
#endif
// Forward declarations
namespace geos {
namespace geom {
class Coordinate;
class CoordinateFilter;
class CoordinateSequence;
class CoordinateSequenceFilter;
class GeometryComponentFilter;
class GeometryFactory;
class GeometryFilter;
class PrecisionModel;
class Point;
class IntersectionMatrix;
}
namespace io { // geos.io
} // namespace geos.io
}
namespace geos { // geos
namespace geom { // geos::geom
enum GeometryTypeId : int {
GEOS_POINT,
GEOS_LINESTRING,
GEOS_LINEARRING,
GEOS_POLYGON,
GEOS_MULTIPOINT,
GEOS_MULTILINESTRING,
GEOS_MULTIPOLYGON,
GEOS_GEOMETRYCOLLECTION,
GEOS_CIRCULARSTRING,
GEOS_COMPOUNDCURVE,
GEOS_CURVEPOLYGON,
GEOS_MULTICURVE,
GEOS_MULTISURFACE,
};
enum GeometrySortIndex {
SORTINDEX_POINT = 0,
SORTINDEX_MULTIPOINT = 1,
SORTINDEX_LINESTRING = 2,
SORTINDEX_LINEARRING = 3,
SORTINDEX_MULTILINESTRING = 4,
SORTINDEX_POLYGON = 5,
SORTINDEX_MULTIPOLYGON = 6,
SORTINDEX_GEOMETRYCOLLECTION = 7,
SORTINDEX_CIRCULARSTRING = 8,
SORTINDEX_COMPOUNDCURVE = 9,
SORTINDEX_CURVEPOLYGON = 10,
SORTINDEX_MULTICURVE = 11,
SORTINDEX_MULTISURFACE = 12,
};
class GEOS_DLL Geometry {
public:
friend class GeometryFactory;
using ConstVect = std::vector<const Geometry*>;
using NonConstVect = std::vector<Geometry*>;
using Ptr = std::unique_ptr<Geometry> ;
std::unique_ptr<Geometry> clone() const { return std::unique_ptr<Geometry>(cloneImpl()); }
virtual ~Geometry();
const GeometryFactory*
getFactory() const
{
return _factory;
}
void
setUserData(void* newUserData)
{
_userData = newUserData;
}
void*
getUserData() const
{
return _userData;
}
int getSRID() const
{
return SRID;
}
virtual void
setSRID(int newSRID)
{
SRID = newSRID;
}
const PrecisionModel* getPrecisionModel() const;
virtual const CoordinateXY* getCoordinate() const = 0; //Abstract
virtual std::unique_ptr<CoordinateSequence> getCoordinates() const = 0; //Abstract
virtual std::size_t getNumPoints() const = 0; //Abstract
virtual bool isSimple() const;
virtual std::string getGeometryType() const = 0; //Abstract
virtual bool hasCurvedComponents() const;
virtual GeometryTypeId getGeometryTypeId() const = 0; //Abstract
virtual std::size_t
getNumGeometries() const
{
return 1;
}
virtual const Geometry*
getGeometryN(std::size_t /*n*/) const
{
return this;
}
bool isValid() const;
virtual bool isEmpty() const = 0; //Abstract
virtual bool
isRectangle() const
{
return false;
}
virtual Dimension::DimensionType getDimension() const = 0; //Abstract
virtual bool hasDimension(Dimension::DimensionType d) const {
return getDimension() == d;
}
virtual bool isDimensionStrict(Dimension::DimensionType d) const {
return d == getDimension();
}
bool isPuntal() const {
return isDimensionStrict(Dimension::P);
}
bool isLineal() const {
return isDimensionStrict(Dimension::L);
}
bool isPolygonal() const {
return isDimensionStrict(Dimension::A);
}
bool isMixedDimension() const;
bool isMixedDimension(Dimension::DimensionType* baseDim) const;
bool isCollection() const {
int t = getGeometryTypeId();
return t == GEOS_GEOMETRYCOLLECTION ||
t == GEOS_MULTIPOINT ||
t == GEOS_MULTILINESTRING ||
t == GEOS_MULTIPOLYGON;
}
static GeometryTypeId multiTypeId(GeometryTypeId typeId) {
switch (typeId) {
case GEOS_POINT: return GEOS_MULTIPOINT;
case GEOS_LINESTRING: return GEOS_MULTILINESTRING;
case GEOS_POLYGON: return GEOS_MULTIPOLYGON;
default: return typeId;
}
}
virtual uint8_t getCoordinateDimension() const = 0; //Abstract
virtual bool hasZ() const = 0;
virtual bool hasM() const = 0;
virtual std::unique_ptr<Geometry> getBoundary() const = 0; //Abstract
virtual int getBoundaryDimension() const = 0; //Abstract
virtual std::unique_ptr<Geometry> getEnvelope() const;
virtual const Envelope* getEnvelopeInternal() const = 0;
virtual bool disjoint(const Geometry* other) const;
virtual bool touches(const Geometry* other) const;
virtual bool intersects(const Geometry* g) const;
virtual bool crosses(const Geometry* g) const;
virtual bool within(const Geometry* g) const;
virtual bool contains(const Geometry* g) const;
virtual bool overlaps(const Geometry* g) const;
bool relate(const Geometry* g,
const std::string& intersectionPattern) const;
bool
relate(const Geometry& g, const std::string& intersectionPattern) const
{
return relate(&g, intersectionPattern);
}
std::unique_ptr<IntersectionMatrix> relate(const Geometry* g) const;
std::unique_ptr<IntersectionMatrix> relate(const Geometry& g) const;
bool equals(const Geometry* g) const;
bool covers(const Geometry* g) const;
bool coveredBy(const Geometry* g) const;
virtual std::string toString() const;
virtual std::string toText() const;
std::unique_ptr<Geometry> buffer(double distance) const;
std::unique_ptr<Geometry> buffer(double distance, int quadrantSegments) const;
std::unique_ptr<Geometry> buffer(double distance, int quadrantSegments,
int endCapStyle) const;
virtual std::unique_ptr<Geometry> convexHull() const;
std::unique_ptr<Geometry> reverse() const { return std::unique_ptr<Geometry>(reverseImpl()); }
std::unique_ptr<Geometry> intersection(const Geometry* other) const;
std::unique_ptr<Geometry> Union(const Geometry* other) const;
// throw(IllegalArgumentException *, TopologyException *);
Ptr Union() const;
// throw(IllegalArgumentException *, TopologyException *);
std::unique_ptr<Geometry> difference(const Geometry* other) const;
std::unique_ptr<Geometry> symDifference(const Geometry* other) const;
virtual bool equalsExact(const Geometry* other, double tolerance = 0)
const = 0; // Abstract
virtual bool equalsIdentical(const Geometry* other) const = 0;
virtual void apply_rw(const CoordinateFilter* filter) = 0; //Abstract
virtual void apply_ro(CoordinateFilter* filter) const = 0; //Abstract
virtual void apply_rw(GeometryFilter* filter);
virtual void apply_ro(GeometryFilter* filter) const;
virtual void apply_rw(GeometryComponentFilter* filter);
virtual void apply_ro(GeometryComponentFilter* filter) const;
virtual void apply_rw(CoordinateSequenceFilter& filter) = 0;
virtual void apply_ro(CoordinateSequenceFilter& filter) const = 0;
template <class T>
void
applyComponentFilter(T& f) const
{
for(std::size_t i = 0, n = getNumGeometries(); i < n; ++i) {
f.filter(getGeometryN(i));
}
}
virtual void normalize() = 0; //Abstract
int compareTo(const Geometry* geom) const;
virtual double getArea() const;
virtual double getLength() const;
virtual double distance(const Geometry* g) const;
virtual bool isWithinDistance(const Geometry* geom,
double cDistance) const;
virtual std::unique_ptr<Point> getCentroid() const;
//
virtual bool getCentroid(CoordinateXY& ret) const;
std::unique_ptr<Point> getInteriorPoint() const;
void geometryChanged();
virtual void geometryChangedAction() = 0;
protected:
virtual Geometry* cloneImpl() const = 0;
virtual Geometry* reverseImpl() const = 0;
template<typename T>
static bool hasNonEmptyElements(const std::vector<T>* geometries) {
return std::any_of(geometries->begin(), geometries->end(), [](const T& g) { return !g->isEmpty(); });
}
static bool hasNullElements(const CoordinateSequence* list);
template<typename T>
static bool hasNullElements(const std::vector<T>* geometries) {
return std::any_of(geometries->begin(), geometries->end(), [](const T& g) { return g == nullptr; });
}
// static void reversePointOrder(CoordinateSequence* coordinates);
// static Coordinate& minCoordinate(CoordinateSequence* coordinates);
// static void scroll(CoordinateSequence* coordinates,Coordinate* firstCoordinate);
// static int indexOf(Coordinate* coordinate,CoordinateSequence* coordinates);
//
virtual bool isEquivalentClass(const Geometry* other) const;
static void checkNotGeometryCollection(const Geometry* g);
virtual int compareToSameClass(const Geometry* geom) const = 0; //Abstract
template<typename T>
static int compare(const T& a, const T& b)
{
std::size_t i = 0;
std::size_t j = 0;
while(i < a.size() && j < b.size()) {
const auto& aGeom = *a[i];
const auto& bGeom = *b[j];
int comparison = aGeom.compareTo(&bGeom);
if(comparison != 0) {
return comparison;
}
i++;
j++;
}
if(i < a.size()) {
return 1;
}
if(j < b.size()) {
return -1;
}
return 0;
}
bool equal(const CoordinateXY& a, const CoordinateXY& b,
double tolerance) const;
int SRID;
Geometry(const Geometry& geom);
Geometry(const GeometryFactory* factory);
template<typename T>
static std::vector<std::unique_ptr<Geometry>> toGeometryArray(std::vector<std::unique_ptr<T>> && v) {
static_assert(std::is_base_of<Geometry, T>::value, "");
std::vector<std::unique_ptr<Geometry>> gv(v.size());
for (std::size_t i = 0; i < v.size(); i++) {
gv[i] = std::move(v[i]);
}
return gv;
}
static std::vector<std::unique_ptr<Geometry>> toGeometryArray(std::vector<std::unique_ptr<Geometry>> && v) {
return std::move(v);
}
protected:
virtual int getSortIndex() const = 0;
private:
class GEOS_DLL GeometryChangedFilter : public GeometryComponentFilter {
public:
void filter_rw(Geometry* geom) override;
};
static GeometryChangedFilter geometryChangedFilter;
const GeometryFactory* _factory;
void* _userData;
};
GEOS_DLL std::ostream& operator<< (std::ostream& os, const Geometry& geom);
struct GEOS_DLL GeometryGreaterThen {
bool operator()(const Geometry* first, const Geometry* second);
};
GEOS_DLL std::string geosversion();
GEOS_DLL std::string jtsport();
// We use this instead of std::pair<unique_ptr<Geometry>> because C++11
// forbids that construct:
// http://lwg.github.com/issues/lwg-closed.html#2068
struct GeomPtrPair {
typedef std::unique_ptr<Geometry> GeomPtr;
GeomPtr first;
GeomPtr second;
};
} // namespace geos::geom
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
geos::geom::CoordinateFilter
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition CoordinateFilter.h:43
geos::geom::CoordinateSequenceFilter
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition CoordinateSequenceFilter.h:56
geos::geom::CoordinateSequence
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geom::Dimension::DimensionType
DimensionType
Definition Dimension.h:29
geos::geom::Dimension::P
@ P
Dimension value of a point (0).
Definition Dimension.h:40
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
geos::geom::GeometryComponentFilter
Definition GeometryComponentFilter.h:41
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
geos::geom::GeometryFilter
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:45
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::Geometry::getBoundary
virtual std::unique_ptr< Geometry > getBoundary() const =0
Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty.
geos::geom::Geometry::getBoundaryDimension
virtual int getBoundaryDimension() const =0
Returns the dimension of this Geometrys inherent boundary.
geos::geom::Geometry::equalsIdentical
virtual bool equalsIdentical(const Geometry *other) const =0
Returns true if the two geometries are of the same type and their vertices corresponding by index are...
geos::geom::Geometry::NonConstVect
std::vector< Geometry * > NonConstVect
A vector of non-const Geometry pointers.
Definition Geometry.h:206
geos::geom::Geometry::applyComponentFilter
void applyComponentFilter(T &f) const
Apply a filter to each component of this geometry. The filter is expected to provide a ....
Definition Geometry.h:805
geos::geom::Geometry::getCoordinate
virtual const CoordinateXY * getCoordinate() const =0
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
geos::geom::Geometry::symDifference
std::unique_ptr< Geometry > symDifference(const Geometry *other) const
Returns a set combining the points in this Geometry not in other, and the points in other not in this...
geos::geom::Geometry::reverse
std::unique_ptr< Geometry > reverse() const
Computes a new geometry which has all component coordinate sequences in reverse order (opposite orien...
Definition Geometry.h:686
geos::geom::Geometry::~Geometry
virtual ~Geometry()
Destroy Geometry and all components.
geos::geom::Geometry::apply_rw
virtual void apply_rw(CoordinateSequenceFilter &filter)=0
geos::geom::Geometry::getPrecisionModel
const PrecisionModel * getPrecisionModel() const
Get the PrecisionModel used to create this Geometry.
geos::geom::Geometry::relate
std::unique_ptr< IntersectionMatrix > relate(const Geometry *g) const
Returns the DE-9IM intersection matrix for the two Geometrys.
geos::geom::Geometry::geometryChangedAction
virtual void geometryChangedAction()=0
Notifies this Geometry that its Coordinates have been changed by an external party.
geos::geom::Geometry::equalsExact
virtual bool equalsExact(const Geometry *other, double tolerance=0) const =0
Returns true iff the two Geometrys are of the same type and their vertices corresponding by index are...
geos::geom::Geometry::isDimensionStrict
virtual bool isDimensionStrict(Dimension::DimensionType d) const
Checks whether this Geometry consists only of components having dimension d.
Definition Geometry.h:368
geos::geom::Geometry::normalize
virtual void normalize()=0
geos::geom::Geometry::apply_ro
virtual void apply_ro(CoordinateSequenceFilter &filter) const =0
geos::geom::Geometry::intersects
virtual bool intersects(const Geometry *g) const
Returns true if disjoint returns false.
geos::geom::Geometry::crosses
virtual bool crosses(const Geometry *g) const
geos::geom::Geometry::getGeometryTypeId
virtual GeometryTypeId getGeometryTypeId() const =0
Return an integer representation of this Geometry type.
geos::geom::Geometry::compareTo
int compareTo(const Geometry *geom) const
Comparator for sorting geometry.
geos::geom::Geometry::convexHull
virtual std::unique_ptr< Geometry > convexHull() const
Returns the smallest convex Polygon that contains all the points in the Geometry.
geos::geom::Geometry::hasDimension
virtual bool hasDimension(Dimension::DimensionType d) const
Checks whether any component of this geometry has dimension d.
Definition Geometry.h:363
geos::geom::Geometry::getGeometryType
virtual std::string getGeometryType() const =0
Return a string representation of this Geometry type.
geos::geom::Geometry::getCoordinateDimension
virtual uint8_t getCoordinateDimension() const =0
Returns the coordinate dimension of this Geometry (2=XY, 3=XYZ or XYM, 4=XYZM).
geos::geom::Geometry::isWithinDistance
virtual bool isWithinDistance(const Geometry *geom, double cDistance) const
Tests whether the distance from this Geometry to another is less than or equal to a specified value.
geos::geom::Geometry::getLength
virtual double getLength() const
Returns the length of this Geometry.
geos::geom::Geometry::distance
virtual double distance(const Geometry *g) const
geos::geom::Geometry::getInteriorPoint
std::unique_ptr< Point > getInteriorPoint() const
Computes an interior point of this Geometry.
geos::geom::Geometry::intersection
std::unique_ptr< Geometry > intersection(const Geometry *other) const
Returns a Geometry representing the points shared by this Geometry and other.
geos::geom::Geometry::getCentroid
virtual bool getCentroid(CoordinateXY &ret) const
Computes the centroid of this Geometry as a Coordinate.
geos::geom::Geometry::Ptr
std::unique_ptr< Geometry > Ptr
An unique_ptr of Geometry.
Definition Geometry.h:209
geos::geom::Geometry::getGeometryN
virtual const Geometry * getGeometryN(std::size_t) const
Returns a pointer to the nth Geometry in this collection (or self if this is not a collection).
Definition Geometry.h:333
geos::geom::Geometry::hasCurvedComponents
virtual bool hasCurvedComponents() const
Returns whether the Geometry contains curved components.
geos::geom::Geometry::within
virtual bool within(const Geometry *g) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**F***.
geos::geom::Geometry::getNumPoints
virtual std::size_t getNumPoints() const =0
Returns the count of this Geometrys vertices.
geos::geom::Geometry::hasNullElements
static bool hasNullElements(const CoordinateSequence *list)
Returns true if the CoordinateSequence contains any null elements.
geos::geom::Geometry::reverseImpl
virtual Geometry * reverseImpl() const =0
Make a geometry with coordinates in reverse order.
geos::geom::Geometry::geometryChanged
void geometryChanged()
Notifies this Geometry that its Coordinates have been changed by an external party (using a Coordinat...
geos::geom::Geometry::setUserData
void setUserData(void *newUserData)
A simple scheme for applications to add their own custom data to a Geometry. An example use might be ...
Definition Geometry.h:245
geos::geom::Geometry::isEmpty
virtual bool isEmpty() const =0
Returns whether or not the set of points in this Geometry is empty.
geos::geom::Geometry::relate
bool relate(const Geometry *g, const std::string &intersectionPattern) const
Returns true if the elements in the DE-9IM intersection matrix for the two Geometrys match the elemen...
geos::geom::Geometry::Geometry
Geometry(const GeometryFactory *factory)
Construct a geometry with the given GeometryFactory.
geos::geom::Geometry::isValid
bool isValid() const
Tests the validity of this Geometry.
geos::geom::Geometry::ConstVect
std::vector< const Geometry * > ConstVect
A vector of const Geometry pointers.
Definition Geometry.h:203
geos::geom::Geometry::getFactory
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition Geometry.h:226
geos::geom::Geometry::touches
virtual bool touches(const Geometry *other) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is FT*******,...
geos::geom::Geometry::getEnvelope
virtual std::unique_ptr< Geometry > getEnvelope() const
Returns this Geometrys bounding box.
geos::geom::Geometry::toString
virtual std::string toString() const
Returns the Well-known Text representation of this Geometry.
geos::geom::Geometry::buffer
std::unique_ptr< Geometry > buffer(double distance, int quadrantSegments) const
Returns a buffer region around this Geometry having the given width and with a specified number of se...
geos::geom::Geometry::cloneImpl
virtual Geometry * cloneImpl() const =0
Make a deep-copy of this Geometry.
geos::geom::Geometry::isSimple
virtual bool isSimple() const
Returns false if the Geometry not simple.
geos::geom::Geometry::hasNonEmptyElements
static bool hasNonEmptyElements(const std::vector< T > *geometries)
Returns true if the array contains any non-empty Geometrys.
Definition Geometry.h:902
geos::geom::Geometry::Union
Ptr Union() const
Computes the union of all the elements of this geometry. Heterogeneous GeometryCollections are fully ...
geos::geom::Geometry::getUserData
void * getUserData() const
Gets the user data object for this geometry, if any.
Definition Geometry.h:257
geos::geom::Geometry::difference
std::unique_ptr< Geometry > difference(const Geometry *other) const
Returns a Geometry representing the points making up this Geometry that do not make up other.
geos::geom::Geometry::disjoint
virtual bool disjoint(const Geometry *other) const
geos::geom::Geometry::contains
virtual bool contains(const Geometry *g) const
Returns true if other.within(this) returns true.
geos::geom::Geometry::isEquivalentClass
virtual bool isEquivalentClass(const Geometry *other) const
Returns whether the two Geometrys are equal, from the point of view of the equalsExact method.
geos::geom::Geometry::buffer
std::unique_ptr< Geometry > buffer(double distance) const
geos::geom::Geometry::getCentroid
virtual std::unique_ptr< Point > getCentroid() const
Computes the centroid of this Geometry.
geos::geom::Geometry::coveredBy
bool coveredBy(const Geometry *g) const
Tests whether this geometry is covered by the specified geometry.
geos::geom::Geometry::getCoordinates
virtual std::unique_ptr< CoordinateSequence > getCoordinates() const =0
Returns this Geometry vertices. Caller takes ownership of the returned object.
geos::geom::Geometry::Union
std::unique_ptr< Geometry > Union(const Geometry *other) const
Returns a Geometry representing all the points in this Geometry and other.
geos::geom::Geometry::getNumGeometries
virtual std::size_t getNumGeometries() const
Returns the number of geometries in this collection, or 1 if this is not a collection.
Definition Geometry.h:325
geos::geom::Geometry::clone
std::unique_ptr< Geometry > clone() const
Make a deep-copy of this Geometry.
Definition Geometry.h:212
geos::geom::Geometry::getArea
virtual double getArea() const
Returns the area of this Geometry.
geos::geom::Geometry::isRectangle
virtual bool isRectangle() const
Polygon overrides to check for actual rectangle.
Definition Geometry.h:354
geos::geom::Geometry::overlaps
virtual bool overlaps(const Geometry *g) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is T*T***T** (for two points or ...
geos::geom::Geometry::covers
bool covers(const Geometry *g) const
Returns true if this geometry covers the specified geometry.
geos::geom::Geometry::getDimension
virtual Dimension::DimensionType getDimension() const =0
Returns the dimension of this Geometry (0=point, 1=line, 2=surface).
geos::geom::Geometry::buffer
std::unique_ptr< Geometry > buffer(double distance, int quadrantSegments, int endCapStyle) const
Computes a buffer area around this geometry having the given width and with a specified accuracy of a...
geos::geom::Geometry::getEnvelopeInternal
virtual const Envelope * getEnvelopeInternal() const =0
Returns the minimum and maximum x and y values in this Geometry, or a null Envelope if this Geometry ...
geos::geom::Geometry::getSRID
int getSRID() const
Returns the ID of the Spatial Reference System used by the Geometry.
Definition Geometry.h:272
geos::geom::Geometry::hasNullElements
static bool hasNullElements(const std::vector< T > *geometries)
Returns true if the vector contains any null elements.
Definition Geometry.h:911
geos::geom::Geometry::setSRID
virtual void setSRID(int newSRID)
Sets the ID of the Spatial Reference System used by the Geometry.
Definition Geometry.h:281
geos::geom::Geometry::equals
bool equals(const Geometry *g) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**FFF*.
geos::geom::IntersectionMatrix
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition IntersectionMatrix.h:51
geos::geom::Point
Definition Point.h:61
geos::geom::PrecisionModel
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:87
GEOS_MULTILINESTRING
@ GEOS_MULTILINESTRING
Definition geos_c.h:223
GEOS_GEOMETRYCOLLECTION
@ GEOS_GEOMETRYCOLLECTION
Definition geos_c.h:227
GEOS_POINT
@ GEOS_POINT
Definition geos_c.h:213
GEOS_MULTIPOLYGON
@ GEOS_MULTIPOLYGON
Definition geos_c.h:225
GEOS_POLYGON
@ GEOS_POLYGON
Definition geos_c.h:219
GEOS_MULTIPOINT
@ GEOS_MULTIPOINT
Definition geos_c.h:221
GEOS_LINESTRING
@ GEOS_LINESTRING
Definition geos_c.h:215
geos::geom
Definition Angle.h:26
geos::geom::jtsport
std::string jtsport()
Return the version of JTS this GEOS release has been ported from.
geos::geom::geosversion
std::string geosversion()
Return current GEOS version.
geos::geom::GeometryTypeId
GeometryTypeId
Geometry types.
Definition Geometry.h:73
geos::geom::GEOS_MULTILINESTRING
@ GEOS_MULTILINESTRING
a collection of linestrings
Definition Geometry.h:85
geos::geom::GEOS_LINEARRING
@ GEOS_LINEARRING
a linear ring (linestring with 1st point == last point)
Definition Geometry.h:79
geos::geom::GEOS_GEOMETRYCOLLECTION
@ GEOS_GEOMETRYCOLLECTION
a collection of heterogeneus geometries
Definition Geometry.h:89
geos::geom::GEOS_POINT
@ GEOS_POINT
a point
Definition Geometry.h:75
geos::geom::GEOS_LINESTRING
@ GEOS_LINESTRING
a linestring
Definition Geometry.h:77
geos::geom::GEOS_POLYGON
@ GEOS_POLYGON
a polygon
Definition Geometry.h:81
geos::geom::GEOS_MULTIPOLYGON
@ GEOS_MULTIPOLYGON
a collection of polygons
Definition Geometry.h:87
geos::geom::GEOS_MULTIPOINT
@ GEOS_MULTIPOINT
a collection of points
Definition Geometry.h:83
geos::io
Contains the interfaces for converting JTS objects to and from other formats.
Definition Geometry.h:65
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38