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

FlatGeobuf writing: in SPATIAL_INDEX=NO mode, deal with empty geometries as if there were null #11420

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rouault
Copy link
Member

@rouault rouault commented Dec 2, 2024

@bjornharrtell Can you confirm that FlatGeobuf is not a fan of EMPTY geometries ?

@rouault rouault added the backport release/3.10 Backport to release/3.10 branch label Dec 2, 2024
@bjornharrtell
Copy link
Contributor

@rouault confirmed. I either like to pretend they do not exist or treat them as null geometry.

…ies as if there were null

- this fixes the crash when writing an empty polygon. Fixes OSGeo#11419
- this avoids a reading error when writing an empty line
@rouault
Copy link
Member Author

rouault commented Dec 2, 2024

Also add support for writing a file without feature in SPATIAL_INDEX=NO mode ( @bjornharrtell no reason why we should disallow this, right ? since writing empty files in SPATIAL_INDEX=YES mode already works)

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 74.16% (-0.01%) from 74.172%
when pulling c59ee22 on rouault:flatgeobuf_empty_geoms
into 57833dc on OSGeo:master.

@bjornharrtell
Copy link
Contributor

Also add support for writing a file without feature in SPATIAL_INDEX=NO mode ( @bjornharrtell no reason why we should disallow this, right ? since writing empty files in SPATIAL_INDEX=YES mode already works)

No, must been an oversight that it wasn't doing so already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/3.10 Backport to release/3.10 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault when writing an empty polygon to FlatGeobuf
3 participants