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

ENH: add automatic detection of 2.5D in write_dataframe #223

Conversation

theroggy
Copy link
Member

@theroggy theroggy commented Mar 9, 2023

closes #222

apparently closes #121 as well

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! Couple of quick questions

pyogrio/geopandas.py Outdated Show resolved Hide resolved
pyogrio/geopandas.py Show resolved Hide resolved
pyogrio/tests/test_geopandas_io.py Show resolved Hide resolved
pyogrio/tests/test_geopandas_io.py Outdated Show resolved Hide resolved
Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @theroggy . Per the comment, I wonder if we can more deliberately catch the GDAL error for FlatGeobuf to make a nicer error message.

pyogrio/geopandas.py Outdated Show resolved Hide resolved
Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @theroggy ; the failing test will be a helpful signal that GDAL fixed it. Thanks for reporting the bug there.

@brendan-ward brendan-ward merged commit 73d5af2 into geopandas:main Mar 18, 2023
@jorisvandenbossche
Copy link
Member

The geopandas test suite discovered one issue with this (https://github.com/geopandas/geopandas/actions/runs/4454470754/jobs/7823684402?pr=2834): if you have mixed 3D geometry types, the geometry_type gets inferred as "2.5D Unknown", which then gives "Geometry type is not supported: 2.5D Unknown"

I suppose for the case of mixed, we just need to use "Unknown" without prepending "2.5D"

@theroggy
Copy link
Member Author

The geopandas test suite discovered one issue with this (https://github.com/geopandas/geopandas/actions/runs/4454470754/jobs/7823684402?pr=2834): if you have mixed 3D geometry types, the geometry_type gets inferred as "2.5D Unknown", which then gives "Geometry type is not supported: 2.5D Unknown"

I suppose for the case of mixed, we just need to use "Unknown" without prepending "2.5D"

I'll have a look...

@theroggy theroggy deleted the ENH-add-automatic-detection-of-2.5D-in-write_dataframe branch March 18, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants