Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:documentation:devguide:geometry_module [2016/01/19 08:57] gribeiro [Set Operations] |
wiki:documentation:devguide:geometry_module [2016/02/12 09:36] (current) gribeiro [General Concepts] |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| It is important to notice that this module refers to //**a geometry model to be used in main memory**// and //**it doesn't assume any kind of persistence or data storage management**//. This section explains the basic concepts, design behind this module ad how to use it. | It is important to notice that this module refers to //**a geometry model to be used in main memory**// and //**it doesn't assume any kind of persistence or data storage management**//. This section explains the basic concepts, design behind this module ad how to use it. | ||
| - | All the types offered by Geometry module are in the namespace ''te::gm''. Check the [[http://www.dpi.inpe.br/terralib5/codedocs_5.1.0/d9/dba/group__geometry.html|DOxygen documentation of this module]], where these and other classes are documented in details. | + | All the types offered by Geometry module are in the namespace ''te::gm''. Check the [[http://www.dpi.inpe.br/terralib5/codedocs_5.1.0/d9/dba/group__geometry.html|Doxygen documentation of this module]], where these and other classes are documented in details. |
| ===== General Concepts ===== | ===== General Concepts ===== | ||
| Line 14: | Line 14: | ||
| * A 1-dimensional geometry is one with a geometric dimension of 1 (one). Curves (lines) are 1-dimensional objects. | * A 1-dimensional geometry is one with a geometric dimension of 1 (one). Curves (lines) are 1-dimensional objects. | ||
| * A 2-dimensional geometry is one with a geometric dimension of 2 (two). Surfaces (polygons) are 2-dimensional objects. | * A 2-dimensional geometry is one with a geometric dimension of 2 (two). Surfaces (polygons) are 2-dimensional objects. | ||
| - | * We can have geometries in ℜ2, ℜ3 or ℜ4 coordinate spaces. | + | * We can have geometries in ℜ<sup>2</sup>, ℜ<sup>3</sup> or ℜ<sup>4</sup> coordinate spaces. |
| * The //z// coordinate value not necessarely represents altitude. | * The //z// coordinate value not necessarely represents altitude. | ||
| * The //m// coordinate value represents arbitrary measurement. | * The //m// coordinate value represents arbitrary measurement. | ||
| * The term //ring// is applied to a closed curve (the first and last points are coincident). | * The term //ring// is applied to a closed curve (the first and last points are coincident). | ||
| - | |||
| ===== Geometry Class Hierarchy ===== | ===== Geometry Class Hierarchy ===== | ||
| Line 43: | Line 42: | ||
| <code cpp> | <code cpp> | ||
| - | std::unique_ptr<te::gm::Point> p = std::make_unique<te::gm::Point>(-54.0, -12.0, 4326); | + | te::gm::Point p(-54.0, -12.0, 4326); |
| </code> | </code> | ||
| Line 69: | Line 68: | ||
| <code cpp> | <code cpp> | ||
| - | std::unique_ptr<te::gm::LineString> l = std::make_unique<te::gm:: LineString>(2, te::gm::LineStringType); | + | te::gm::LineString l(2, te::gm::LineStringType); |
| - | l->setPoint(0, -54.0, -12.0); | + | l.setPoint(0, -54.0, -12.0); |
| - | l->setPoint(1, -55.0, -13.0); | + | l.setPoint(1, -55.0, -13.0); |
| </code> | </code> | ||
| Line 94: | Line 93: | ||
| <code cpp> | <code cpp> | ||
| - | std::unique_ptr<te::gm::LinearRing> r = std::make_unique<te::gm::LinearRing>(5, te::gm::LineStringType, 0); | + | te::gm::LinearRing r(5, te::gm::LineStringType, 0); |
| - | r->setPoint(0, 1, 2); | + | r.setPoint(0, 1, 2); |
| - | r->setPoint(1, 1, 7); | + | r.setPoint(1, 1, 7); |
| - | r->setPoint(2, 7, 7); | + | r.setPoint(2, 7, 7); |
| - | r->setPoint(3, 7, 2); | + | r.setPoint(3, 7, 2); |
| - | r->setPoint(4, 1, 2); | + | r.setPoint(4, 1, 2); |
| </code> | </code> | ||