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 14:48] gribeiro [Geometry Module] |
wiki:documentation:devguide:geometry_module [2016/02/12 09:36] (current) gribeiro [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> | ||