Artifact [7e5bbea3b6]
Not logged in

Artifact 7e5bbea3b6e15afe10cba45d20bbc1d9faeba645:

Wiki page [topo-advanced] by sandro 2015-11-13 14:10:58.
D 2015-11-13T14:10:58.751
L topo-advanced
U sandro
W 4160
<table cellspacing="12" width="100%">
<tr><td colspan="2">
<table width="100%" bgcolor="#f0f0f8">
<tr><td align="center">
<h1>Topology-Geometry: an advanced tutorial</h1>
</td></tr></table>
<table width="100%"><tr>
<td width="33%" align="left"><a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=toponet-intermediate">previous page</a></td>
<td align="center"><a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=misc-docs">back to index</a></td>
<td width="33%" align="right"><a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=topo-advanced">next page</a></td>
</tr></table>
<h3>TopoLayers and TopoFeatures</h3>
In the previous tutorial we've examined a first couple of SQL functions intended to export a GeoTable out from an existing Topology: <b>TopoGeo_ToGeoTable()</b> and <b>TopoGeo_ToGeoTableGeneralize()</b>.<br>
Anyway SpatiaLite supports an more sophisticated (and complex) approach based on <b>TopoLayers</b> and <b>TopoFeatures</b> specifically intended to support a very flexible mechanism for exporting a full set of GeoTable(s) directly deriving from a Topology.
<h4>a conceptual reference framework</h4>
<ul>
<li>an ISO Topology is just intended to support a consistent set of <b>Nodes</b>, <b>Edges</b> and <b>Faces</b> primitives fully covering the plane.
Topology primitives correspond to pure geometries, and can never be directly  associated to a corresponding set of information attributes.
Both Node and Edge primitives directly correspond to a <u><i>real geometry</i></u>, but Face primitives simply correspond to a <u><i>virtual geometry</i></u> thus necessarily requiring to be dynamically recontructed every time that they are referenced (and this could easily become a real bottleneck).</li>
<li>on the other hand a GeoTable (aka <u><i>layer</i></u>, as in the common GIS parlance) is always based on many distinct features, and for each feature a Geometry and an associated set of information attributes are expected to be declared.</li>
<li>there is further difference to be taken in proper account: Topology primitives necessarily are elementary. Feature Geometries can usually represent some complex type: MULTIPOINT, MULTILINESTRING, MULTIPOLYGON and, may be, GEOMETRYCOLLECTION. So it should be absolutely clear that a Feature Geometry does not necessarily corresponds to a single Topology primitive ; a Feature Geometry could easily be derived from aggregating many different Topology primites.</li> 
<li>that's not all: many different GeoTables could evenatually be derived from a single Topology; and the same Topology primitive could play a very different role in everyone of these GeoTables.<br>
Just a basically simple example: imagine a Topology corresponding to some cadastral map. We'll surely have many potential layers: buildings, agricultural land, populated places, administrative boundaries, roads, ponds, rivers, fences and so on.<br>
In such a context a fence could easily correspond to a Feature within the "<i><b>fences</b></i>" layer, could probably delimit two adjacent agricultural areas and could eventually be part of some administrative boundary.</li>
<li><b>TopoLayers</b> and <b>TopoFeatures</b> represent a complex mapping structure allowing to establish permanent explicit correspondences between Topology Primitives and GeoTable Features.
<ul>
<li>each <b>TopoLayer</b> directly corresponds to a single GeoTable to be exported from the Topology.</li>
<li>a <b>TopoFeature</b> corresponds to a single Feature, contains an individual set of information attributes and detailedly specifies which Topology primitives must be aggregated in order to compose the approriate Geometry.</li>
</ul></li>
</ul>

<br><br>
<table width="100%"><tr>
<td width="33%" align="left"><a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=topone-advanced">previous page</a></td>
<td align="center"><a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=misc-docs">back to index</a></td>
<td width="33%" align="right"><a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=topo-advanced">next page</a></td>
</tr></table>
Z 6eee9758fcf76c39732d7c5cc2bf8977