Deep Learning SDK for Geospatial Data
 1.0.0+
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Geometry

Detailed Description

Contains geometric representation functionality.

Modules

 Processing
 Geometry-related processing pipeline components.
 

Classes

class  dg::deepcore::geometry::BasicRegionFilter
 Filters rectangles based on a condition. More...
 
struct  dg::deepcore::geometry::Geometry
 Base struct for geometric representations. More...
 
struct  dg::deepcore::geometry::LinearRing
 Derived struct for a Linear Ring, which is a Line String with co-located first and last points. More...
 
struct  dg::deepcore::geometry::LineString
 Derived struct for a Line String. More...
 
class  dg::deepcore::geometry::MaskedRegionFilter
 Filters rectangles based on a condition using a computational grid for efficient querying of overlapping rectangles. More...
 
class  dg::deepcore::geometry::PassthroughRegionFilter
 All-pass filter. More...
 
struct  dg::deepcore::geometry::Point
 Derived struct for a two-dimensional Point. More...
 
struct  dg::deepcore::geometry::Polygon
 Derived struct for a Polygon. More...
 
struct  dg::deepcore::geometry::QuadRect
 A rectangle that splits into 4 pieces. More...
 
struct  dg::deepcore::geometry::SplitQuadRect
 a QuadRect Split into 4 QuadRects More...
 
class  dg::deepcore::geometry::RegionFilter
 Abstract base class representing a functor to filter rectangles based on a condition. More...
 

Enumerations

enum  dg::deepcore::geometry::GeometryType {
  dg::deepcore::geometry::GeometryType::UNKNOWN = 0, dg::deepcore::geometry::GeometryType::POINT = 1, dg::deepcore::geometry::GeometryType::LINE_STRING = 2, dg::deepcore::geometry::GeometryType::POLYGON = 3,
  dg::deepcore::geometry::GeometryType::LINEAR_RING = 101
}
 Represents a geometry type, aligning to OGRwkbGeometryType. More...
 
enum  dg::deepcore::geometry::WkbVariant { dg::deepcore::geometry::WkbVariant::WKB_VARIANT_OLD_OGC, dg::deepcore::geometry::WkbVariant::WKB_VARIANT_ISO, dg::deepcore::geometry::WkbVariant::WKB_VARIANT_POST_GIS1 }
 Represents a well known binary(wkb) variant aligning to OGRwkbVariant used for well-known text(wkt) output. More...
 

Functions

virtual OGRGeometry * dg::deepcore::geometry::Geometry::toOgr () const =0
 Return a raw OGRGeometry pointer converted from this deepcore Geometry. More...
 
virtual geos::geom::Geometry * dg::deepcore::geometry::Geometry::toGeos (const geos::geom::GeometryFactory &factory) const =0
 Return a raw GEOS Geometry pointer converted from this deepcore Geometry. More...
 
virtual std::string dg::deepcore::geometry::Geometry::toWkt (WkbVariant eWkbVariant=WkbVariant::WKB_VARIANT_OLD_OGC) const
 Return the WKT representation of this geometry as a string. More...
 
virtual std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::transform (const Transformation &transformation) const =0
 Transform the coordinates of the geometry using the given transformation. More...
 
virtual GeometryType dg::deepcore::geometry::Geometry::type () const =0
 Return the GeometryType of this Geometry. More...
 
virtual bool dg::deepcore::geometry::Geometry::operator== (const Geometry &other) const =0
 Return whether this Geometry is approximately equal to another. More...
 
bool dg::deepcore::geometry::Geometry::operator!= (const Geometry &other)
 Return whether this Geometry is approximately equal to another. More...
 
static std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::from (const OGRGeometry &ogrGeometry)
 Return a unique Geometry pointer converted from a given OGRGeometry. More...
 
static std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::from (const geos::geom::Geometry &geosGeometry)
 Return a unique Geometry pointer converted from a given GEOS Geometry. More...
 
static std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::fromWkt (const std::string &wkt)
 Return a unique Geometry pointer converted from a given WKT string;. More...
 
void dg::deepcore::geometry::initGdal ()
 Initialize GDAL.This must be called on each thread that calls GDAL. It may be called multiple times and is thread safe. More...
 

Enumeration Type Documentation

Represents a geometry type, aligning to OGRwkbGeometryType.

Enumerator
UNKNOWN 

Unknown geometry type.

POINT 

Point.

LINE_STRING 

LineString.

POLYGON 

Polygon.

LINEAR_RING 

LinearRing.

Represents a well known binary(wkb) variant aligning to OGRwkbVariant used for well-known text(wkt) output.

Enumerator
WKB_VARIANT_OLD_OGC 

Old-style 99-402 extended dimension (Z) WKB types.

