CurvePolygon is a planar surface defined by 1 exterior boundary and 0 or more interior boundaries. More...
#include <CurvePolygon.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... | |
Initializer methods on geometric objects | |
Methods for initializing a geometric object. | |
CurvePolygon (std::size_t nRings, GeomType t, int srid=0, Envelope *mbr=0) | |
It initializes the curve polygon with the specified spatial reference system id and envelope. More... | |
CurvePolygon (const CurvePolygon &rhs) | |
Copy constructor. More... | |
virtual | ~CurvePolygon () |
Virtual destructor. More... | |
virtual CurvePolygon & | operator= (const CurvePolygon &rhs) |
Assignment operator. More... | |
Re-Implementation from AbstractData | |
Methods re-Implementated from AbstractData. | |
virtual te::dt::AbstractData * | clone () const |
It clones the linestring. More... | |
CurvePolygon Specific Methods | |
Specific methods for a CurvePolygon. | |
Curve * | getExteriorRing () const |
It returns the exterior ring of this CurvePolygon. More... | |
std::size_t | getNumInteriorRings () const |
It returns the number of interior rings in this CurvePolygon. More... | |
std::size_t | getNumRings () const |
It returns the number of rings in this CurvePolygon. More... | |
void | setNumRings (std::size_t size) |
It sets the number of rings in this curve polygon. More... | |
Curve * | getInteriorRingN (std::size_t i) const |
It returns the n-th interior ring for this curve polygon as a curve. More... | |
Curve * | getRingN (std::size_t i) const |
It returns the n-th ring for this curve polygon as a curve. More... | |
Curve * | operator[] (std::size_t i) const |
It returns the n-th ring. More... | |
Curve * | operator[] (std::size_t i) |
It returns the n-th ring. More... | |
void | setRingN (std::size_t i, Curve *r) |
It sets the informed position ring to the new one. More... | |
void | removeRingN (std::size_t i) |
It removes the n-th ring in this CurvePolygon. More... | |
void | add (Curve *ring) |
It adds the ring to the curve polygon. More... | |
void | push_back (Curve *ring) |
It adds the curve to the curve polygon. More... | |
void | clear () |
It deletes all the rings of the CurvePolygon and clear it. More... | |
std::vector< Curve * > & | getRings () |
It returns the polygon rings. More... | |
const std::vector< Curve * > & | getRings () const |
It returns the polygon rings. More... | |
Surface Specific Methods | |
Specific methods for a Surface. | |
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. | |
virtual const std::string & | getGeometryType () const throw () |
The name of the geometry subtype for curve polygons is: CurvePolygon. More... | |
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 converts the coordinate values of the geometry to the new spatial reference system. More... | |
void | computeMBR (bool cascade) const throw () |
It computes the minimum bounding rectangle for the curve polygon. 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... | |
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... | |
Private Attributes | |
std::vector< Curve * > | m_rings |
An array with the ring list. More... | |
Static Private Attributes | |
static const std::string | sm_typeName |
CurvePolygon is a planar surface defined by 1 exterior boundary and 0 or more interior boundaries.
Definition at line 57 of file CurvePolygon.h.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
te::gm::CurvePolygon::CurvePolygon | ( | std::size_t | nRings, |
GeomType | t, | ||
int | srid = 0 , |
||
Envelope * | mbr = 0 |
||
) |
It initializes the curve polygon with the specified spatial reference system id and envelope.
nRings | The number of rings forming the curve polygon. |
t | The internal type of the curve polygon. |
srid | The Spatial Reference System ID associated to the curve polygon. |
mbr | The minimum bounding rectangle of this geometry (i.e., its envelope). It may be a NULL value. |
Definition at line 49 of file CurvePolygon.cpp.
te::gm::CurvePolygon::CurvePolygon | ( | const CurvePolygon & | rhs | ) |
Copy constructor.
rhs | The other geometry. |
Definition at line 55 of file CurvePolygon.cpp.
References te::common::Clone(), and m_rings.
|
virtual |
Virtual destructor.
Definition at line 61 of file CurvePolygon.cpp.
References te::common::FreeContents().
|
pure virtualinherited |
It call the visit method from the guest object.
guest | The guest or visitor. |
|
inline |
It adds the ring to the curve polygon.
ring | The ring to be added. |
Definition at line 267 of file CurvePolygon.h.
Referenced by te::rp::SequenceMosaic::execute(), te::vp::LineToPolygonMemory::getPolygons(), and te::rp::Blender::initialize().
|
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. |
Definition at line 123 of file Geometry.cpp.
References te::gm::WKBSize::size(), and te::common::Globals::sm_machineByteOrder.
|
inherited |
It returns an string with the Well-Known Text Representation for the geometry.
Definition at line 112 of file Geometry.cpp.
References te::gm::WKTWriter::write().
|
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. |
Definition at line 472 of file Geometry.cpp.
References te::gm::CapRoundType, and TE_GEOS_DEFAULT_QUADRANT_SEGMENTS.
Referenced by te::vp::BufferMemory::setBuffer().
|
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. |
Definition at line 481 of file Geometry.cpp.
References te::gm::CapRoundType.
|
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. |
Definition at line 486 of file Geometry.cpp.
References TE_TR.
void te::gm::CurvePolygon::clear | ( | ) |
It deletes all the rings of the CurvePolygon and clear it.
Definition at line 130 of file CurvePolygon.cpp.
References te::common::FreeContents().
Referenced by te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), and te::rp::GeoMosaic::execute().
|
virtual |
It clones the linestring.
Implements te::dt::AbstractData.
Reimplemented in te::gm::Polygon.
Definition at line 82 of file CurvePolygon.cpp.
|
virtual |
It computes the minimum bounding rectangle for the curve polygon.
cascade | If true, it will update the MBR of its parts. |
Implements te::gm::Geometry.
Definition at line 246 of file CurvePolygon.cpp.
References te::gm::Envelope::makeInvalid().
Referenced by te::layout::Utils::convertToMillimeter().
|
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. |
Definition at line 330 of file Geometry.cpp.
References TE_TR.
Referenced by te::edit::Repository::getFeature(), and te::gm::SatisfySpatialRelation().
|
virtualinherited |
This method calculates the Convex Hull of a geometry.
std::exception | It will throw an exception if the operation could not be performed. |
Definition at line 505 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::GTFilter::getPt1ConvexHullArea(), and 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. |
Definition at line 429 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::SatisfySpatialRelation().
|
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. |
Definition at line 410 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::SatisfySpatialRelation().
|
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. |
Definition at line 292 of file Geometry.cpp.
References TE_TR.
Referenced by te::edit::Repository::getFeature(), and te::gm::SatisfySpatialRelation().
|
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. |
Definition at line 567 of file Geometry.cpp.
References TE_TR.
Referenced by te::vp::BufferMemory::dissolveMemory(), te::vp::BufferQuery::dissolveQuery(), and te::vp::BufferMemory::setBuffer().
|
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. |
Definition at line 235 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::SatisfySpatialRelation().
|
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. |
Definition at line 453 of file Geometry.cpp.
References TE_TR.
Referenced by te::sa::CalculateDistance(), te::qt::widgets::Measure::calculateLength(), te::sa::GPMConstructorDistanceStrategy::constructStrategy(), te::sa::GPMConstructorAdjacencyStrategy::constructStrategy(), te::st::IDWInterpolator::estimate(), and te::gm::locateAlong().
|
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. |
Definition at line 612 of file Geometry.cpp.
References TE_TR.
|
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. |
Definition at line 214 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::SatisfySpatialRelation().
|
virtual |
It returns the area of this surface, as measured in the spatial reference system of this surface.
Implements te::gm::Surface.
Definition at line 136 of file CurvePolygon.cpp.
References TE_TR.
Referenced by te::vp::GeometricOpMemory::CalculateTabularOp(), te::qt::widgets::Measure::drawPolygon(), te::rp::ClassifierISOSegStrategy::execute(), te::attributefill::VectorToVectorMemory::getArea(), and te::attributefill::RasterToVector::run().
|
virtualinherited |
It returns the geometry boundary.
std::exception | It will throw an exception if the operation could not be performed. |
Definition at line 202 of file Geometry.cpp.
References TE_TR.
Referenced by te::ag::Canvas::draw().
|
virtual |
It returns the mathematical centroid for this surface as a point.
Implements te::gm::Surface.
Definition at line 148 of file CurvePolygon.cpp.
References TE_TR.
Referenced by te::sa::SpatialWeightsExchanger::associateGeometry(), te::graph::RAGGraphBuilder::createVertexObjects(), and te::graph::FlowGraphBuilder::createVertexObjects().
|
virtual |
It returns the mathematical centroid for this surface as a coordinate.
Implements te::gm::Surface.
Definition at line 173 of file CurvePolygon.cpp.
References te::gm::Point::getX(), and te::gm::Point::getY().
Referenced by te::map::AbstractLayerRenderer::buildChart(), and te::map::QueryLayerRenderer::buildChart().
|
inherited |
It returns the number of measurements or axes needed to describe a position in a coordinate system.
It returns:
Definition at line 94 of file Geometry.cpp.
References te::gm::GetCoordDimension().
Referenced by te::gm::WKBSize::visit().
|
virtual |
It returns a coordinate guaranteed to be on this surface.
Implements te::gm::Surface.
Definition at line 194 of file CurvePolygon.cpp.
|
virtualinherited |
Surfaces are 2-dimensional objects.
Implements te::gm::Geometry.
Definition at line 66 of file Surface.cpp.
References te::gm::A.
|
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)].
Definition at line 99 of file Geometry.cpp.
References te::gm::GetGeomFromEnvelope().
te::gm::Curve * te::gm::CurvePolygon::getExteriorRing | ( | ) | const |
It returns the exterior ring of this CurvePolygon.
Definition at line 87 of file CurvePolygon.cpp.
|
virtual |
The name of the geometry subtype for curve polygons is: CurvePolygon.
Implements te::gm::Geometry.
Reimplemented in te::gm::Polygon.
Definition at line 211 of file CurvePolygon.cpp.
|
inlineinherited |
It returns the geometry subclass type identifier.
Definition at line 178 of file Geometry.h.
Referenced by terralib4::Transactor::addProperty(), te::map::AbstractLayerRenderer::buildChart(), te::map::QueryLayerRenderer::buildChart(), te::sa::CalculateDistance(), te::vp::GeometricOpMemory::CalculateTabularOp(), te::graph::RAGGraphBuilder::createVertexObjects(), te::graph::FlowGraphBuilder::createVertexObjects(), te::rst::PolygonIterator< T >::decompose(), te::edit::Renderer::draw(), te::qt::widgets::Canvas::draw(), te::ag::Canvas::draw(), te::qt::widgets::Info::drawGeometry(), te::edit::FindSegment(), te::gm::FixGeometry(), te::attributefill::VectorToVectorMemory::getAllPointsOfGeometry(), te::sa::GetArea(), te::attributefill::VectorToVectorMemory::getArea(), te::sa::GetCentroidCoord(), te::edit::GetCoordinates(), te::pgis::Transactor::getGeometryInfo(), te::vp::GetGeometryUnion(), te::vp::PolygonToLineMemory::getLines(), te::edit::GetLines(), te::addressgeocoding::AddressGeocodingOp::getLines(), te::vp::LineToPolygonMemory::getPolygons(), te::attributefill::RasterToVector::getTexture(), te::serialize::xml::Read(), te::rst::PolygonIterator< T >::setNextLine(), te::vp::GeometricOpQuery::SetOutputDSet(), te::vp::MultipartToSinglepart::single2multi(), te::gm::WKBWriter::visit(), te::pgis::EWKBWriter::visit(), te::gm::WKTWriter::visit(), Write2EWKB(), and te::gm::Write2WKB().
|
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. |
Definition at line 633 of file Geometry.cpp.
References te::gm::UnknownGeometryType.
te::gm::Curve * te::gm::CurvePolygon::getInteriorRingN | ( | std::size_t | i | ) | const |
It returns the n-th interior ring for this curve polygon as a curve.
i | The ring index. |
Definition at line 110 of file CurvePolygon.cpp.
Referenced by te::layout::Utils::convertToMillimeter().
|
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.
Definition at line 104 of file Geometry.cpp.
Referenced by te::map::AbstractLayerRenderer::buildChart(), te::map::QueryLayerRenderer::buildChart(), te::edit::Repository::buildIndex(), computeDataSetEnvelope(), te::da::SpatialQueryProcessor::computeEnvelope(), te::graph::RAGGraphBuilder::createEdgeObjects(), te::rst::CropRaster(), DataSetAdapterLayerReader(), te::vp::BufferMemory::dissolveMemory(), te::vp::BufferQuery::dissolveQuery(), te::qt::widgets::Canvas::draw(), te::qt::widgets::Measure::drawPolygon(), te::rp::ClassifierDummyStrategy::execute(), te::rp::GeoMosaic::execute(), te::rp::TiePointsMosaic::execute(), te::stmem::DataSet::filter(), te::layout::MapModel::generateSystematic(), te::sqlite::DataSourceTransactor::getDataSet(), te::wcs::Transactor::getDataSet(), te::wms::Transactor::getDataSet(), te::da::SpatialQueryProcessor::getOIDSet(), te::st::Trajectory::getPatches(), te::sa::SamplePointsGeneratorStratified::getPointInGeometry(), te::rst::TileIndexer::getTileIndex(), te::rst::PolygonIterator< T >::PolygonIterator(), te::layout::Utils::remapToPlanar(), te::attributefill::RasterToVector::run(), te::layout::LineModel::setCoords(), te::layout::Utils::textBoundingBox(), and te::rst::TileIndexer::TileIndexer().
|
virtual |
it returns the number of points (vertexes) in the geometry.
Implements te::gm::Geometry.
Definition at line 268 of file CurvePolygon.cpp.
std::size_t te::gm::CurvePolygon::getNumInteriorRings | ( | ) | const |
It returns the number of interior rings in this CurvePolygon.
Definition at line 93 of file CurvePolygon.cpp.
Referenced by te::layout::Utils::convertToMillimeter().
|
inline |
It returns the number of rings in this CurvePolygon.
Definition at line 153 of file CurvePolygon.h.
Referenced by te::qt::widgets::Canvas::draw(), te::ag::Canvas::draw(), te::attributefill::VectorToVectorMemory::getAllPointsOfGeometry(), te::rp::Blender::getSegments(), te::rp::Blender::initialize(), te::rst::TileIndexer::TileIndexer(), te::sqlite::EWKBSize::visit(), te::gm::WKBSize::visit(), te::gm::WKBWriter::visit(), te::pgis::EWKBWriter::visit(), and te::gm::WKTWriter::visit().
|
virtual |
It returns the length of the boundary for the surface.
Implements te::gm::Surface.
Definition at line 199 of file CurvePolygon.cpp.
References TE_TR.
Referenced by te::vp::GeometricOpMemory::CalculateTabularOp().
|
virtual |
It returns a point guaranteed to be on this surface.
Implements te::gm::Surface.
Definition at line 189 of file CurvePolygon.cpp.
|
inline |
It returns the n-th ring for this curve polygon as a curve.
i | The ring index. |
Definition at line 193 of file CurvePolygon.h.
Referenced by te::qt::widgets::Canvas::draw(), te::ag::Canvas::draw(), te::attributefill::VectorToVectorMemory::getAllPointsOfGeometry(), te::rp::Blender::getSegments(), te::rp::Blender::initialize(), te::sqlite::EWKBSize::visit(), te::gm::WKBSize::visit(), te::gm::WKBWriter::visit(), and te::pgis::EWKBWriter::visit().
|
inline |
It returns the polygon rings.
Definition at line 300 of file CurvePolygon.h.
Referenced by te::vp::PolygonToLineMemory::getLines(), te::edit::GetLines(), and te::pgis::EWKBReader::getPolygon().
|
inline |
It returns the polygon rings.
Definition at line 311 of file CurvePolygon.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::edit::CreateLineTool::buildLine(), te::edit::CreatePolygonTool::buildLine(), te::edit::CreatePolygonTool::buildPolygon(), te::sa::CalculateDistance(), te::ado::Convert2Ado(), te::ogr::Convert2OGR(), te::rst::PolygonIterator< T >::decompose(), te::edit::Renderer::draw(), te::edit::Renderer::drawVertexes(), te::edit::FindSegment(), te::vp::GetGeometryUnion(), te::attributefill::VectorToVectorMemory::getKDtree(), te::da::SpatialQueryProcessor::getOIDSet(), te::vp::LineToPolygonMemory::getPolygons(), te::vp::LineToPolygonMemory::line2Polygon(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::vp::PolygonToLineMemory::polygon2Line(), te::rst::PolygonIterator< T >::PolygonIterator(), te::rst::PolygonIterator< T >::setNextLine(), te::vp::GeometricOpQuery::SetOutputDSet(), te::vp::MultipartToSinglepart::single2multi(), and te::pgis::EWKBWriter::visit().
|
virtualinherited |
It returns the data type code associated to the data value.
Implements te::dt::AbstractData.
Definition at line 694 of file Geometry.cpp.
References te::dt::GEOMETRY_TYPE.
|
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. |
Definition at line 139 of file Geometry.cpp.
References te::gm::WKBWriter::write().
Referenced by te::ado::Convert2Ado(), and te::ogr::Convert2OGR().
|
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.
Definition at line 134 of file Geometry.cpp.
References te::gm::WKBSize::size().
Referenced by te::pgis::PreparedQuery::bind(), te::ado::Convert2Ado(), te::ogr::Convert2OGR(), and te::pgis::Convert2PostGIS().
|
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. |
Definition at line 521 of file Geometry.cpp.
References TE_TR.
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. |
Definition at line 254 of file Geometry.cpp.
References TE_TR.
Referenced by te::vp::BufferMemory::dissolveMemory(), te::vp::BufferQuery::dissolveQuery(), te::rp::ClassifierDummyStrategy::execute(), te::st::Trajectory::getPatches(), and te::gm::SatisfySpatialRelation().
|
inherited |
It returns true if this geometric object has z coordinate values.
Definition at line 180 of file Geometry.cpp.
|
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. |
Definition at line 144 of file Geometry.cpp.
References TE_TR.
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. |
Definition at line 643 of file Geometry.cpp.
References te::gm::UnknownGeometryType.
Referenced by te::sqlite::Convert2TerraLib().
|
inherited |
It returns true if this geometric object has m coordinate values.
Definition at line 191 of file Geometry.cpp.
|
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. |
Definition at line 156 of file Geometry.cpp.
References TE_TR.
|
virtualinherited |
It tells if the geometry is well formed.
std::exception | It will throw an exception if the operation could not be performed. |
Definition at line 168 of file Geometry.cpp.
References TE_TR.
Referenced by te::attributefill::VectorToVectorMemory::checkGeometries(), te::vp::BufferMemory::dissolveMemory(), te::vp::BufferQuery::dissolveQuery(), te::attributefill::VectorToVectorMemory::getIntersections(), te::vp::GeometricOpMemory::SetAggregByAttribute(), te::vp::BufferMemory::setBuffer(), and te::vp::GeometricOpQuery::SetOutputDSet().
|
staticinherited |
It loads the internal MAP of geometry type names to geometry type ids.
Definition at line 648 of file Geometry.cpp.
References te::gm::GeometryCollectionMType, te::gm::GeometryCollectionType, te::gm::GeometryCollectionZMType, te::gm::GeometryCollectionZType, te::gm::GeometryMType, te::gm::GeometryType, te::gm::GeometryZMType, te::gm::GeometryZType, te::gm::LineStringMType, te::gm::LineStringType, te::gm::LineStringZMType, te::gm::LineStringZType, te::gm::MultiLineStringMType, te::gm::MultiLineStringType, te::gm::MultiLineStringZMType, te::gm::MultiLineStringZType, te::gm::MultiPointMType, te::gm::MultiPointType, te::gm::MultiPointZMType, te::gm::MultiPointZType, te::gm::MultiPolygonMType, te::gm::MultiPolygonType, te::gm::MultiPolygonZMType, te::gm::MultiPolygonZType, te::gm::PointMType, te::gm::PointType, te::gm::PointZMType, te::gm::PointZType, te::gm::PolygonMType, te::gm::PolygonType, te::gm::PolygonZMType, and te::gm::PolygonZType.
Referenced by te::gm::Module::initialize().
|
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.
Definition at line 448 of file Geometry.cpp.
|
virtual |
Assignment operator.
rhs | The other geometry. |
Definition at line 66 of file CurvePolygon.cpp.
References te::common::Clone(), te::common::FreeContents(), m_rings, and te::gm::Surface::operator=().
Referenced by te::gm::Polygon::operator=().
|
inline |
It returns the n-th ring.
i | The coordinate index. |
Definition at line 208 of file CurvePolygon.h.
|
inline |
It returns the n-th ring.
i | The coordinate index. |
Definition at line 223 of file CurvePolygon.h.
|
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. |
Definition at line 349 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::SatisfySpatialRelation().
|
inline |
It adds the curve to the curve polygon.
ring | The ring to be added. |
Definition at line 279 of file CurvePolygon.h.
Referenced by te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), te::rp::GeoMosaic::execute(), te::rp::TiePointsMosaic::execute(), te::rp::SequenceMosaic::execute(), and te::rp::Blender::getTileIndexers().
|
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. |
Definition at line 368 of file Geometry.cpp.
References TE_TR.
|
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. |
Definition at line 389 of file Geometry.cpp.
References TE_TR.
void te::gm::CurvePolygon::removeRingN | ( | std::size_t | i | ) |
It removes the n-th ring in this CurvePolygon.
i | The index of the ring we want to remove. |
Definition at line 123 of file CurvePolygon.cpp.
void te::gm::CurvePolygon::setNumRings | ( | std::size_t | size | ) |
It sets the number of rings in this curve polygon.
If the new size is less than the old it will drop the geometries.
size | The new number of rings for the curve polygon. |
Definition at line 98 of file CurvePolygon.cpp.
void te::gm::CurvePolygon::setRingN | ( | std::size_t | i, |
Curve * | r | ||
) |
It sets the informed position ring to the new one.
i | The ring index. |
r | The new ring to be placed in the informed position. |
Definition at line 116 of file CurvePolygon.cpp.
Referenced by te::qt::widgets::SymbologyPreview::build(), te::edit::CreatePolygonTool::buildPolygon(), te::gm::WKTActions::buildPolygon(), te::qt::widgets::PolygonAcquire::drawPolygon(), te::qt::widgets::Measure::drawPolygon(), te::layout::Utils::drawRectW(), te::layout::MapModel::generateSystematic(), te::gm::GetGeomFromEnvelope(), te::gm::WKBReader::getPolygon(), te::qt::widgets::Canvas::getTextBoundary(), te::ag::Canvas::getTextBoundary(), te::qt::widgets::PolygonAcquire::mouseDoubleClickEvent(), and te::layout::LegendItem::paint().
|
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. |
Implements te::gm::Geometry.
Definition at line 216 of file CurvePolygon.cpp.
Referenced by te::rp::FeederConstRasterDirectory::applyGeometryRestriction(), te::edit::CreatePolygonTool::buildPolygon(), te::rp::GeoMosaic::execute(), te::rp::TiePointsMosaic::execute(), te::rp::SequenceMosaic::execute(), te::qt::widgets::PolygonAcquire::mouseDoubleClickEvent(), and te::attributefill::VectorToRaster::run().
|
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. |
Definition at line 590 of file Geometry.cpp.
References TE_TR.
|
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(), te::qt::widgets::ROIManagerWidget::drawROISet(), te::attributefill::VectorToVectorMemory::getClassWithHighestIntersectionArea(), te::attributefill::VectorToVectorMemory::getPercentageOfEachClassByArea(), and te::attributefill::VectorToVectorMemory::getWeightedByArea().
|
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. |
Definition at line 273 of file Geometry.cpp.
References TE_TR.
Referenced by te::gm::SatisfySpatialRelation().
|
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. |
Implements te::gm::Geometry.
Definition at line 226 of file CurvePolygon.cpp.
References TE_TR.
Referenced by te::edit::CreatePolygonTool::buildPolygon(), and te::ag::Canvas::getTextBoundary().
|
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. |
Definition at line 544 of file Geometry.cpp.
References TE_TR.
Referenced by te::vp::BufferMemory::dissolveMemory(), te::vp::BufferQuery::dissolveQuery(), te::rp::SequenceMosaic::execute(), te::vp::GetGeometryUnion(), te::qt::widgets::ClippingWizardPage::getLayerClipping(), and te::addressgeocoding::AddressGeocodingOp::getLineString().
|
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. |
Definition at line 311 of file Geometry.cpp.
References TE_TR.
Referenced by te::graph::LayerRenderer::drawMemoryGraph(), te::sa::SamplePointsGeneratorStratified::getPointInGeometry(), and te::gm::SatisfySpatialRelation().
|
protectedinherited |
Internal geometry type.
Definition at line 864 of file Geometry.h.
Referenced by te::gm::CircularString::CircularString(), te::gm::LineString::LineString(), and te::gm::Geometry::operator=().
|
mutableprotectedinherited |
The geometry minimum bounding rectangle.
Definition at line 866 of file Geometry.h.
Referenced by te::gm::Geometry::~Geometry().
|
private |
An array with the ring list.
Definition at line 439 of file CurvePolygon.h.
Referenced by CurvePolygon(), and operator=().
|
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 |
Definition at line 441 of file CurvePolygon.h.