[postgis-users] PostGIS "Subdivide" should insert vertex where subdivision lines intersect

Marco Boeringa marco at boeringa.demon.nl
Wed Feb 24 02:08:21 PST 2021


Hi all,

I don't know how much of an effort it would be, but I think it would be 
nice if PostGIS's "Subdivide" was enhanced to insert a vertex where 
subdivision lines "intersect". Currently, when a large shape is 
subdivided, if a vertical sudivide line "hits" a horizontal one, the 
sub-part of the large geometry being subdivided that is above or below 
the horizontal subdivision line, won't receive a vertex where the 
vertical subdivision line "hits" it.

This has the negative consequence that as soon as you start reprojecting 
the geometries resulting of this subdivide operation to another 
projection and depending on that projection's properties, e.g. with 
on-the-fly projection in QGIS, that the three geometries around this 
"virtual" intersection of subdivision lines, won't match, and show a 
clearly visible gap.

This could be prevented if "Subdivide" always inserted an extra vertex 
at the intersection of the subdivision lines, even if the geometry part 
above or below the horizontal subdivision line, won't be cut vertically 
at that point.

Marco



More information about the postgis-users mailing list