WKB_VARIANT_ISO 

SFSQL 1.2 and ISO SQL/MM Part 3 extended dimension (Z&M) WKB types.

WKB_VARIANT_POST_GIS1 

PostGIS 1.X has different codes for CurvePolygon, MultiCurve and MultiSurface.

Function Documentation

std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::from ( const OGRGeometry &  ogrGeometry)
static

Return a unique Geometry pointer converted from a given OGRGeometry.

Parameters
[in]ogrGeometryThe OGRGeometry to convert
Returns
The unique Geometry pointer.
Exceptions
Errorif geometry type is unsupported by Deepcore.
std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::from ( const geos::geom::Geometry &  geosGeometry)
static

Return a unique Geometry pointer converted from a given GEOS Geometry.

Parameters
[in]geosGeometryThe GEOS Geometry to convert
Returns
The unique Geometry pointer.
Exceptions
Errorif geometry type is unsupported by Deepcore.
std::unique_ptr< Geometry > dg::deepcore::geometry::Geometry::fromWkt ( const std::string &  wkt)
static

Return a unique Geometry pointer converted from a given WKT string;.

Parameters
[in]wktThe WKT string
Returns
The unique Geometry pointer, owned by the caller.
Note
LINEARRING will not parse directly and cause an error.
Exceptions
Errorif gdal cannot parse the wkt string
void dg::deepcore::geometry::initGdal ( )

Initialize GDAL.This must be called on each thread that calls GDAL. It may be called multiple times and is thread safe.

bool dg::deepcore::geometry::Geometry::operator!= ( const Geometry other)

Return whether this Geometry is approximately equal to another.

Parameters
[in]otherthe Geometry to compare to this geometry.
Returns
True if geometry types are not equivalent, false if geometry types are equivalent, contains the same number of underlying points, and all underlying points are approximately equivalent
virtual bool dg::deepcore::geometry::Geometry::operator== ( const Geometry other) const
pure virtual

Return whether this Geometry is approximately equal to another.

Parameters
[in]otherthe Geometry to compare to this geometry.
Returns
False if geometry types are not equivalent, true if geometry types are equivalent, contains the same number of underlying points, and all underlying points are approximately equivalent

Implemented in dg::deepcore::geometry::Polygon, dg::deepcore::geometry::Point, dg::deepcore::geometry::LineString, and dg::deepcore::geometry::LinearRing.

virtual geos::geom::Geometry* dg::deepcore::geometry::Geometry::toGeos ( const geos::geom::GeometryFactory &  factory) const
pure virtual

Return a raw GEOS Geometry pointer converted from this deepcore Geometry.

Parameters
[in]factoryThe Geos GeometryFactory used to create the geos Geometry. This factory must be used to destroy the geometry.
Returns
The raw GEOS Geometry pointer, owned by the caller.

Implemented in dg::deepcore::geometry::Polygon, dg::deepcore::geometry::Point, dg::deepcore::geometry::LineString, and dg::deepcore::geometry::LinearRing.

virtual OGRGeometry* dg::deepcore::geometry::Geometry::toOgr ( ) const
pure virtual

Return a raw OGRGeometry pointer converted from this deepcore Geometry.

Returns
The raw OGRGeometry pointer, owned by the caller.
Exceptions
Errorif GDAL fails to create an empty geometry.

Implemented in dg::deepcore::geometry::Polygon, dg::deepcore::geometry::Point, dg::deepcore::geometry::LineString, and dg::deepcore::geometry::LinearRing.

string dg::deepcore::geometry::Geometry::toWkt ( WkbVariant  eWkbVariant = WkbVariant::WKB_VARIANT_OLD_OGC) const
virtual

Return the WKT representation of this geometry as a string.

Parameters
[in]eWkbVariantThe Wkb variant specification as described by GDAL/OGR
Returns
The WKT representation of this geometry.
Exceptions
Errorif GDAL fails to convert geometry to WKT.
virtual std::unique_ptr<Geometry> dg::deepcore::geometry::Geometry::transform ( const Transformation transformation) const
pure virtual

Transform the coordinates of the geometry using the given transformation.

Returns
The transformed geometry

Implemented in dg::deepcore::geometry::Polygon, dg::deepcore::geometry::Point, dg::deepcore::geometry::LineString, and dg::deepcore::geometry::LinearRing.

virtual GeometryType dg::deepcore::geometry::Geometry::type ( ) const
pure virtual

Return the GeometryType of this Geometry.

Returns
The GeometryType of this Geometry.

Implemented in dg::deepcore::geometry::Polygon, dg::deepcore::geometry::Point, dg::deepcore::geometry::LineString, and dg::deepcore::geometry::LinearRing.