Loading...
Searching...
No Matches
HydroCouple::Spatial::IGeometry Class Referenceabstract

IGeometry is the root class of the geometry hierarchy. More...

#include <hydrocouplespatial.h>

Inheritance diagram for HydroCouple::Spatial::IGeometry:
Collaboration diagram for HydroCouple::Spatial::IGeometry:

Public Types

enum class  GeometryType {
  Geometry = 0 ,
  Point = 1 ,
  LineString = 2 ,
  Polygon = 3 ,
  Triangle = 17 ,
  MultiPoint = 4 ,
  MultiLineString = 5 ,
  MultiPolygon = 6 ,
  GeometryCollection = 7 ,
  CircularString = 8 ,
  CompoundCurve = 9 ,
  CurvePolygon = 10 ,
  MultiCurve = 11 ,
  MultiSurface = 12 ,
  Curve = 13 ,
  Surface = 14 ,
  PolyhedralSurface = 15 ,
  TIN = 16 ,
  GeometryZ = 1000 ,
  PointZ = 1001 ,
  LineStringZ = 1002 ,
  PolygonZ = 1003 ,
  TriangleZ = 1017 ,
  MultiPointZ = 1004 ,
  MultiLineStringZ = 1005 ,
  MultiPolygonZ = 1006 ,
  GeometryCollectionZ = 1007 ,
  CircularStringZ = 1008 ,
  CompoundCurveZ = 1009 ,
  CurvePolygonZ = 1010 ,
  MultiCurveZ = 1011 ,
  MultiSurfaceZ = 1012 ,
  CurveZ = 1013 ,
  SurfaceZ = 1014 ,
  PolyhedralSurfaceZ = 1015 ,
  TINZ = 1016 ,
  GeometryM = 2000 ,
  PointM = 2001 ,
  LineStringM = 2002 ,
  PolygonM = 2003 ,
  TriangleM = 2017 ,
  MultiPointM = 2004 ,
  MultiLineStringM = 2005 ,
  MultiPolygonM = 2006 ,
  GeometryCollectionM = 2007 ,
  CircularStringM = 2008 ,
  CompoundCurveM = 2009 ,
  CurvePolygonM = 2010 ,
  MultiCurveM = 2011 ,
  MultiSurfaceM = 2012 ,
  CurveM = 2013 ,
  SurfaceM = 2014 ,
  PolyhedralSurfaceM = 2015 ,
  TINM = 2016 ,
  GeometryZM = 3000 ,
  PointZM = 3001 ,
  LineStringZM = 3002 ,
  PolygonZM = 3003 ,
  TriangleZM = 3017 ,
  MultiPointZM = 3004 ,
  MultiLineStringZM = 3005 ,
  MultiPolygonZM = 3006 ,
  GeometryCollectionZM = 3007 ,
  CircularStringZM = 3008 ,
  CompoundCurveZM = 3009 ,
  CurvePolygonZM = 3010 ,
  MultiCurveZM = 3011 ,
  MultiSurfaceZM = 3012 ,
  CurveZM = 3013 ,
  SurfaceZM = 3014 ,
  PolyhedralSurfaceZM = 3015 ,
  TINZM = 3016
}
 The type of IGeometry. More...
 

Public Member Functions

virtual ~IGeometry ()=default
 IGeometry destructor.
 
virtual const std::string & id () const =0
 id of the geometry.
 
virtual int64_t index () const =0
 index of the geometry if it is part of a collection.
 
virtual int dimension () const =0
 The inherent dimension of this geometric object, which must be less than or equal to the coordinate dimension.
 
virtual int coordinateDimension () const =0
 Get the dimension of the coordinates in this object.
 
virtual GeometryType geometryType () const =0
 Gets the geometry type of this object.
 
virtual ISpatialReferenceSystem * spatialReferenceSystem () const =0
 Spatial reference system of geometric object.
 
virtual IEnvelope * envelope () const =0
 The minimum bounding box for this Geometry.
 
