Back to Map tool page
Creating the topo-tuscany.sqlite sample database
This quick tutorial explains by practical step by step examples how the topo-tuscany.sqlite sample database was actually created.It's mainly intended for didactic purposes: you are expected to replicate all single steps, and at the end of the process you'll surely master the new tools and wizards supported by spatialite_gui 2.1.0.
This last sample will just contain two Vector Coverages based on the same datasets we've alredy used when building the tuscany.sqlite sample.
- topogeo: a Topology (ISO TopoGeo) based on Municipalities administrative boundaries.
- toponet: a Network (ISO Spatial TopoNet) based on Railways.
Step #1: populating the database by creating both the Topology and the Network
You'll start first by creating and populating the Topology. | ATTACH DATABASE "C:/sviluppo64-benchmark//tuscany.sqlite" AS "ext"; SELECT CreateTopology('topogeo', 3003); SELECT TopoGeo_FromGeoTable('topogeo', 'ext', 'comuni', 'geometry', 512); SELECT ST_ValidateTopoGeo('topogeo'); SELECT * FROM topogeo_validate_topogeo; SELECT TopoGeo_DisambiguateSegmentEdges('topogeo'); SELECT TopoGeo_UpdateSeeds('topogeo'); |
Then you'll complete this step by creating and populating the Network. | SELECT CreateNetwork('toponet', 1, 3003); SELECT TopoNet_FromGeoTable('toponet', 'ext', 'elem_ferr', 'geometry'); SELECT ST_ValidSpatialNet('toponet'); SELECT * FROM toponet_valid_spatialnet; SELECT TopoNet_DisambiguateSegmentLinks('toponet'); SELECT TopoNet_UpdateSeeds('toponet'); DETACH DATABASE "ext"; |
Step #2: creating the two Vector Coverages based on TopoGeo and TopoNet.
You can easily create the first Vector Coverage based on the Topology. | ||
Just select a Topology from the list, then fill all dialog fields and finally confirm. | ||
Now you can easily create the second Vector Coverage based on the Metwork. | ||
Just select a Network from the list, then fill all dialog fields and finally confirm. | ||
Final step: you have to compute the full Extent (BBOX) for all Vector Coverages.
Warning
All right; both the TopoGeo and the TopoNet Vector Coverages are now ready to be published ! |
Back to Map tool page