TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches. More...
#include <TIN.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. More... | |
void | add (te::gm::Polygon *g) |
It adds the triangle into the TIN. More... | |
void | setGeometryN (std::size_t i, te::gm::Polygon *g) |
It sets the n-th triangle in this TIN. More... | |
Initializer methods on geometric objects | |
Methods for initializing a geometric object. | |
TIN (std::size_t nPolygons, GeomType t, int srid=0, Envelope *mbr=0) | |
It initializes the TIN with the specified spatial reference system id and envelope. More... | |
TIN (const TIN &rhs) | |
Copy constructor. More... | |
~TIN () | |
Destructor. More... | |
TIN & | operator= (const TIN &rhs) |
Assignment operator. More... | |
Re-Implmentation of methods from Geometry class | |
Re-Implmentation of basic methods from Geometry class. | |
const std::string & | getGeometryType () const throw () |
It returns the name of the instantiable subtype of Geometry of which this geometric object is an instantiable member. More... | |
Re-Implementation from AbstractData | |
Methods re-Implementated from AbstractData. | |
virtual te::dt::AbstractData * | clone () const |
It clones the linestring. More... | |
PolyhedralSurface Specific Methods | |
Specific methods for a PolyhedralSurface. | |
std::size_t | getNumPatches () const |
It returns the number of including polygons. More... | |
void | setNumPatches (std::size_t size) |
It sets the number of including polygons. More... | |
Polygon * | getPatchN (std::size_t i) const |
It returns a polygon in this surface, the order is arbitrary. More... | |
void | setPatchN (std::size_t i, Polygon *p) |
It sets the informed position polygon to the new one. More... | |
MultiPolygon * | getBoundingPolygons (const Polygon *p) const |
It returns the collection of polygons in this surface that bounds the given polygon "p" for any polygon "p" in the surface. More... | |
bool | isClosed () const |
It returns true if the polygon closes on itself, and thus has no boundary and encloses a solid. More... | |
Re-Implmentation of methods from surface class | |
Re-Implmentation of basic methods from surface class. | |
double | getArea () const |
It returns the area of this surface, as measured in the spatial reference system of this surface. More... | |
Point * | getCentroid () const |
It returns the mathematical centroid for this surface as a point. More... | |
Coord2D * | getCentroidCoord () const |
It returns the mathematical centroid for this surface as a coordinate. More... | |
Point * | getPointOnSurface () const |
It returns a point guaranteed to be on this surface. More... | |
Coord2D * | getCoordOnSurface () const |
It returns a coordinate guaranteed to be on this surface. More... | |
double | getPerimeter () const |
It returns the length of the boundary for the surface. More... | |
Re-Implmentation of methods from Geometry class | |
Re-Implmentation of basic methods from Geometry class. | |
void | setSRID (int srid) throw () |
It sets the Spatial Reference System ID of the Geometry and all its parts if it is a GeometryCollection (or a Multi). More... | |
void | transform (int srid) throw (te::common::Exception) |
It will transform the coordinates of the Geometry to the new one. More... | |
void | computeMBR (bool cascade) const throw () |
It computes the minimum bounding rectangle for the Geometry. More... | |
std::size_t | getNPoints () const throw () |
it returns the number of points (vertexes) in the geometry. More... | |
Re-Implmentation of methods from Geometry class | |
Re-Implmentation of basic methods from Geometry class. | |
Dimensionality | getDimension () const throw () |
Surfaces are 2-dimensional objects. More... | |
Basic Geometry Methods | |
Basic methods on geometric objects. | |
int | getCoordinateDimension () const throw () |
It returns the number of measurements or axes needed to describe a position in a coordinate system. More... | |
GeomType | getGeomTypeId () const throw () |
It returns the geometry subclass type identifier. More... | |
int | getSRID () const throw () |
It returns the Spatial Reference System ID associated to this geometric object. More... | |
Geometry * | getEnvelope () const throw () |
It returns the minimum bounding rectangle (MBR) for the geometry. More... | |
const Envelope * | getMBR () const throw () |
It returns the minimum bounding rectangle for the geometry in an internal representation. More... | |
std::string | asText () const throw () |
It returns an string with the Well-Known Text Representation for the geometry. More... | |
char * | asBinary (std::size_t &size) const throw (Exception) |
It serializes the geometric object to a Well-known Binary Representation (WKB). More... | |
std::size_t | getWkbSize () const throw () |
It returns the size required by a WKB representation for this geometric object. More... | |
void | getWkb (char *wkb, te::common::MachineByteOrder byteOrder) const throw (Exception) |
It serializes the geometry to a WKB representation into the specified buffer. More... | |
virtual bool | isEmpty () const throw (std::exception) |
It returns true if this geometric object is the empty Geometry. More... | |
virtual bool | isSimple () const throw (std::exception) |
It returns true if this geometric object has no anomalous points, such as self intersection or self tangency. More... | |
virtual bool | isValid () const throw (std::exception) |
It tells if the geometry is well formed. More... | |
bool | is3D () const throw () |
It returns true if this geometric object has z coordinate values. More... | |
bool | isMeasured () const throw () |
It returns true if this geometric object has m coordinate values. More... | |
virtual Geometry * | getBoundary () const throw (std::exception) |
It returns the geometry boundary. More... | |
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 throw (std::exception) |
It returns true if the geometry object is spatially equal to rhs geometry. More... | |
virtual bool | disjoint (const Geometry *const rhs) const throw (std::exception) |
It returns true if the geometry object is spatially disjoint from rhs geometry. More... | |
virtual bool | intersects (const Geometry *const rhs) const throw (std::exception) |
It returns true if the geometry object spatially intersects rhs geometry. More... | |
virtual bool | touches (const Geometry *const rhs) const throw (std::exception) |
It returns true if the geometry object spatially touches rhs geometry. More... | |
virtual bool | crosses (const Geometry *const rhs) const throw (std::exception) |
It returns true if the geometry object spatially crosses rhs geometry. More... | |
virtual bool | within (const Geometry *const rhs) const throw (std::exception) |
It returns true if the geometry object is spatially within rhs geometry. More... | |
virtual bool | contains (const Geometry *const rhs) const throw (std::exception) |
It returns true if this geometry object spatially contains rhs geometry. More... | |
virtual bool | overlaps (const Geometry *const rhs) const throw (std::exception) |
It returns true if this geometry object spatially overlaps rhs geometry. More... | |
virtual bool | relate (const Geometry *const rhs, const std::string &matrix) const throw (std::exception) |
It returns true if this geometry object is spatially related to rhs geometry according to the pattern expressed by the intersection matrix. More... | |
virtual std::string | relate (const Geometry *const rhs) const throw (std::exception) |
It returns the spatial relation between this geometry object and the rhs geometry. More... | |
virtual bool | covers (const Geometry *const rhs) const throw (std::exception) |
It returns true if this geometry object spatially covers the rhs geometry. More... | |
virtual bool | coveredBy (const Geometry *const rhs) const throw (std::exception) |
It returns true if this geometry object is spatially covered by rhs geometry. More... | |
virtual Geometry * | locateAlong (const double &mValue) const throw (Exception) |
It returns a derived GeometryCollection value according to the specified coordinate value. More... | |
virtual Geometry * | locateBetween (const double &mStart, const double &mEnd) const throw (Exception) |
It returns a derived geometry collection value according to the range of coordinate values inclusively. More... | |
Spatial Analysis | |
Methods that support spatial analysis. | |
virtual double | distance (const Geometry *const rhs) const throw (std::exception) |
It returns the shortest distance between any two points in the two geometry objects. More... | |
virtual Geometry * | buffer (const double &distance) const throw (std::exception) |
This method calculates the buffer of a geometry. More... | |
virtual Geometry * | buffer (const double &distance, int quadrantSegments) const throw (std::exception) |
This method calculates the buffer of a geometry. More... | |
virtual Geometry * | buffer (const double &distance, int quadrantSegments, BufferCapStyle endCapStyle) const throw (std::exception) |
This method calculates the buffer of a geometry. More... | |
virtual Geometry * | convexHull () const throw (std::exception) |
This method calculates the Convex Hull of a geometry. More... | |
virtual Geometry * | intersection (const Geometry *const rhs) const throw (std::exception) |
It returns a geometric object that represents the point set intersection with another geometry. More... | |
virtual Geometry * | Union (const Geometry *const rhs) const throw (std::exception) |
It returns a geometric object that represents the point set union with another geometry. More... | |
virtual Geometry * | difference (const Geometry *const rhs) const throw (std::exception) |
It returns a geometric object that represents the point set difference with another geometry. More... | |
virtual Geometry * | symDifference (const Geometry *const rhs) const throw (std::exception) |
It returns a geometric object that represents the point set symetric difference with another geometry. More... | |
virtual bool | dWithin (const Geometry *const rhs, const double &distance) const throw (std::exception) |
It returns true if the geometries are within the specified distance. More... | |
AbstractData Re-implementation | |
Methods re-implemneted from AbstractData. | |
int | getTypeCode () const |
It returns the data type code associated to the data value. More... | |
std::string | toString () const |
It returns the data value in a WKT representation. More... | |
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). More... | |
static bool | isGeomType (const std::string &stype) |
It tells if the given string is a geometry data type. More... | |
static void | loadGeomTypeId () |
It loads the internal MAP of geometry type names to geometry type ids. More... | |
Protected Attributes | |
GeomType | m_gType |
Internal geometry type. More... | |
Envelope * | m_mbr |
The geometry minimum bounding rectangle. More... | |
std::vector< Polygon * > | m_polygons |
An array with the polygon list. More... | |
int | m_srid |
The Spatial Reference System code associated to the Geometry. More... | |
Static Protected Attributes | |
static std::map< std::string, GeomType > | sm_geomTypeMap |
A set of geometry type names (in UPPER CASE). More... | |
Static Private Attributes | |
static const std::string | sm_typeName |
Geometry type name for TIN. More... | |
TIN (triangulated irregular network) is a PolyhedralSurface consisting only of Triangle patches.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
It initializes the TIN with the specified spatial reference system id and envelope.
nPolygons | The number of polygons forming the polyhedral. |
t | The internal type of the TIN. |
srid | The Spatial Reference System ID associated to the Geometry. |
mbr | The minimum bounding rectangle of this geometry (i.e., its envelope). |
te::gm::TIN::TIN | ( | const TIN & | rhs | ) |
Copy constructor.
rhs | The other geometry. |
|
pure virtualinherited |
It call the visit method from the guest object.
guest | The guest or visitor. |
void te::gm::TIN::add | ( | te::gm::Polygon * | g | ) |
|
inherited |
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. |
|
inherited |
It returns an string with the Well-Known Text Representation for the geometry.
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
It clones the linestring.
Implements te::dt::AbstractData.
|
virtualinherited |
It computes the minimum bounding rectangle for the Geometry.
cascade | If true, it will update the MBR of its parts. |
Implements te::gm::Geometry.
|
virtualinherited |
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. |
|
virtualinherited |
This method calculates the Convex Hull of a geometry.
std::exception | It will throw an exception if the operation could not be performed. |
Referenced by te::rp::GetTPConvexHullArea().
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
inlinevirtualinherited |
It returns the area of this surface, as measured in the spatial reference system of this surface.
Implements te::gm::Surface.
Definition at line 207 of file PolyhedralSurface.h.
|
virtualinherited |
It returns the geometry boundary.
std::exception | It will throw an exception if the operation could not be performed. |
|
inherited |
It returns the collection of polygons in this surface that bounds the given polygon "p" for any polygon "p" in the surface.
p | The bounding Polygon. |
|
inlinevirtualinherited |
It returns the mathematical centroid for this surface as a point.
Implements te::gm::Surface.
Definition at line 221 of file PolyhedralSurface.h.
|
inlinevirtualinherited |
It returns the mathematical centroid for this surface as a coordinate.
Implements te::gm::Surface.
Definition at line 237 of file PolyhedralSurface.h.
|
inherited |
It returns the number of measurements or axes needed to describe a position in a coordinate system.
It returns:
|
inlinevirtualinherited |
It returns a coordinate guaranteed to be on this surface.
Implements te::gm::Surface.
Definition at line 263 of file PolyhedralSurface.h.
|
virtualinherited |
|
inherited |
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)].
|
virtual |
It returns the name of the instantiable subtype of Geometry of which this geometric object is an instantiable member.
The name of the Geometry subtype for PolyhedralSurface is: Tin.
Reimplemented from te::gm::PolyhedralSurface.
|
inlineinherited |
It returns the geometry subclass type identifier.
Definition at line 178 of file Geometry.h.
Referenced by te::rst::PolygonIterator< T >::decompose(), and te::rst::PolygonIterator< T >::setNextLine().
|
staticinherited |
It returns the TerraLib geometry type id given a type string (the type string must be in capital letters).
stype | The geometry type name. |
|
inherited |
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.
Referenced by te::rst::PolygonIterator< T >::PolygonIterator().
|
virtualinherited |
it returns the number of points (vertexes) in the geometry.
Implements te::gm::Geometry.
|
inlineinherited |
It returns the number of including polygons.
Definition at line 133 of file PolyhedralSurface.h.
|
inherited |
It returns a polygon in this surface, the order is arbitrary.
i | The index of the polygon component. |
|
virtualinherited |
It returns the length of the boundary for the surface.
Implements te::gm::Surface.
|
inlinevirtualinherited |
It returns a point guaranteed to be on this surface.
Implements te::gm::Surface.
Definition at line 249 of file PolyhedralSurface.h.
|
inlineinherited |
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 189 of file Geometry.h.
Referenced by te::rst::PolygonIterator< T >::decompose(), te::rst::LineIterator< T >::LineIterator(), te::rst::PolygonIterator< T >::PolygonIterator(), and te::rst::PolygonIterator< T >::setNextLine().
|
virtualinherited |
It returns the data type code associated to the data value.
Implements te::dt::AbstractData.
|
inherited |
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. |
|
inherited |
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.
|
virtualinherited |
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. |
Referenced by te::rst::LineIterator< T >::LineIterator(), and te::rst::PolygonIterator< T >::setNextLine().
|
virtualinherited |
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. |
|
inherited |
It returns true if this geometric object has z coordinate values.
|
inlineinherited |
It returns true if the polygon closes on itself, and thus has no boundary and encloses a solid.
Definition at line 190 of file PolyhedralSurface.h.
|
virtualinherited |
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. |
Referenced by te::rst::PolygonIterator< T >::setNextLine().
|
staticinherited |
It tells if the given string is a geometry data type.
stype | The geometry type to be checked. |
|
inherited |
It returns true if this geometric object has m coordinate values.
|
virtualinherited |
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. |
|
virtualinherited |
It tells if the geometry is well formed.
std::exception | It will throw an exception if the operation could not be performed. |
|
staticinherited |
It loads the internal MAP of geometry type names to geometry type ids.
|
inlinevirtualinherited |
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 611 of file Geometry.h.
|
virtualinherited |
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::LineString, te::gm::CircularString, te::gm::CompoundCurve, te::gm::MultiPoint, te::gm::PointM, te::gm::PointZM, and te::gm::MultiLineString.
Assignment operator.
rhs | The other geometry. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
virtualinherited |
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. |
void te::gm::TIN::setGeometryN | ( | std::size_t | i, |
te::gm::Polygon * | g | ||
) |
|
inherited |
It sets the number of including polygons.
If the new size is less than the old it will drop the geometries.
size | The number of polygons for the PolyhedralSurface. |
|
inherited |
It sets the informed position polygon to the new one.
i | The polygon index. |
p | The new polygon to be placed in the informed position. |
|
virtualinherited |
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. |
Implements te::gm::Geometry.
|
virtualinherited |
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. |
|
inlinevirtualinherited |
It returns the data value in a WKT representation.
Implements te::dt::AbstractData.
Definition at line 858 of file Geometry.h.
Referenced by te::rst::PolygonIterator< T >::decompose().
|
virtualinherited |
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. |
|
virtualinherited |
It will transform the coordinates of the Geometry to the new one.
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. |
Implements te::gm::Geometry.
|
virtualinherited |
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. |
|
virtualinherited |
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. |
|
protectedinherited |
Internal geometry type.
Definition at line 864 of file Geometry.h.
|
mutableprotectedinherited |
The geometry minimum bounding rectangle.
Definition at line 866 of file Geometry.h.
|
protectedinherited |
An array with the polygon list.
Definition at line 339 of file PolyhedralSurface.h.
|
protectedinherited |
The Spatial Reference System code associated to the Geometry.
Definition at line 865 of file Geometry.h.
|
staticprotectedinherited |
A set of geometry type names (in UPPER CASE).
Definition at line 868 of file Geometry.h.
|
staticprivate |