virtual std::string getWKT () const =0
 Exports this geometric object to a specific Well-known Text Representation of Geometry.
 
virtual std::vector< unsigned char > getWKB () const =0
 Exports this geometric object to a specific Well-known byte Representation of Geometry.
 
virtual bool isEmpty () const =0
 If true, then this geometric object represents the empty point set ∅ for the coordinate space.
 
virtual bool isSimple () const =0
 Returns true if this geometric object has no anomalous geometric points, such as self intersection or self tangency.
 
virtual bool is3D () const =0
 
virtual bool isMeasured () const =0
 
virtual std::unique_ptr< IGeometry > boundary () const =0
 Returns the closure of the combinatorial boundary of this geometric object (Reference [1], section 3.12.2).
 
Query

Query functions

virtual bool equals (const IGeometry &geom) const =0
 
virtual bool disjoint (const IGeometry &geom) const =0
 
virtual bool intersects (const IGeometry &geom) const =0
 
virtual bool touches (const IGeometry &geom) const =0
 
virtual bool crosses (const IGeometry &geom) const =0
 
virtual bool within (const IGeometry &geom) const =0
 
virtual bool contains (const IGeometry &geom) const =0
 
virtual bool overlaps (const IGeometry &geom) const =0
 
virtual bool relate (const IGeometry &geom, const std::string &intersectionPatternMatrix) const =0
 Tests the DE-9IM relationship between this geometry and geom.
 
virtual std::unique_ptr< IGeometry > locateAlong (double value) const =0
 
virtual std::unique_ptr< IGeometry > locateBetween (double mStart, double mEnd) const =0
 
Spatial Analysis

Spatial analysis functions.

Every geometry-valued result is a newly constructed object owned by the caller (see the ownership convention in hydrocouple.h); nullptr means the operation is not supported by this implementation.

virtual double distance (const IGeometry &geom) const =0
 Returns the shortest distance between any two Points in the two geometric objects as calculated in the spatial reference system of this geometric object.
 
virtual std::unique_ptr< IGeometry > buffer (double bufferDistance) const =0
 Returns a geometric object that represents all Points whose distance from this geometric object is less than or equal to distance.
 
virtual std::unique_ptr< IGeometry > convexHull () const =0
 
virtual std::unique_ptr< IGeometry > intersection (const IGeometry &geom) const =0
 
virtual std::unique_ptr< IGeometry > unionG (const IGeometry &geom) const =0
 
virtual std::unique_ptr< IGeometry > difference (const IGeometry &geom) const =0
 
virtual std::unique_ptr< IGeometry > symmetricDifference (const IGeometry &geom) const =0
 

Detailed Description

IGeometry is the root class of the geometry hierarchy.

Member Enumeration Documentation

◆ GeometryType

The type of IGeometry.

Enumerator
Geometry 
Point 
LineString 
Polygon 
Triangle 
MultiPoint 
MultiLineString 
MultiPolygon 
GeometryCollection 
CircularString 
CompoundCurve 
CurvePolygon 
MultiCurve 
MultiSurface 
Curve 
Surface 
PolyhedralSurface 
TIN 
GeometryZ 
PointZ 
LineStringZ 
PolygonZ 
TriangleZ 
MultiPointZ 
MultiLineStringZ 
MultiPolygonZ 
GeometryCollectionZ 
CircularStringZ 
CompoundCurveZ 
CurvePolygonZ 
MultiCurveZ 
MultiSurfaceZ 
CurveZ 
SurfaceZ 
PolyhedralSurfaceZ 
TINZ 
GeometryM 
PointM 
LineStringM 
PolygonM 
TriangleM 
MultiPointM 
MultiLineStringM 
MultiPolygonM 
GeometryCollectionM 
CircularStringM 
CompoundCurveM 
CurvePolygonM 
MultiCurveM 
MultiSurfaceM 
CurveM 
SurfaceM 
PolyhedralSurfaceM 
TINM 
GeometryZM 
PointZM 
LineStringZM 
PolygonZM 
TriangleZM 
MultiPointZM 
MultiLineStringZM 
MultiPolygonZM 
GeometryCollectionZM 
CircularStringZM 
CompoundCurveZM 
CurvePolygonZM 
MultiCurveZM 
MultiSurfaceZM 
CurveZM 
SurfaceZM 
PolyhedralSurfaceZM 
TINZM 

