Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_Subdivide returns an empty array for invalid maxVertices values #1761

Open
umartin opened this issue Jan 16, 2025 · 0 comments
Open

ST_Subdivide returns an empty array for invalid maxVertices values #1761

umartin opened this issue Jan 16, 2025 · 0 comments

Comments

@umartin
Copy link
Contributor

umartin commented Jan 16, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants