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

Crash writing POLYGON EMPTY to flatgeobuf without spatial index #521

Open
paleolimbot opened this issue Feb 4, 2025 · 2 comments
Open
Labels
upstream issue The bug is cause by an upstream issue

Comments

@paleolimbot
Copy link

I discovered this putting together geoarrow-data...I get a crash when using pyogrio to write the following series of POLYGON:

import geopandas
import pyogrio

df = geopandas.GeoDataFrame(
    {
        "geometry": geopandas.GeoSeries.from_wkt([
            "POLYGON EMPTY",
        ])
    }
)

df.to_file("foofy.fgb", layer_options={"SPATIAL_INDEX": "NO"})

...not sure if this is upstream GDAL yet or not! (Can investigate later but wanted to get this somewhere!)

@theroggy
Copy link
Member

theroggy commented Feb 4, 2025

There have been some fixes regarding this type of things in GDAL in the past, e.g. OSGeo/gdal#11420, first released in GDAL 3.10.1, sounds like a good match...

However, even with GDAL 3.9.3 I don't seem to be able to reproduce it...

@paleolimbot
Copy link
Author

Should have shared my environment...it's MacOS M3, Python 3.13 with pyogrio 0.10.0 and GDAL 3.9.1 (which is whatever I got when I did a pip install pyogrio!)

Seems like that's the exact issue...thanks!

@jorisvandenbossche jorisvandenbossche added the upstream issue The bug is cause by an upstream issue label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream issue The bug is cause by an upstream issue
Projects
None yet
Development

No branches or pull requests

3 participants