Constructor & Destructor Documentation

◆ ~IGeometry()

virtual HydroCouple::Spatial::IGeometry::~IGeometry ( )
virtualdefault

IGeometry destructor.

Member Function Documentation

◆ boundary()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::boundary ( ) const
nodiscardpure virtual

Returns the closure of the combinatorial boundary of this geometric object (Reference [1], section 3.12.2).

Because the result of this function is a closure, and hence topologically closed, the resulting boundary can be represented using representational Geometry primitives (Reference [1], section 3.12.2).

Returns
A newly constructed geometry owned by the caller.

◆ buffer()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::buffer ( double bufferDistance) const
nodiscardpure virtual

Returns a geometric object that represents all Points whose distance from this geometric object is less than or equal to distance.

Calculations are in the spatial reference system of this geometric object. Because of the limitations of linear interpolation, there will often be some relatively small error in this distance, but it should be near the resolution of the coordinates used.

◆ contains()

virtual bool HydroCouple::Spatial::IGeometry::contains ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially contains to geom.

◆ convexHull()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::convexHull ( ) const
nodiscardpure virtual
Returns
a geometric object that represents the convex hull of this geometric object.

Convex hulls, being dependent on straight lines, can be accurately represented in linear interpolations for any geometry restricted to linear interpolations.

◆ coordinateDimension()

virtual int HydroCouple::Spatial::IGeometry::coordinateDimension ( ) const
nodiscardpure virtual

Get the dimension of the coordinates in this object.

Returns
In practice this will return 2 or 3. It can also return 0 in the case of an empty point.

◆ crosses()

virtual bool HydroCouple::Spatial::IGeometry::crosses ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially crosses to geom.

◆ difference()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::difference ( const IGeometry & geom) const
nodiscardpure virtual
Returns
a geometric object that represents the Point set difference of this geometric object with geom.

◆ dimension()

virtual int HydroCouple::Spatial::IGeometry::dimension ( ) const
nodiscardpure virtual

The inherent dimension of this geometric object, which must be less than or equal to the coordinate dimension.

In non - homogeneous collections, this will return the largest topological dimension of the contained objects.

Returns
0 for points, 1 for lines and 2 for surfaces.

◆ disjoint()

virtual bool HydroCouple::Spatial::IGeometry::disjoint ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially disjoint to geom.

◆ distance()

virtual double HydroCouple::Spatial::IGeometry::distance ( const IGeometry & geom) const
nodiscardpure virtual

Returns the shortest distance between any two Points in the two geometric objects as calculated in the spatial reference system of this geometric object.

Because the geometries are closed, it is possible to find a point on each geometric object involved, such that the distance between these 2 points is the returned distance between their geometric objects.

◆ envelope()

virtual IEnvelope * HydroCouple::Spatial::IGeometry::envelope ( ) const
nodiscardpure virtual

The minimum bounding box for this Geometry.

Returns
A non-owning pointer to an envelope the geometry keeps current; valid until the geometry changes (see the ownership convention in hydrocouple.h).

◆ equals()

virtual bool HydroCouple::Spatial::IGeometry::equals ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially equal to geom.

◆ geometryType()

virtual GeometryType HydroCouple::Spatial::IGeometry::geometryType ( ) const
nodiscardpure virtual

Gets the geometry type of this object.

Returns
A GeometryType enum value representing the instantiable subtype of Geometry of which this geometric object is a member.

◆ getWKB()

virtual std::vector< unsigned char > HydroCouple::Spatial::IGeometry::getWKB ( ) const
nodiscardpure virtual

Exports this geometric object to a specific Well-known byte Representation of Geometry.

◆ getWKT()

