topology with postgis 2.0
TRANSCRIPT
![Page 2: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/2.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
PostGIS topology timeline
● Presented at FOSS4G 2006PostGIS: future developments
● Drafted in PostGIS 1.1.0Based on ISO SQL/MM
● Integrated in 2010Testsuite, build scripts, packaging
● Further Improved in 2011Full SQL/MM implementation, more utility functions
● Prime-time in PostGIS 2.0.0
![Page 3: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/3.jpg)
PostGIS development timeline and current state
stats by ohloh
![Page 4: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/4.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Why topology ?
● Normalized spatial data● Standard interface● Topological integrity● Reduced storage size● Explicit spatial relationships
![Page 5: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/5.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topological integrity
● Every intersection is a node
Why topology ?
![Page 6: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/6.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topological integrity
● Every intersection is a node
Why topology ?
![Page 7: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/7.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topological integrity
● Edges are shared ...
Why topology ?
![Page 8: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/8.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topological integrity
● … rather than separate entities
Why topology ?
![Page 9: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/9.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Reduced storage size
● Every edge is stored only once
Why topology ?
![Page 10: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/10.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Reduced storage sizeWhy topology ?
● Features in hierarchical layers can be defined by composition. For example:● A state is a collection of regions● A region is a collection of provinces● A province is a collection of municipalities● ....
![Page 11: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/11.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Explicit spatial relationships
● Do they touch ? YES !
Why topology ?
![Page 12: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/12.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Explicit spatial relationships
● For each edge you know the right and left face● For each isolated node you know the face it's in● Every intersection is a node● Nodes are shared
Why topology ?
![Page 15: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/15.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Conceptual model
Next right and left face edges
![Page 21: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/21.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Physical model
● All routines, types and other management objects are stored in the ”topology” schema
● Each topology is stored in its own schema● Metadata tables with informations about
available topologies and topological layers● TopoGeometry datatype
![Page 22: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/22.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topology schema
● <name>.edge● <name>.face● <name>.node● <name>.relation (TopoGeometry composition)
Physical model
![Page 23: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/23.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Metadata tables
● topology.topology● topology.layer
Physical model
![Page 24: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/24.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Functions
● Create, destroy, copy, summarize topologies● Edit topologies (ISO SQL/MM and more)
● Validate topologies● Define layers (simple and hierarchical)
● Define TopoGeometries (simple and hierarchical)
● Transform TopoGeometries to Geometries● Topological GML output
Physical model
![Page 26: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/26.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Package integration
● ./configure --with-topology● Automated regress testing● Documentation
What's new about topology in PostGIS 2.0
![Page 27: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/27.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
SQL/MM topology editing
● ST_AddEdgeNewFaces, ST_AddEdgeModFace● ST_ModEdgeHeal, ST_NewEdgesHeal● ST_GetFaceEdges
What's new about topology in PostGIS 2.0
![Page 28: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/28.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topological GML output
● AsGML(TopoGeometry)● Xref support
What's new about topology in PostGIS 2.0
![Page 29: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/29.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topology construction primitives
● AddNode● AddEdge● AddFace● Polygonize
What's new about topology in PostGIS 2.0
![Page 30: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/30.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topology management
● TopologySummary● CopyTopology
What's new about topology in PostGIS 2.0
![Page 31: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/31.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topology inspection
● GetNodeByPoint● GetEdgeByPoint● GetFaceByPoint● GetRingEdges
What's new about topology in PostGIS 2.0
![Page 32: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/32.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Performance improvements
● Faster cast from TopoGeometry to Geometry● Faster topology validation● Over 30 bugfixes
What's new about topology in PostGIS 2.0
![Page 33: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/33.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Other cherries( loosely related to topologies )
● ST_Split● ST_Snap● ST_UnaryUnion● ST_MakeValid● ST_SharedPaths
What's new in PostGIS 2.0
![Page 35: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/35.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Topology creation and review
=> SET search_path TO topology,public;
=> SELECT CreateTopology('conf');
=> SELECT TopologySummary('conf');
Topology conf (1), SRID -1, precision 0
0 nodes, 0 edges, 1 faces, 0 topogeoms in 0 layers
![Page 36: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/36.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 20)');
![Page 37: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/37.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 20)');
![Page 38: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/38.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 20)');
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(100 20)');
![Page 39: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/39.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 20)');
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(100 20)');
![Page 40: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/40.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 20)');
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(100 20)');
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 -90)');
![Page 41: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/41.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 20)');
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(100 20)');
=> SELECT ST_AddIsoNode( 'conf', 0, 'POINT(10 -90)');
![Page 42: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/42.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 2, 'LINESTRING(10 20, 100 20)');
![Page 43: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/43.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 2, 'LINESTRING(10 20, 100 20)');
![Page 44: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/44.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 2, 'LINESTRING(10 20, 100 20)');
=> SELECTST_AddEdgeModFace( 'conf', 3, 2, 'LINESTRING(10 -90, 100 -90, 100 20)');
![Page 45: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/45.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 2, 'LINESTRING(10 20, 100 20)');
=> SELECTST_AddEdgeModFace( 'conf', 3, 2, 'LINESTRING(10 -90, 100 -90, 100 20)');
![Page 46: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/46.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 2, 'LINESTRING(10 20, 100 20)');
=> SELECTST_AddEdgeModFace( 'conf', 3, 2, 'LINESTRING(10 -90, 100 -90, 100 20)');
![Page 47: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/47.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 3, 'LINESTRING(10 20, 10 -90)');
![Page 48: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/48.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 3, 'LINESTRING(10 20, 10 -90)');
![Page 49: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/49.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 3, 'LINESTRING(10 20, 10 -90)');
=> SELECT ST_AddEdgeModFace( 'conf', 2, 3, 'LINESTRING(100 20, 10 -90)');
![Page 50: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/50.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddEdgeModFace( 'conf', 1, 3, 'LINESTRING(10 20, 10 -90)');
=> SELECT ST_AddEdgeModFace( 'conf', 2, 3, 'LINESTRING(100 20, 10 -90)');
![Page 51: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/51.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 2, 'POINT(100 -90)');
![Page 52: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/52.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 2, 'POINT(100 -90)');
![Page 53: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/53.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 2, 'POINT(100 -90)');
=> SELECT ST_AddEdgeModFace( 'conf', 2, 4, 'LINESTRING(100 20, 180 20, 180 -90, 100 -90)');
![Page 54: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/54.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 2, 'POINT(100 -90)');
=> SELECT ST_AddEdgeModFace( 'conf', 2, 4, 'LINESTRING(100 20, 180 20, 180 -90, 100 -90)');
![Page 55: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/55.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 6, 'POINT(180 -90)');
![Page 56: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/56.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 6, 'POINT(180 -90)');
![Page 57: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/57.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 6, 'POINT(180 -90)');
=> SELECT ST_AddEdgeModFace( 'conf', 3, 5, 'LINESTRING(10 -90, 10 -190, 180 -190, 180 -90)');
![Page 58: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/58.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_ModEdgeSplit( 'conf', 6, 'POINT(180 -90)');
=> SELECT ST_AddEdgeModFace( 'conf', 3, 5, 'LINESTRING(10 -90, 10 -190, 180 -190, 180 -90)');
![Page 59: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/59.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 4, 'POINT(60 -160)');
![Page 60: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/60.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 4, 'POINT(60 -160)');
![Page 61: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/61.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 4, 'POINT(60 -160)');
=> SELECT ST_AddEdgeModFace( 'conf', 6, 6, 'LINESTRING(60 -160, 140 -160, 140 -125, 60 -125, 60 -160)');
![Page 62: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/62.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT ST_AddIsoNode( 'conf', 4, 'POINT(60 -160)');
=> SELECT ST_AddEdgeModFace( 'conf', 6, 6, 'LINESTRING(60 -160, 140 -160, 140 -125, 60 -125, 60 -160)');
![Page 63: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/63.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
ISO SQL/MM Topology Population
=> SELECT TopologySummary('conf');
Topology conf (1), SRID -1, precision 0
6 nodes, 9 edges, 6 faces, 0 topogeoms in 0 layers
![Page 64: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/64.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> CREATE TABLE conf.fa(id SERIAL PRIMARY KEY);
=> SELECT AddTopoGeometryColumn('conf', 'conf', 'fa', 'g', 'POLYGON');
![Page 65: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/65.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> INSERT INTO conf.fa (g) VALUES ( CreateTopoGeom( 'conf', -- Topo name 3, -- type (areal) 1, -- layer id '{{4,3}}' -- face 4 ) );
![Page 66: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/66.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> INSERT INTO conf.fa (g) VALUES ( CreateTopoGeom( 'conf', -- Topo name 3, -- type (areal) 1, -- layer id '{{4,3}}' -- face 4 ) );
![Page 67: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/67.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> INSERT INTO conf.fa (g) VALUES ( CreateTopoGeom( 'conf', 3, 1, -- faces 1 and 5 '{{1,3},{5,3}}' ) );
![Page 68: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/68.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> INSERT INTO conf.fa (g) VALUES ( CreateTopoGeom( 'conf', 3, 1, -- faces 1 and 5 '{{1,3},{5,3}}' ) );
![Page 69: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/69.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> INSERT INTO conf.fa (g) VALUES ( CreateTopoGeom( 'conf', 3, 1, -- faces 2 and 3 '{{2,3},{3,3}}' ) );
![Page 70: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/70.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: areal
=> INSERT INTO conf.fa (g) VALUES ( CreateTopoGeom( 'conf', 3, 1, -- faces 2 and 3 '{{2,3},{3,3}}' ) );
![Page 71: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/71.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> CREATE TABLE conf.fl(id SERIAL PRIMARY KEY);
=> SELECT AddTopoGeometryColumn('conf', 'conf', 'fl', 'g', 'LINE');
![Page 72: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/72.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> INSERT INTO conf.fl (g) VALUES ( CreateTopoGeom( 'conf', -- Topo name 2, -- type (lineal) 2, -- layer id '{{5,2}}' -- edge 5 ) );
![Page 73: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/73.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> INSERT INTO conf.fl (g) VALUES ( CreateTopoGeom( 'conf', -- Topo name 2, -- type (lineal) 2, -- layer id '{{5,2}}' -- edge 5 ) );
![Page 74: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/74.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> INSERT INTO conf.fl (g) VALUES ( CreateTopoGeom( 'conf', 2, 2, -- edges 2 and 7 '{{2,2},{7,2}}' ) );
![Page 75: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/75.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> INSERT INTO conf.fl (g) VALUES ( CreateTopoGeom( 'conf', 2, 2, -- edges 2 and 7 '{{2,2},{7,2}}' ) );
![Page 76: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/76.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> INSERT INTO conf.fl (g) VALUES ( CreateTopoGeom( 'conf', 2, 2, -- edges 3, 1 and 8 '{{3,2},{1,2},{8,2}}' ) );
![Page 77: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/77.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: lineal
=> INSERT INTO conf.fl (g) VALUES ( CreateTopoGeom( 'conf', 2, 2, -- edges 3, 1 and 8 '{{3,2},{1,2},{8,2}}' ) );
![Page 78: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/78.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> CREATE TABLE conf.fp(id SERIAL PRIMARY KEY);
=> SELECT AddTopoGeometryColumn('conf', 'conf', 'fp', 'g', 'POINT');
![Page 79: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/79.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> INSERT INTO conf.fp (g) VALUES ( CreateTopoGeom( 'conf', -- Topo name 1, -- type (puntal) 3, -- layer id '{{2,1}}' -- node 2 ) );
![Page 80: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/80.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> INSERT INTO conf.fp (g) VALUES ( CreateTopoGeom( 'conf', -- Topo name 1, -- type (puntal) 3, -- layer id '{{2,1}}' -- node 2 ) );
![Page 81: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/81.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> INSERT INTO conf.fp (g) VALUES ( CreateTopoGeom( 'conf', 1, 3, -- nodes 1, 4 and 5 '{{1,1},{4,1},{5,1}}' ) );
![Page 82: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/82.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> INSERT INTO conf.fp (g) VALUES ( CreateTopoGeom( 'conf', 1, 3, -- nodes 1, 4 and 5 '{{1,1},{4,1},{5,1}}' ) );
![Page 83: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/83.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> INSERT INTO conf.fp (g) VALUES ( CreateTopoGeom( 'conf', 1, 3, -- nodes 3 and 6 '{{3,1},{6,1}}' ) );
![Page 84: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/84.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry: puntal
=> INSERT INTO conf.fp (g) VALUES ( CreateTopoGeom( 'conf', 1, 3, -- nodes 3 and 6 '{{3,1},{6,1}}' ) );
![Page 85: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/85.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
TopoGeometry layers summary
=> SELECT TopologySummary('conf');
Topology conf (1), SRID -1, precision 0
6 nodes, 9 edges, 6 faces, 9 topogeoms in 3 layers
Layer 1, type Polygonal (3), 3 topogeoms Deploy: conf.fa.g
Layer 2, type Lineal (2), 3 topogeoms Deploy: conf.fl.g
Layer 3, type Puntal (1), 3 topogeoms Deploy: conf.fp.g
![Page 86: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/86.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
![Page 87: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/87.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
● Missing ISO SQL/MM editing functions:● ST_CreateTopoGeo
● ST_RemEdgeNewFace, ST_RemEdgeModFace
● ST_ValidateTopoGeo (wrapper)
![Page 88: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/88.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
● Missing ISO SQL/MM editing functions:● ST_CreateTopoGeo
● ST_RemEdgeNewFace, ST_RemEdgeModFace
● ST_ValidateTopoGeo (wrapper)
● Geometry => TopoGeometry
![Page 89: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/89.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
● Missing ISO SQL/MM editing functions:● ST_CreateTopoGeo
● ST_RemEdgeNewFace, ST_RemEdgeModFace
● ST_ValidateTopoGeo (wrapper)
● Geometry => TopoGeometry● TIGER/Line loader dumper
![Page 90: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/90.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
● Missing ISO SQL/MM editing functions:● ST_CreateTopoGeo
● ST_RemEdgeNewFace, ST_RemEdgeModFace
● ST_ValidateTopoGeo (wrapper)
● Geometry => TopoGeometry● TIGER/Line loader dumper● OGR driver
![Page 91: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/91.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
● Missing ISO SQL/MM editing functions:● ST_CreateTopoGeo
● ST_RemEdgeNewFace, ST_RemEdgeModFace
● ST_ValidateTopoGeo (wrapper)
● Geometry => TopoGeometry● TIGER/Line loader dumper● OGR driver● Specialized spatial functions
![Page 92: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/92.jpg)
Sandro Santilli <[email protected]> http://strk.keybit.net
Future developments(funding opportunities)
● Missing ISO SQL/MM editing functions:● ST_CreateTopoGeo
● ST_RemEdgeNewFace, ST_RemEdgeModFace
● ST_ValidateTopoGeo (wrapper)
● Geometry => TopoGeometry● TIGER/Line loader dumper● OGR driver● Specialized spatial functions● Your wish !
![Page 96: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/96.jpg)
![Page 100: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/100.jpg)
![Page 101: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/101.jpg)
![Page 102: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/102.jpg)
![Page 103: Topology with PostGIS 2.0](https://reader035.vdocuments.mx/reader035/viewer/2022062413/58709f291a28ab3d108bb5d1/html5/thumbnails/103.jpg)