sedona
sedona copied to clipboard
ST_Subdivide returns an empty array for invalid maxVertices values
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