62 std::cout <<
"Creating geometries..." << std::endl;
67 std::cout << pt1->
asText() << std::endl;
71 std::cout << pt2->
asText() << std::endl;
75 std::cout << pt3->
asText() << std::endl;
80 std::cout << l1->
asText() << std::endl;
84 std::cout << l2->
asText() << std::endl;
88 std::cout << l3->
asText() << std::endl;
93 std::cout << p->
asText() << std::endl;
97 std::cout << pHole->
asText() << std::endl;
101 std::cout << gc->
asText() << std::endl;
106 std::cout <<
"Calculating spatial relations..." << std::endl;
138 std::cout <<
"Executing set operations..." << std::endl;
139 std::cout <<
"Results:" << std::endl;
144 std::cout << mpt->
asText() << std::endl;
149 std::cout << mgeom->
asText() << std::endl;
154 std::cout << ml->
asText() << std::endl;
159 std::cout << ptInt->
asText() << std::endl;
164 std::cout << pDiff->
asText() << std::endl;
169 std::cout << lInt->
asText() << std::endl;
175 std::cout <<
"Executing wkb conversion..." << std::endl;
176 std::cout <<
"Results:" << std::endl;
182 std::cout << g->
asText() << std::endl;
191 std::cout << g->
asText() << std::endl;
200 std::cout << g->
asText() << std::endl;
209 std::cout << g->
asText() << std::endl;
218 std::cout << g->
asText() << std::endl;
227 std::cout << g->
asText() << std::endl;
236 std::cout << g->
asText() << std::endl;
te::gm::Polygon * createPolygon()
void readWkts(const std::string &filePath)
std::size_t getWkbSize() const _NOEXCEPT_OP(true)
It returns the size required by a WKB representation for this geometric object.
An static class with global definitions.
void write(const Geometry *geom)
It serializes the geometry to a WKB representation into the specified buffer.
te::gm::GeometryCollection * gc
te::gm::Geometry * intersection(te::gm::Geometry *g1, te::gm::Geometry *g2)
LineString is a curve with linear interpolation between points.
void finalize()
It finalizes the TerraLib Platform.
static TerraLib & getInstance()
It returns a reference to the singleton instance.
A point with x and y coordinate values.
std::string asText() const _NOEXCEPT_OP(true)
It returns an string with the Well-Known Text Representation for the geometry.
te::gm::Point * createPointZ(const double &x, const double &y, const double &z)
te::gm::Point * createPoint(const double &x, const double &y)
te::gm::Polygon * createPolygonWithHole()
te::gm::Geometry * difference(te::gm::Geometry *g1, te::gm::Geometry *g2)
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
te::gm::GeometryCollection * createGeometryCollection()
bool spatialRelation(te::gm::Geometry *g1, te::gm::Geometry *g2, te::gm::SpatialRelation relation)
void initialize()
It initializes the TerraLib Platform.
void spatialRelationsExamples()
void wkbConversionExamples()
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
te::gm::Geometry * Union(te::gm::Geometry *g1, te::gm::Geometry *g2)
This file contains include headers for the TerraLib Common Runtime module.
A set of geometry examples.
This file contains include headers for the Vector Geometry model of TerraLib.
It is a collection of other geometric objects.
static Geometry * read(const char *wkb)
It returns a valid geometry from a given WKB.
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.
te::gm::LineString * createLineString(const double &xi, const double &yi, const double &xf, const double &yf)
void setOperationsExamples()