sedona icon indicating copy to clipboard operation
sedona copied to clipboard

ST_Subdivide returns an empty array for invalid maxVertices values

Open umartin opened this issue 11 months ago • 0 comments

Postgis:

# select ST_Subdivide('LINESTRING (0 0, 99 99)'::geometry, 4);
ERROR:  lwgeom_subdivide_prec: cannot subdivide to fewer than 5 vertices per output

Sedona:

select ST_Subdivide(ST_GeomFromWKT('LINESTRING (0 0, 99 99)'), 4)

output: []

Not raising an error can lead to silent data corruption. ST_SubdivideExplode has the same problem

umartin avatar Jan 16 '25 10:01 umartin