26#ifndef __TERRALIB_GEOMETRY_INTERNAL_GEOMETRY_H
27#define __TERRALIB_GEOMETRY_INTERNAL_GEOMETRY_H
789 int quadrantSegments,
A base class for objects that can be retrieved from the data access module.
The root of all hierarchies that can be visited.
#define TE_DEFINE_VISITABLE
Definitions required by VS version lesser then 2015 to work using noexcept reserved work.
The root of all hierarchies that can be visited.
A base class for values that can be retrieved from the data access module.
An Envelope defines a 2D rectangular region.
GeometryPtr(te::gm::Geometry *geometry=nullptr)
GeometryPtr(GeometryPtr &&rhs)
GeometrySharedPtr(te::gm::Geometry *geometry=nullptr)
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
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 * buffer(const double &distance) const _NOEXCEPT_OP(false)
This method calculates the buffer of a 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 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...
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.
static std::string getGeomTypeString(const int &gId)
It returns the TerraLib geometry type string given a type id.
bool is3D() const _NOEXCEPT_OP(true)
It returns true if this geometric object has z coordinate values.
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 bool overlaps(const Geometry *const rhs) const _NOEXCEPT_OP(false)
It returns true if this geometry object spatially overlaps rhs geometry.
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.
char * asBinary(std::size_t &size) const _NOEXCEPT_OP(false)
It serializes the geometric object to a Well-known Binary Representation (WKB).
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 isValid() const _NOEXCEPT_OP(false)
It tells if the geometry is well formed.
virtual Geometry * buffer(const double &distance, int quadrantSegments, BufferCapStyle endCapStyle) const _NOEXCEPT_OP(false)
This method calculates the buffer of a 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 t...
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...
int getCoordinateDimension() const _NOEXCEPT_OP(true)
It returns the number of measurements or axes needed to describe a position in a coordinate system.
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 bool contains(const Geometry *const rhs) const _NOEXCEPT_OP(false)
It returns true if this geometry object spatially contains rhs geometry.
virtual void computeMBR(bool cascade) const _NOEXCEPT_OP(true)=0
It computes the minimum bounding rectangle for the geometry.
te::gm::Coord2D getCentroid() const _NOEXCEPT_OP(false)
It will get the centroid of the input geometries.
static std::map< std::string, GeomType > sm_geomTypeMap
A set of geometry type names (in UPPER CASE).
virtual Geometry * convexHull() const _NOEXCEPT_OP(false)
This method calculates the Convex Hull of a geometry.
virtual bool isEmpty() const _NOEXCEPT_OP(false)
It returns true if this geometric object is the empty Geometry.
GeomType getGeomTypeId() const _NOEXCEPT_OP(true)
It returns the geometry subclass type identifier.
int getSRID() const _NOEXCEPT_OP(true)
It returns the Spatial Reference System ID associated to this geometric object.
const Envelope * getMBR() const _NOEXCEPT_OP(true)
It returns the minimum bounding rectangle for the geometry in an internal representation.
static bool isGeomType(const std::string &stype)
It tells if the given string is a geometry data type.
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 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 inclusivel...
virtual Dimensionality getDimension() const _NOEXCEPT_OP(true)=0
It returns the geometric object dimension (0, 1 or 2).
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 GeometryCollecti...
virtual const std::string get2DGeometryType() const _NOEXCEPT_OP(true)
It returns the name of 2D geometry subclass.
static void loadGeomTypeId()
It loads the internal MAP of geometry type names to geometry type ids.
std::size_t getWkbSize() const _NOEXCEPT_OP(true)
It returns the size required by a WKB representation for this geometric object.
virtual Geometry * buffer(const double &distance, int quadrantSegments) const _NOEXCEPT_OP(false)
This method calculates the buffer of a geometry.
virtual Geometry * getBoundary() const _NOEXCEPT_OP(false)
It returns the geometry boundary.
Geometry * getEnvelope() const _NOEXCEPT_OP(true)
It returns the minimum bounding rectangle (MBR) for the geometry.
virtual bool intersects(const Geometry *const rhs) const _NOEXCEPT_OP(false)
It returns true if the geometry object spatially intersects rhs geometry.
virtual std::size_t getNPoints() const _NOEXCEPT_OP(true)=0
it returns the number of points (vertexes) in the geometry.
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.
int m_srid
The Spatial Reference System code associated to the Geometry.
virtual void transform(const int &srid) _NOEXCEPT_OP(false)
It converts the coordinate values of the geometry to the new spatial reference system.
GeomType m_gType
Internal geometry type.
std::string toString() const
It returns the data value in a WKT representation.
virtual GeomType get2DGeomTypeId() const _NOEXCEPT_OP(true)
It returns the 2D geometry subclass type identifier.
virtual const std::string & getGeometryType() const _NOEXCEPT_OP(true)=0
It returns the name of the geometry subclass.
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 crosses(const Geometry *const rhs) const _NOEXCEPT_OP(false)
It returns true if the geometry object spatially crosses rhs 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.
int getTypeCode() const
It returns the data type code associated to the data value.
virtual Geometry * locateAlong(const double &mValue) const _NOEXCEPT_OP(false)
It returns a derived GeometryCollection value according to the specified coordinate value.
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.
virtual bool touches(const Geometry *const rhs) const _NOEXCEPT_OP(false)
It returns true if the geometry object spatially touches rhs geometry.
Envelope * m_mbr
The geometry minimum bounding rectangle.
virtual bool within(const Geometry *const rhs) const _NOEXCEPT_OP(false)
It returns true if the geometry object is spatially within rhs geometry.
std::string asText() const _NOEXCEPT_OP(true)
It returns an string with the Well-Known Text Representation for the 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.
A Converter is responsible for the conversion of coordinates between different Coordinate Systems (CS...
Enumerations related to Geometry module.
A visitor interface for the Geometry hierarchy.
Namespace for the Common module of TerraLib.
Namespace for the Vector Geometry module of TerraLib.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Dimensionality
From Wikipedia: "in mathematics, the dimension of an object is an intrinsic property,...
BufferCapStyle
Buffer end cap style.
Namespace for the Spatial Reference System module of TerraLib.
An utility struct for representing 2D coordinates.
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.