Tuesday, 22 August 2017

Prevent PostGIS Topology from splitting edges on line insert


I'm dealing with a large amount of road data represented with PostGIS Topology types. Anytime I add an edge over another edge, the edge is automatically split and a new node is created at the intersection of the two lines. This creates a problem when I have roads that overlap other roads at bridges or underpasses. Is it possible to prevent edges from automatically being split when inserting an edge using TopoGeo_AddLineString? Or is this an incorrect usage of Topology?



Answer



I figure it out, PostGIS Topology supports a z-index. If you want to prevent new lines from splitting other lines in the topology, they need to have different z-indexes. The CreateTopology function has a parameter hasz that allows support for this but it is false by default.


http://postgis.net/docs/CreateTopology.html


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...