Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards. More...
#include <Geometry.h>
Public Types | |
| typedef void | ReturnType |
| typedef Visitor | VisitorType |
Public Member Functions | |
| virtual ReturnType | accept (VisitorType &guest) const=0 |
| It call the visit method from the guest object. | |
| virtual AbstractData * | clone () const =0 |
| It returns a clone of this object. | |
Initializer methods on geometric objects | |
Methods for initializing a geometric object. | |
| Geometry (GeomType t, int srid=0, Envelope *mbr=0) _NOEXCEPT_OP(true) | |
| It initializes the Geometry with the specified spatial reference system id and envelope. | |
| Geometry (const Geometry &rhs) _NOEXCEPT_OP(true) | |
| Copy constructor. | |
| virtual | ~Geometry () |
| Virtual destructor. | |
| virtual Geometry & | operator= (const Geometry &rhs) _NOEXCEPT_OP(true) |
| Assignment operator. | |
Basic Geometry Methods | |
Basic methods on geometric objects. | |
| virtual Dimensionality | getDimension () const _NOEXCEPT_OP(true)=0 |
| It returns the geometric object dimension (0, 1 or 2). | |
| int | getCoordinateDimension () const _NOEXCEPT_OP(true) |
| It returns the number of measurements or axes needed to describe a position in a coordinate system. | |
| virtual const std::string & | getGeometryType () const _NOEXCEPT_OP(true)=0 |
| It returns the name of the geometry subclass. | |
| GeomType | getGeomTypeId () const _NOEXCEPT_OP(true) |
| It returns the geometry subclass type identifier. | |
| virtual const std::string | get2DGeometryType () const _NOEXCEPT_OP(true) |
| It returns the name of 2D geometry subclass. | |
| virtual GeomType | get2DGeomTypeId () const _NOEXCEPT_OP(true) |
| It returns the 2D geometry subclass type identifier. | |
| int | getSRID () const _NOEXCEPT_OP(true) |
| It returns the Spatial Reference System ID associated to this geometric object. | |
| virtual void | setSRID (int srid) _NOEXCEPT_OP(true)=0 |
| It sets the Spatial Reference System ID of the geometry and all its parts if it is a GeometryCollection (or a Multi). | |
| virtual void | transform (const int &srid) _NOEXCEPT_OP(false) |
| It converts the coordinate values of the geometry to the new spatial reference system. | |
| virtual void | convert (te::srs::Converter *converter) _NOEXCEPT_OP(false)=0 |
| It converts the coordinate values of the geometry to the new spatial reference system. | |
| Geometry * | getEnvelope () const _NOEXCEPT_OP(true) |
| It returns the minimum bounding rectangle (MBR) for the geometry. | |
| const Envelope * | getMBR () const _NOEXCEPT_OP(true) |
| It returns the minimum bounding rectangle for the geometry in an internal representation. | |
| virtual void | computeMBR (bool cascade) const _NOEXCEPT_OP(true)=0 |
| It computes the minimum bounding rectangle for the geometry. | |
| std::string | asText () const _NOEXCEPT_OP(true) |
| It returns an string with the Well-Known Text Representation for the geometry. | |
| char * | asBinary (std::size_t &size) const _NOEXCEPT_OP(false) |
| It serializes the geometric object to a Well-known Binary Representation (WKB). | |
| std::size_t | getWkbSize () const _NOEXCEPT_OP(true) |
| It returns the size required by a WKB representation for this geometric object. | |
| void | getWkb (char *wkb, te::common::MachineByteOrder byteOrder) const _NOEXCEPT_OP(false) |
| It serializes the geometry to a WKB representation into the specified buffer. | |
| virtual bool | isEmpty () const _NOEXCEPT_OP(false) |
| It returns true if this geometric object is the empty Geometry. | |
| virtual bool | isSimple () const _NOEXCEPT_OP(false) |
| It returns true if this geometric object has no anomalous points, such as self intersection or self tangency. | |
| virtual bool | isValid () const _NOEXCEPT_OP(false) |
| It tells if the geometry is well formed. | |
| bool | is3D () const _NOEXCEPT_OP(true) |
| It returns true if this geometric object has z coordinate values. | |
| bool | isMeasured () const _NOEXCEPT_OP(true) |
| It returns true if this geometric object has m coordinate values. | |
| bool | isCollection () const _NOEXCEPT_OP(true) |
| It returns true if this geometric object is a collection. | |
| virtual Geometry * | getBoundary () const _NOEXCEPT_OP(false) |
| It returns the geometry boundary. | |
| te::gm::Coord2D | getCentroid () const _NOEXCEPT_OP(false) |
| It will get the centroid of the input geometries. | |
| virtual std::size_t | getNPoints () const _NOEXCEPT_OP(true)=0 |
| it returns the number of points (vertexes) in the geometry. | |
Spatial Relations | |
Methods for testing spatial relations between geometric objects. Please, see OGC specification for a in depth definition of each spatial operation. | |
| virtual bool | equals (const Geometry *const rhs, const bool exact=false) const _NOEXCEPT_OP(false) |
| It returns true if the geometry object is spatially equal to rhs geometry. | |
| virtual bool | disjoint (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if the geometry object is spatially disjoint from rhs geometry. | |
| virtual bool | intersects (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if the geometry object spatially intersects rhs geometry. | |
| virtual bool | touches (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if the geometry object spatially touches rhs geometry. | |
| virtual bool | crosses (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if the geometry object spatially crosses rhs geometry. | |
| virtual bool | within (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if the geometry object is spatially within rhs geometry. | |
| virtual bool | contains (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if this geometry object spatially contains rhs geometry. | |
| virtual bool | overlaps (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if this geometry object spatially overlaps rhs geometry. | |
| virtual bool | relate (const Geometry *const rhs, const std::string &matrix) const _NOEXCEPT_OP(false) |
| It returns true if this geometry object is spatially related to rhs geometry according to the pattern expressed by the intersection matrix. | |
| virtual std::string | relate (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns the spatial relation between this geometry object and the rhs geometry. | |
| virtual bool | covers (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if this geometry object spatially covers the rhs geometry. | |
| virtual bool | coveredBy (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns true if this geometry object is spatially covered by rhs geometry. | |
| virtual Geometry * | locateAlong (const double &mValue) const _NOEXCEPT_OP(false) |
| It returns a derived GeometryCollection value according to the specified coordinate value. | |
| virtual Geometry * | locateBetween (const double &mStart, const double &mEnd) const _NOEXCEPT_OP(false) |
| It returns a derived geometry collection value according to the range of coordinate values inclusively. | |
Spatial Analysis | |
Methods that support spatial analysis. | |
| virtual double | distance (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns the shortest distance between any two points in the two geometry objects. | |
| virtual Geometry * | buffer (const double &distance) const _NOEXCEPT_OP(false) |
| This method calculates the buffer of a geometry. | |
| virtual Geometry * | buffer (const double &distance, int quadrantSegments) const _NOEXCEPT_OP(false) |
| This method calculates the buffer of a geometry. | |
| virtual Geometry * | buffer (const double &distance, int quadrantSegments, BufferCapStyle endCapStyle) const _NOEXCEPT_OP(false) |
| This method calculates the buffer of a geometry. | |
| virtual Geometry * | convexHull () const _NOEXCEPT_OP(false) |
| This method calculates the Convex Hull of a geometry. | |
| virtual Geometry * | intersection (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns a geometric object that represents the point set intersection with another geometry. | |
| virtual Geometry * | Union (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns a geometric object that represents the point set union with another geometry. | |
| virtual Geometry * | difference (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns a geometric object that represents the point set difference with another geometry. | |
| virtual Geometry * | symDifference (const Geometry *const rhs) const _NOEXCEPT_OP(false) |
| It returns a geometric object that represents the point set symetric difference with another geometry. | |
| virtual bool | dWithin (const Geometry *const rhs, const double &distance) const _NOEXCEPT_OP(false) |
| It returns true if the geometries are within the specified distance. | |
Static Public Member Functions | |
Auxiliary Methods | |
Auxiliary Methods. | |
| static GeomType | getGeomTypeId (const std::string >ype) |
| It returns the TerraLib geometry type id given a type string (the type string must be in capital letters). | |
| static std::string | getGeomTypeString (const int &gId) |
| It returns the TerraLib geometry type string given a type id. | |
| static bool | isGeomType (const std::string &stype) |
| It tells if the given string is a geometry data type. | |
| static void | loadGeomTypeId () |
| It loads the internal MAP of geometry type names to geometry type ids. | |
AbstractData Re-implementation | |
Methods re-implemneted from AbstractData. | |
| GeomType | m_gType |
| Internal geometry type. | |
| int | m_srid |
| The Spatial Reference System code associated to the Geometry. | |
| Envelope * | m_mbr |
| The geometry minimum bounding rectangle. | |
| static std::map< std::string, GeomType > | sm_geomTypeMap |
| A set of geometry type names (in UPPER CASE). | |
| int | getTypeCode () const |
| It returns the data type code associated to the data value. | |
| std::string | toString () const |
| It returns the data value in a WKT representation. | |
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
The geometry model follows OGC Simple Feature Specification - SFS (Simple Feature Access - Part 1: Common Architecture) and ISO SQL/MM Spatial.
Definition at line 77 of file Geometry.h.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
It initializes the Geometry with the specified spatial reference system id and envelope.
| t | The internal geometry type. |
| srid | The Spatial Reference System ID associated to the geometry. |
| mbr | The envelope (minimum bounding rectangle of this geometry). |
References _NOEXCEPT_OP.
Referenced by te::gm::GeometryCollection::add(), buffer(), buffer(), buffer(), contains(), convexHull(), coveredBy(), covers(), crosses(), difference(), disjoint(), distance(), dWithin(), equals(), Geometry(), getBoundary(), getEnvelope(), te::gm::GeometryCollection::getGeometries(), te::gm::GeometryCollection::getGeometryN(), te::gm::GeometryCollection::getGeometryN(), intersection(), intersects(), locateAlong(), locateBetween(), operator=(), overlaps(), relate(), relate(), te::gm::GeometryCollection::setGeometryN(), symDifference(), touches(), Union(), within(), and ~Geometry().
| te::gm::Geometry::Geometry | ( | const Geometry & | rhs | ) |
|
virtual |
Virtual destructor.
References Geometry().
|
pure virtualinherited |
It call the visit method from the guest object.
| guest | The guest or visitor. |
| char * te::gm::Geometry::asBinary | ( | std::size_t & | size | ) | const |
It serializes the geometric object to a Well-known Binary Representation (WKB).
| size | The size in bytes of the returned WKB. |
| Exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and asBinary().
Referenced by asBinary().
| std::string te::gm::Geometry::asText | ( | ) | const |
It returns an string with the Well-Known Text Representation for the geometry.
References _NOEXCEPT_OP, and asText().
Referenced by asText(), and toString().
|
virtual |
This method calculates the buffer of a geometry.
| distance | Distance value. |
| std::exception | It will throw an exception if the operation could not be performed. |
References distance(), and Geometry().
|
virtual |
This method calculates the buffer of a geometry.
| distance | Distance value. |
| quadrantSegments | A specified number of segments used to approximate the curves. |
| std::exception | It will throw an exception if the operation could not be performed. |
References distance(), and Geometry().
|
virtual |
This method calculates the buffer of a geometry.
As in GEOS, the quadrantSegments argument allows controlling the accuracy of the approximation by specifying the number of line segments used to represent a quadrant of a circle.
| distance | Distance value. |
| quadrantSegments | A specified number of segments used to approximate the curves. |
| endCapStyle | It specifies the shape used at the ends of linestrings. |
| std::exception | It will throw an exception if the operation could not be performed. |
References distance(), and Geometry().
|
pure virtualinherited |
It returns a clone of this object.
Implemented in te::da::DataAccess, te::dt::Array, te::dt::ByteArray, te::dt::CompositeData, te::dt::Date, te::dt::DateDuration, te::dt::DatePeriod, te::dt::OrdinalInstant, te::dt::OrdinalPeriod, te::dt::SimpleData< T, typeCode >, te::dt::SimpleData< bool, BOOLEAN_TYPE >, te::dt::SimpleData< bool, BOOLEAN_TYPE >, te::dt::SimpleData< boost::int16_t, INT16_TYPE >, te::dt::SimpleData< boost::int16_t, INT16_TYPE >, te::dt::SimpleData< boost::int32_t, INT32_TYPE >, te::dt::SimpleData< boost::int32_t, INT32_TYPE >, te::dt::SimpleData< boost::int64_t, INT64_TYPE >, te::dt::SimpleData< boost::int64_t, INT64_TYPE >, te::dt::SimpleData< boost::uint16_t, UINT16_TYPE >, te::dt::SimpleData< boost::uint16_t, UINT16_TYPE >, te::dt::SimpleData< boost::uint32_t, UINT32_TYPE >, te::dt::SimpleData< boost::uint32_t, UINT32_TYPE >, te::dt::SimpleData< boost::uint64_t, UINT64_TYPE >, te::dt::SimpleData< boost::uint64_t, UINT64_TYPE >, te::dt::SimpleData< char, CHAR_TYPE >, te::dt::SimpleData< char, CHAR_TYPE >, te::dt::SimpleData< double, DOUBLE_TYPE >, te::dt::SimpleData< double, DOUBLE_TYPE >, te::dt::SimpleData< float, FLOAT_TYPE >, te::dt::SimpleData< float, FLOAT_TYPE >, te::dt::SimpleData< std::string, NUMERIC_TYPE >, te::dt::SimpleData< std::string, NUMERIC_TYPE >, te::dt::SimpleData< std::string, STRING_TYPE >, te::dt::SimpleData< std::string, STRING_TYPE >, te::dt::SimpleData< T *, typeCode >, te::dt::SimpleData< T *, typeCode >, te::dt::SimpleData< unsigned char, UCHAR_TYPE >, te::dt::SimpleData< unsigned char, UCHAR_TYPE >, te::dt::TimeDuration, te::dt::TimeInstant, te::dt::TimeInstantTZ, te::dt::TimePeriod, te::dt::TimePeriodTZ, te::gdal::Raster, te::gm::CircularString, te::gm::CompoundCurve, te::gm::CurvePolygon, te::gm::GeometryCollection, te::gm::Line, te::gm::LinearRing, te::gm::LineString, te::gm::MultiCurve, te::gm::MultiLineString, te::gm::MultiPoint, te::gm::MultiPolygon, te::gm::MultiSurface, te::gm::Point, te::gm::Polygon, te::gm::PolyhedralSurface, te::mem::CachedRaster, te::mem::ExpansibleRaster, te::mem::Raster, te::rst::GainOffsetProxyRaster, te::rst::ProxyRaster, te::rst::SynchronizedRaster, te::vp::ComplexData< T >, and terralib4::Raster.
References AbstractData().
Referenced by te::dt::new_clone().
|
pure virtual |
It computes the minimum bounding rectangle for the geometry.
Subclasses must implement this method in order to be able to compute the minimum bounding box of a specific geometry.
| cascade | If true it will update the MBR for its sub-geometries. |
Implemented in te::gm::CircularString, te::gm::CompoundCurve, te::gm::CurvePolygon, te::gm::GeometryCollection, te::gm::LineString, te::gm::Point, and te::gm::PolyhedralSurface.
References _NOEXCEPT_OP, and computeMBR().
Referenced by computeMBR().
|
virtual |
It returns true if this geometry object spatially contains rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, contains(), and Geometry().
Referenced by contains().
|
pure virtual |
It converts the coordinate values of the geometry to the new spatial reference system.
After calling this method the geometry will be associated to the new SRID.
| converter | The converter containing all the information related to the new Spatial Reference System ID used to transform the coordinates of the geometry. |
| Exception | It will throw an exception if it can not do the transformation. |
Implemented in te::gm::CircularString, te::gm::CompoundCurve, te::gm::CurvePolygon, te::gm::GeometryCollection, te::gm::LineString, te::gm::Point, and te::gm::PolyhedralSurface.
|
virtual |
This method calculates the Convex Hull of a geometry.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and Geometry().
Referenced by te::rp::GetTPConvexHullArea().
|
virtual |
It returns true if this geometry object is spatially covered by rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, coveredBy(), and Geometry().
Referenced by coveredBy().
|
virtual |
It returns true if this geometry object spatially covers the rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, covers(), and Geometry().
Referenced by covers().
|
virtual |
It returns true if the geometry object spatially crosses rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, crosses(), and Geometry().
Referenced by crosses().
It returns a geometric object that represents the point set difference with another geometry.
| rhs | Another geometry whose difference with this geometry will be calculated. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, difference(), and Geometry().
Referenced by difference().
|
virtual |
It returns true if the geometry object is spatially disjoint from rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, disjoint(), and Geometry().
Referenced by disjoint(), and te::rst::PolygonIterator< T >::getBBOXIntersectionRanges().
|
virtual |
It returns the shortest distance between any two points in the two geometry objects.
| rhs | The other geometry. |
| std::exception | It will throw an exception if the operation could not be performed. |
References Geometry().
Referenced by buffer(), buffer(), buffer(), dWithin(), and te::gm::Line::setCoord().
|
virtual |
It returns true if the geometries are within the specified distance.
| rhs | The other geometry whose symetric difference with this geometry will be calculated. |
| distance | The distance. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, distance(), dWithin(), and Geometry().
Referenced by dWithin().
|
virtual |
It returns true if the geometry object is spatially equal to rhs geometry.
| rhs | The another geometry to be compared. |
| exact | If true checks if this geometric object has the same vertexes in the same order of rhs geometry. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, equals(), and Geometry().
Referenced by equals().
|
virtual |
It returns the name of 2D geometry subclass.
The name of the 2D geometry subclass may be one of the following:
References _NOEXCEPT_OP.
|
virtual |
It returns the 2D geometry subclass type identifier.
References _NOEXCEPT_OP, and get2DGeomTypeId().
Referenced by get2DGeomTypeId().
|
virtual |
It returns the geometry boundary.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and getBoundary().
Referenced by getBoundary().
| te::gm::Coord2D te::gm::Geometry::getCentroid | ( | ) | const |
It will get the centroid of the input geometries.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and getCentroid().
Referenced by getCentroid().
| int te::gm::Geometry::getCoordinateDimension | ( | ) | const |
It returns the number of measurements or axes needed to describe a position in a coordinate system.
It returns:
References _NOEXCEPT_OP, and getCoordinateDimension().
Referenced by getCoordinateDimension().
|
pure virtual |
It returns the geometric object dimension (0, 1 or 2).
For a GeometryCollection it returns the largest topological dimension of the contained objects. For Point and MultiPoint this will return 0. For Curves and MultiCurves (LineString, LinearRing and MultiLineString) it will return 1. For Surfaces (Polygon, Triangle, PolyhedralSurface, TIN) and MultiSurfaces (MultiPolygon) it will return 2.
Implemented in te::gm::Curve, te::gm::GeometryCollection, te::gm::MultiCurve, te::gm::MultiPoint, te::gm::MultiSurface, te::gm::Point, and te::gm::Surface.
References _NOEXCEPT_OP, and getDimension().
Referenced by getDimension().
| Geometry * te::gm::Geometry::getEnvelope | ( | ) | const |
It returns the minimum bounding rectangle (MBR) for the geometry.
As one can notice, the mbr is returned as a geometry, actually a polygon defined by the corner points of the bounding box [(MINX, MINY), (MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].
References _NOEXCEPT_OP, and Geometry().
|
pure virtual |
It returns the name of the geometry subclass.
The name of the geometry subclass may be one of the following:
Implemented in te::gm::CircularString, te::gm::CompoundCurve, te::gm::CurvePolygon, te::gm::GeometryCollection, te::gm::LineString, te::gm::MultiLineString, te::gm::MultiPoint, te::gm::MultiPolygon, te::gm::Point, te::gm::Polygon, te::gm::PolyhedralSurface, and te::gm::TIN.
References _NOEXCEPT_OP, and getGeometryType().
Referenced by getGeometryType().
|
inline |
It returns the geometry subclass type identifier.
Definition at line 182 of file Geometry.h.
References _NOEXCEPT_OP, getGeomTypeId(), and m_gType.
Referenced by getGeomTypeId(), and getGeomTypeId().
|
static |
It returns the TerraLib geometry type id given a type string (the type string must be in capital letters).
| gtype | The geometry type name. |
References getGeomTypeId().
|
static |
It returns the TerraLib geometry type string given a type id.
| gId | The geometry type id. |
References getGeomTypeString().
Referenced by getGeomTypeString().
| const Envelope * te::gm::Geometry::getMBR | ( | ) | const |
It returns the minimum bounding rectangle for the geometry in an internal representation.
The mbr can be constructed when reading a geometry from a database or it can be computed internally. So, if the mbr is not already set it will compute it just when this method is called. Successive calls to this method will not compute the mbr anymore.
References _NOEXCEPT_OP, and getMBR().
Referenced by getMBR().
|
pure virtual |
it returns the number of points (vertexes) in the geometry.
Implemented in te::gm::CircularString, te::gm::CompoundCurve, te::gm::CurvePolygon, te::gm::GeometryCollection, te::gm::LineString, te::gm::Point, and te::gm::PolyhedralSurface.
References _NOEXCEPT_OP, and getNPoints().
Referenced by getNPoints().
|
inline |
It returns the Spatial Reference System ID associated to this geometric object.
This value can be used to identify the associated Spatial Reference System.
Definition at line 242 of file Geometry.h.
References _NOEXCEPT_OP, getSRID(), and m_srid.
Referenced by te::rst::PolygonIterator< T >::getScanLineIntersectionRanges(), getSRID(), te::rst::PolygonIterator< T >::initialize(), and te::rst::LineIterator< T >::LineIterator().
|
virtual |
It returns the data type code associated to the data value.
Implements te::dt::AbstractData.
References getTypeCode().
Referenced by getTypeCode().
| void te::gm::Geometry::getWkb | ( | char * | wkb, |
| te::common::MachineByteOrder | byteOrder ) const |
It serializes the geometry to a WKB representation into the specified buffer.
The wkb parameter must have at least getWkbSize() in order to be used. Don't pass a NULL pointer or a buffer smaller than the size needed. Note that the WKB will be on the specified byte order.
| wkb | The buffer where the Geometry will be serialized. |
| byteOrder | The byte order used to store/serialize the geometry. |
| Exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and getWkb().
Referenced by getWkb().
| std::size_t te::gm::Geometry::getWkbSize | ( | ) | const |
It returns the size required by a WKB representation for this geometric object.
This is the preferred method for creating a WKB. First of all, it gives you the possibility to use a pre-allocated buffer. So, this method can be used in conjunction with the getWkb method.
References _NOEXCEPT_OP, and getWkbSize().
Referenced by getWkbSize().
It returns a geometric object that represents the point set intersection with another geometry.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and intersection().
Referenced by te::gm::Line::clone(), intersection(), and te::rst::LineIterator< T >::LineIterator().
|
virtual |
It returns true if the geometry object spatially intersects rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and intersects().
Referenced by intersects().
| bool te::gm::Geometry::is3D | ( | ) | const |
It returns true if this geometric object has z coordinate values.
References _NOEXCEPT_OP, and is3D().
Referenced by is3D().
| bool te::gm::Geometry::isCollection | ( | ) | const |
It returns true if this geometric object is a collection.
References _NOEXCEPT_OP, and isCollection().
Referenced by isCollection().
|
virtual |
It returns true if this geometric object is the empty Geometry.
If true, then this geometric object represents the empty point set for the coordinate space.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and isEmpty().
Referenced by isEmpty().
|
static |
It tells if the given string is a geometry data type.
| stype | The geometry type to be checked. |
References isGeomType().
Referenced by isGeomType().
| bool te::gm::Geometry::isMeasured | ( | ) | const |
It returns true if this geometric object has m coordinate values.
References _NOEXCEPT_OP, and isMeasured().
Referenced by isMeasured().
|
virtual |
It returns true if this geometric object has no anomalous points, such as self intersection or self tangency.
See the ISO and OGC documentation for an explanation about specific conditions of each type of geometry to be considered not simple.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and isSimple().
Referenced by isSimple().
|
virtual |
It tells if the geometry is well formed.
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, and isValid().
Referenced by isValid().
|
static |
It loads the internal MAP of geometry type names to geometry type ids.
References loadGeomTypeId().
Referenced by loadGeomTypeId().
|
inlinevirtual |
It returns a derived GeometryCollection value according to the specified coordinate value.
| mValue | The coordinate value. |
| Exception | It will throw an exception if the operation could not be performed. |
Definition at line 695 of file Geometry.h.
References _NOEXCEPT_OP, Geometry(), locateAlong(), and locateBetween().
Referenced by locateAlong().
|
virtual |
It returns a derived geometry collection value according to the range of coordinate values inclusively.
| mStart | The initial coordinate value. |
| mEnd | The final coordinate value. |
| Exception | It will throw an exception if the operation could not be performed. |
Reimplemented in te::gm::CircularString, te::gm::CompoundCurve, te::gm::LineString, te::gm::MultiLineString, and te::gm::MultiPoint.
References Geometry().
Referenced by locateAlong().
Assignment operator.
| rhs | The right-hand-side geometry. |
References _NOEXCEPT_OP, and Geometry().
|
virtual |
It returns true if this geometry object spatially overlaps rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and overlaps().
Referenced by overlaps().
|
virtual |
It returns the spatial relation between this geometry object and the rhs geometry.
| rhs | The another geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and relate().
|
virtual |
It returns true if this geometry object is spatially related to rhs geometry according to the pattern expressed by the intersection matrix.
It does this by testing for intersections between the interior, boundary and exterior of the two geometric objects as specified by the values in the matrix.
| rhs | The other geometry to be compared. |
| matrix | The intersection matrix. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and relate().
|
pure virtual |
It sets the Spatial Reference System ID of the geometry and all its parts if it is a GeometryCollection (or a Multi).
| srid | The Spatial Reference System ID to be associated to the geometric object. |
Implemented in te::gm::CircularString, te::gm::CompoundCurve, te::gm::CurvePolygon, te::gm::GeometryCollection, te::gm::LineString, te::gm::Point, and te::gm::PolyhedralSurface.
It returns a geometric object that represents the point set symetric difference with another geometry.
| rhs | The other geometry whose symetric difference with this geometry will be calculated. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and symDifference().
Referenced by symDifference().
|
inlinevirtual |
It returns the data value in a WKT representation.
Implements te::dt::AbstractData.
Definition at line 953 of file Geometry.h.
References asText(), and toString().
Referenced by toString().
|
virtual |
It returns true if the geometry object spatially touches rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and touches().
Referenced by touches().
|
virtual |
It converts the coordinate values of the geometry to the new spatial reference system.
After calling this method the geometry will be associated to the new SRID.
| srid | The new Spatial Reference System ID used to transform the coordinates of the geometry. |
| Exception | It will throw an exception if it can not do the transformation. |
It returns a geometric object that represents the point set union with another geometry.
| rhs | Another geometry whose union with this geometry will be calculated. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and Union().
Referenced by Union().
|
virtual |
It returns true if the geometry object is spatially within rhs geometry.
| rhs | The other geometry to be compared. |
| std::exception | It will throw an exception if the operation could not be performed. |
References _NOEXCEPT_OP, Geometry(), and within().
Referenced by within().
|
protected |
|
mutableprotected |
The geometry minimum bounding rectangle.
Definition at line 961 of file Geometry.h.
|
protected |
The Spatial Reference System code associated to the Geometry.
Definition at line 960 of file Geometry.h.
Referenced by getSRID().
|
staticprotected |
A set of geometry type names (in UPPER CASE).
Definition at line 963 of file Geometry.h.