27 #include "../common/Translator.h" 
   32 #ifdef TERRALIB_GEOS_ENABLED 
   34 #include <geos/algorithm/CentroidArea.h> 
   35 #include <geos/geom/MultiPolygon.h> 
   56 #ifdef TERRALIB_GEOS_ENABLED 
   57   std::auto_ptr<geos::geom::Geometry> thisGeom(GEOSWriter::write(
this));
 
   59   geos::algorithm::CentroidArea c;
 
   61   c.add(thisGeom.get());
 
   63   geos::geom::Coordinate coord;
 
   65   if(c.getCentroid(coord))
 
   67     Point* pt = 
new Point(coord.x, coord.y, m_srid, 0);
 
MultiPolygon is a MultiSurface whose elements are Polygons. 
 
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code. 
 
MultiPolygon(std::size_t nGeom, GeomType t, int srid=0, Envelope *mbr=0)
It initializes the Geometry with the specified spatial reference system id and envelope. 
 
A point with x and y coordinate values. 
 
An utility struct for representing 2D coordinates. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
static const std::string sm_typeName
Geometry type name for MultiPolygon. 
 
virtual MultiSurface & operator=(const MultiSurface &rhs)
Assignment operator. 
 
const std::string & getGeometryType() const 
The name of the Geometry subtype is: MultiPolygon. 
 
const double & getY() const 
It returns the Point y-coordinate value. 
 
A point with x and y coordinate values. 
 
An Envelope defines a 2D rectangular region. 
 
MultiPolygon is a MultiSurface whose elements are Polygons. 
 
A base class for values that can be retrieved from the data access module. 
 
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
 
A class that converts a TerraLib geometry to a GEOS geometry. 
 
te::dt::AbstractData * clone() const 
It clones the multi polygon. 
 
MultiSurface is a class that represents a 2-dimensional GeometryCollection whose elements are surface...
 
Point * getCentroid() const 
 
MultiPolygon & operator=(const MultiPolygon &rhs)
Assignment operator. 
 
const double & getX() const 
It returns the Point x-coordinate value. 
 
Coord2D * getCentroidCoord() const