Isis Developer Reference
Isis::GisTopology Class Reference

This class models GIS topology. More...

#include <GisTopology.h>

Collaboration diagram for Isis::GisTopology:
Collaboration graph

Public Types

enum  Disposition { DestroyGeometry , PreserveGeometry }
 Enumeration to indicate whether the geometry should be preserved. More...
 

Public Member Functions

GEOSGeometry * geomFromWKB (const QString &wkb)
 Reads in the geometry from the given well-known binary formatted string.
 
GEOSGeometry * geomFromWKT (const QString &wkt)
 Reads in the geometry from the given well-known text formatted string.
 
GEOSGeometry * clone (const GEOSGeometry *geom) const
 Clones the given GEOSGeometry pointer.
 
const GEOSPreparedGeometry * preparedGeometry (const GEOSGeometry *geom) const
 Gets a GEOSPreparedGeometry from the given GEOSGeometry.
 
QString wkb (const GEOSGeometry *geom, const Disposition &disp=PreserveGeometry)
 Writes a well-known binary string from the given geometry.
 
QString wkt (const GEOSGeometry *geom, const Disposition &disp=PreserveGeometry)
 Writes a well-known text string from the given geometry.
 
void destroy (GEOSGeometry *geom) const
 Destroys the given GEOS geometry.
 
void destroy (const GEOSGeometry *geom) const
 Destroys the given GEOS geometry.
 
void destroy (const GEOSPreparedGeometry *ppgeom) const
 Destroys the given prepared GEOS geometry.
 
void destroy (GEOSCoordSequence *sequence) const
 Destroys the given GEOS coordinate sequence.
 
void destroy (const unsigned char *geos_text) const
 Destroys the given unsigned GEOS text geometry representation.
 
void destroy (const char *geos_text) const
 Destroys the given GEOS text geometry representation.
 

Static Public Member Functions

static GisTopologyinstance ()
 Gets the singleton instance of this class.
 

Detailed Description

This class models GIS topology.

This class allows us to create GEOS geometries from well-known binary (WKB) strings or well-known text (WKT) strings. It also allows us to create WKB or WKT strings from a GEOS geometry.

Author
2012-07-15 Kris Becker

Member Enumeration Documentation

◆ Disposition

Enumeration to indicate whether the geometry should be preserved.

Enumerator
DestroyGeometry 

Destroy the geometry.

PreserveGeometry 

Preserve the geometry.

Member Function Documentation

◆ clone()

GEOSGeometry * Isis::GisTopology::clone ( const GEOSGeometry * geom) const

Clones the given GEOSGeometry pointer.

Parameters
geomA pointer to the GEOSGeometry object to be cloned.
Returns
GEOSGeometry* A clone of the given GEOSGeometry pointer.

◆ destroy() [1/6]

void Isis::GisTopology::destroy ( const char * geos_text) const

Destroys the given GEOS text geometry representation.


Parameters
geos_textA pointer to the GEOS text char to be destroyed.

◆ destroy() [2/6]

void Isis::GisTopology::destroy ( const GEOSGeometry * geom) const

Destroys the given GEOS geometry.


Parameters
geomA pointer to the GEOSGeometry to be destroyed.

◆ destroy() [3/6]

void Isis::GisTopology::destroy ( const GEOSPreparedGeometry * geom) const

Destroys the given prepared GEOS geometry.


Parameters
geomA pointer to the GEOSPreparedGeometry to be destroyed.

◆ destroy() [4/6]

void Isis::GisTopology::destroy ( const unsigned char * geos_text) const

Destroys the given unsigned GEOS text geometry representation.

Parameters
geos_textA pointer to the GEOS text char to be destroyed.

◆ destroy() [5/6]

void Isis::GisTopology::destroy ( GEOSCoordSequence * sequence) const

Destroys the given GEOS coordinate sequence.


Parameters
sequenceA pointer to the GEOSCoordSequence to be destroyed.

◆ destroy() [6/6]

void Isis::GisTopology::destroy ( GEOSGeometry * geom) const

Destroys the given GEOS geometry.


Parameters
geomA pointer to the GEOSGeometry to be destroyed.

◆ geomFromWKB()

GEOSGeometry * Isis::GisTopology::geomFromWKB ( const QString & wkb)

Reads in the geometry from the given well-known binary formatted string.

Parameters
wkbThe well-known binary formatted string containing the geometry information to be parsed.
Returns
GEOSGeometry* A pointer to a GEOSGeometry object created from the parsed wkb.
Exceptions
IException::Programmer"Unable convert the given well-known binary to a GEOSGeometry.

References _FILEINFO_.

◆ geomFromWKT()

GEOSGeometry * Isis::GisTopology::geomFromWKT ( const QString & wkt)

Reads in the geometry from the given well-known text formatted string.

Parameters
wktThe well-known text formatted string containing the geometry information to be parsed.
Returns
GEOSGeometry* A pointer to a GEOSGeometry object created from the parsed wkt.
Exceptions
IException::Programmer"Unable convert the given well-known text to a GEOSGeometry.

References _FILEINFO_.

◆ instance()

GisTopology * Isis::GisTopology::instance ( )
static

◆ preparedGeometry()

const GEOSPreparedGeometry * Isis::GisTopology::preparedGeometry ( const GEOSGeometry * geom) const

Gets a GEOSPreparedGeometry from the given GEOSGeometry.

Parameters
geomA pointer to a GEOSGeometry object to be converted.
Returns
GEOSPreparedGeometry A pointer to a prepared geometry from the given geometry pointer.
Exceptions
IException::Programmer"Unable to convert the given GEOSGeometry to a GEOSPreparedGeometry."

References _FILEINFO_.

◆ wkb()

QString Isis::GisTopology::wkb ( const GEOSGeometry * geom,
const Disposition & disp = PreserveGeometry )

Writes a well-known binary string from the given geometry.

This method will destroy the given GEOSGeometry pointer if so indicated by the given Disposition enumeration.

Parameters
geomA pointer to the geometry to be represented as a WKT string
dispA reference to a topology disposition enumeration indicating whether to preserve or destroy the passed in geometry.
Returns
QString A well-known binary string containg the geometry information.

◆ wkt()

QString Isis::GisTopology::wkt ( const GEOSGeometry * geom,
const Disposition & disp = PreserveGeometry )

Writes a well-known text string from the given geometry.

This method will destroy the given GEOSGeometry pointer if so indicated by the given Disposition enumeration.

Parameters
geomA pointer to the geometry to be represented as a WKT string
dispA reference to a topology disposition enumeration indicating whether to preserve or destroy the passed in geometry.
Returns
QString A well-known text string containg the geometry information.

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