Opened 4 years ago

Last modified 2 months ago

#4683 assigned enhancement

ST_SafeSubdivide

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc:

Description

As reported in #4636 the ST_Subdivide function may degrade input, due to the necessity to add vertices at exact grid intersection point, and being sometimes unable to do so.

A ST_SafeSubdivide function may instead limit itself to split at existing vertices.

Change History (8)

comment:1 by komzpa, 4 years ago

If you understand how to change the algorithm behind Subdivide to achieve this, how about just replacing ST_Subdivide?

comment:2 by strk, 4 years ago

Because the idea in this ticket is to use existing vertices, which would be a behavioural change from what ST_Subdivide does (it ensures to split areas exactly on the given grid).

If we can get a fully robust ST_Subdivide then I'd be in favour of dropping this ticket and do that instead.

comment:3 by robe, 4 years ago

I hate the name ST_Safe anything for PostGIS packaged functions.

It's okay for user-defined functions stuff, but safe demands having ST_Safe for everything. Please STOP NOW before you initiate a SAFE movement.

comment:4 by strk, 4 years ago

ST_BestEffortSubdivide ?

comment:5 by robe, 4 years ago

Better Effort bu ST_Subdivide still sounds best. Throw another arg in there.

comment:6 by komzpa, 4 years ago

Milestone: PostGIS 3.1.0PostGIS Fund Me

comment:7 by strk, 2 months ago

Spatialite has a TopoGeo_SubdivideLines function that takes both maxlength and maxvertices arguments, splitting on whatever is reached first. Could be an idea to copy that interface. See https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html

comment:8 by strk, 2 months ago

The "fully respecting Topology consistency" part of the spatialite function is what I was after for this ticket.

Note: See TracTickets for help on using tickets.