virtual std::string HydroCouple::Spatial::IGeometry::getWKT ( ) const
nodiscardpure virtual

Exports this geometric object to a specific Well-known Text Representation of Geometry.

Returns
Well-known Text Representation of Geometry.

◆ id()

virtual const std::string & HydroCouple::Spatial::IGeometry::id ( ) const
nodiscardpure virtual

id of the geometry.

Returns
id of the geometry.

◆ index()

virtual int64_t HydroCouple::Spatial::IGeometry::index ( ) const
nodiscardpure virtual

index of the geometry if it is part of a collection.

Returns
index of the geometry in a collection.
Here is the caller graph for this function:

◆ intersection()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::intersection ( const IGeometry & geom) const
nodiscardpure virtual
Returns
a geometric object that represents the Point set intersection of this geometric object with geom.

◆ intersects()

virtual bool HydroCouple::Spatial::IGeometry::intersects ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially intersects to geom.

◆ is3D()

virtual bool HydroCouple::Spatial::IGeometry::is3D ( ) const
nodiscardpure virtual
Returns
true if this geometric object has z coordinate values.

◆ isEmpty()

virtual bool HydroCouple::Spatial::IGeometry::isEmpty ( ) const
nodiscardpure virtual

If true, then this geometric object represents the empty point set ∅ for the coordinate space.

Returns
true if this geometric object is the empty Geometry.

◆ isMeasured()

virtual bool HydroCouple::Spatial::IGeometry::isMeasured ( ) const
nodiscardpure virtual
Returns
true if this geometric object has m coordinate values.

◆ isSimple()

virtual bool HydroCouple::Spatial::IGeometry::isSimple ( ) const
nodiscardpure virtual

Returns true if this geometric object has no anomalous geometric points, such as self intersection or self tangency.

The description of each instantiable geometric class will include the specific conditions that cause an instance of that class to be classified as not simple.

◆ locateAlong()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::locateAlong ( double value) const
nodiscardpure virtual
Returns
a derived geometry collection value that matches the specified m coordinate value; owned by the caller.

◆ locateBetween()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::locateBetween ( double mStart,
double mEnd ) const
nodiscardpure virtual
Returns
a derived geometry collection value that matches the specified range of m coordinate values inclusively; owned by the caller.

◆ overlaps()

virtual bool HydroCouple::Spatial::IGeometry::overlaps ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially overlaps to geom.

◆ relate()

virtual bool HydroCouple::Spatial::IGeometry::relate ( const IGeometry & geom,
const std::string & intersectionPatternMatrix ) const
nodiscardpure virtual

Tests the DE-9IM relationship between this geometry and geom.

Parameters
[in]geomthe other geometry.
[in]intersectionPatternMatrixa 9-character DE-9IM pattern over {T, F, *, 0, 1, 2} in the order II, IB, IE, BI, BB, BE, EI, EB, EE (OGC SFA 6.1.2.3), e.g. "T*F**F***" for within.
Returns
true if the intersections of the interiors, boundaries and exteriors of the two geometries match the pattern.

◆ spatialReferenceSystem()

virtual ISpatialReferenceSystem * HydroCouple::Spatial::IGeometry::spatialReferenceSystem ( ) const
nodiscardpure virtual

Spatial reference system of geometric object.

◆ symmetricDifference()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::symmetricDifference ( const IGeometry & geom) const
nodiscardpure virtual
Returns
a geometric object that represents the Point set symmetric difference of this geometric object with geom.

◆ touches()

virtual bool HydroCouple::Spatial::IGeometry::touches ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially touches to geom.

◆ unionG()

virtual std::unique_ptr< IGeometry > HydroCouple::Spatial::IGeometry::unionG ( const IGeometry & geom) const
nodiscardpure virtual
Returns
a geometric object that represents the Point set union of this geometric object with geom.

◆ within()

virtual bool HydroCouple::Spatial::IGeometry::within ( const IGeometry & geom) const
nodiscardpure virtual
Returns
true if this geometric object is spatially within to geom.

The documentation for this class was generated from the following file: