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

Darafei "Komяpa" Praliaskouski me at komzpa.net
Wed Feb 24 02:19:43 PST 2021

Hello Marco,

Subdivision should be done in target projection as a final step of
processing. If you expect to keep topology after reprojection, you should
be either merging the polygon back before the reprojection, or investing in
using the topology framework of postgis. That's the base of all overlay

Insertion of an extra vertex breaks the logic of "every time you do a split
on a node, you have less nodes in each half" and will lead to undesired
behavior in sawtooth polygons. Thus behavior you're requesting has to be
under a flag.

Please send in the pull request for keeping the nodes.

On Wed, Feb 24, 2021 at 1:08 PM Marco Boeringa <marco at boeringa.demon.nl>

> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users

Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210224/68f80ea9/attachment.html>

More information about the postgis-users mailing list