26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_GEOMETRY_H 27 #define __TERRALIB_GEOMETRY_INTERNAL_GEOMETRY_H 30 #include "../common/BaseVisitable.h" 31 #include "../common/Enums.h" 32 #include "../datatype/AbstractData.h" 44 #include <boost/shared_ptr.hpp> 149 int getCoordinateDimension()
const throw();
168 virtual const std::string& getGeometryType()
const throw() = 0;
202 virtual const std::string get2DGeometryType()
const throw();
228 virtual GeomType get2DGeomTypeId()
const throw();
239 int getSRID()
const throw() {
return m_srid; }
250 virtual void setSRID(
int srid)
throw() = 0;
280 Geometry* getEnvelope()
const throw();
296 const Envelope* getMBR()
const throw();
311 virtual void computeMBR(
bool cascade)
const throw() = 0;
318 std::string asText()
const throw();
334 char* asBinary(std::size_t& size)
const throw(
Exception);
347 std::size_t getWkbSize()
const throw();
377 virtual bool isEmpty()
const throw(std::exception);
391 virtual bool isSimple()
const throw(std::exception);
402 virtual bool isValid()
const throw(std::exception);
409 bool is3D()
const throw();
416 bool isMeasured()
const throw();
423 bool isCollection()
const throw();
437 virtual Geometry* getBoundary()
const throw(std::exception);
455 virtual std::size_t getNPoints()
const throw() = 0;
479 virtual bool equals(
const Geometry*
const rhs,
const bool exact =
false)
const throw(std::exception);
494 virtual bool disjoint(
const Geometry*
const rhs)
const throw(std::exception);
509 virtual bool intersects(
const Geometry*
const rhs)
const throw(std::exception);
524 virtual bool touches(
const Geometry*
const rhs)
const throw(std::exception);
539 virtual bool crosses(
const Geometry*
const rhs)
const throw(std::exception);
554 virtual bool within(
const Geometry*
const rhs)
const throw(std::exception);
569 virtual bool contains(
const Geometry*
const rhs)
const throw(std::exception);
584 virtual bool overlaps(
const Geometry*
const rhs)
const throw(std::exception);
604 virtual bool relate(
const Geometry*
const rhs,
const std::string& matrix)
const throw(std::exception);
623 virtual std::string relate(
const Geometry*
const rhs)
const throw(std::exception);
642 virtual bool covers(
const Geometry*
const rhs)
const throw(std::exception);
661 virtual bool coveredBy(
const Geometry*
const rhs)
const throw(std::exception);
694 virtual Geometry* locateBetween(
const double& mStart,
const double& mEnd)
const throw(
Exception);
714 virtual double distance(
const Geometry*
const rhs)
const throw(std::exception);
729 virtual Geometry* buffer(
const double& distance)
const throw(std::exception);
747 virtual Geometry* buffer(
const double& distance,
int quadrantSegments)
const throw(std::exception);
770 virtual Geometry* buffer(
const double& distance,
771 int quadrantSegments,
785 virtual Geometry* convexHull()
const throw(std::exception);
802 virtual Geometry* intersection(
const Geometry*
const rhs)
const throw(std::exception);
819 virtual Geometry* Union(
const Geometry*
const rhs)
const throw(std::exception);
836 virtual Geometry* difference(
const Geometry*
const rhs)
const throw(std::exception);
853 virtual Geometry* symDifference(
const Geometry*
const rhs)
const throw(std::exception);
869 virtual bool dWithin(
const Geometry*
const rhs,
const double& distance)
const throw(std::exception);
887 static GeomType getGeomTypeId(
const std::string& gtype);
898 static std::string getGeomTypeString(
const int& gId);
907 static bool isGeomType(
const std::string& stype);
914 static void loadGeomTypeId();
928 int getTypeCode()
const;
953 #endif // __TERRALIB_GEOMETRY_INTERNAL_GEOMETRY_H int getSRID() const
It returns the Spatial Reference System ID associated to this geometric object.
virtual Geometry * locateAlong(const double &mValue) const
It returns a derived GeometryCollection value according to the specified coordinate value...
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
BufferCapStyle
Buffer end cap style.
The root of all hierarchies that can be visited.
Base exception class for plugin module.
int m_srid
The Spatial Reference System code associated to the Geometry.
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.
An Envelope defines a 2D rectangular region.
Dimensionality
From Wikipedia: "in mathematics, the dimension of an object is an intrinsic property, independent of the space in which the object may happen to be embedded".
A base class for values that can be retrieved from the data access module.
MachineByteOrder
Endianness.
GeomType getGeomTypeId() const
It returns the geometry subclass type identifier.
#define TE_DEFINE_VISITABLE
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Envelope * m_mbr
The geometry minimum bounding rectangle.
An exception class for the Geometry module.
std::string toString() const
It returns the data value in a WKT representation.
GeomType m_gType
Internal geometry type.
boost::shared_ptr< Geometry > GeometryShrPtr
An utility struct for representing 2D coordinates.
static std::map< std::string, GeomType > sm_geomTypeMap
A set of geometry type names (in UPPER CASE).
A visitor interface for the Geometry hierarchy.