Mapping complex geometries
Brainstorm and discussion page for coping with complex geometries in deegree3.
deegree3 uses a rich geometry model that aims to be a complete implementation of ISO 19107 / GML 3.1.1 (GML 3.2 only allows a subset of GML 3.1.1 geometries, so it is covered as well). Parsing (GML 3.1.1), construction and generic representation of the geometry types has basically been solved and implemented. However, a solution for mapping complex geometries (e.g. curves with several segments using non-linear interpolation methods) to the ones defined by the Simple Feature Specification is needed. The rationale behind this are the following aspects:
- Topological operations (e.g. intersects) on complex geometries in-memory. Currently, the most complete implementation of topological operations is JTS (Java Topology Suite), but it only supports the simple geometry types defined in the SFS.
- Storing and retrieving of complex geometries in/from spatial databases. Popular spatial databases like PostGIS and Oracle Spatial only have a geometry type system that only supports the SFS and to a certain deegree non-linear line interpolations (arcs).
The basic idea to tackle these challenges is to map complex geometries (e.g. curves with several segments using non-linear interpolation methods) to the best-fit in the SFS (for the curve to a single-segment line string). It should be possible to augment the SFS geometry with additional information, so the original complex geometry may be reconstructed faithfully.
Another aspect are ids of geometries and geometry parts (e.g. in GML, the points of line string may have gml:id attributes) and XLinkProperties. This information should be maintained as well.
1.1. 3D geometries
The SFS does not support geometries with three-dimensional coordinates. However, geometry models that implement the SFS often allow to define and store z-coordinate values. Topological operations offered in these models don't take the z-coordinate into account, but just ignore it (think: z=0 for all points). For 3D-geometries, full support for topological operations appears to be out of reach in deegree 3 -- yet it should be possible to offer operations that work on the so-called footprint. For many use-cases (e.g. selecting Solid-geometries of buildings in a certain area), this is still a valuable feature.