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: Auto-detect driver from filename extension when writing #220

Closed
jorisvandenbossche opened this issue Feb 13, 2023 · 0 comments · Fixed by #270
Closed

ENH: Auto-detect driver from filename extension when writing #220

jorisvandenbossche opened this issue Feb 13, 2023 · 0 comments · Fixed by #270
Milestone

Comments

@jorisvandenbossche
Copy link
Member

We currently already have some limited, hardcoded version of this using:

pyogrio/pyogrio/raw.py

Lines 19 to 27 in 75e8f13

DRIVERS = {
".fgb": "FlatGeobuf",
".geojson": "GeoJSON",
".geojsonl": "GeoJSONSeq",
".geojsons": "GeoJSONSeq",
".gpkg": "GPKG",
".json": "GeoJSON",
".shp": "ESRI Shapefile",
}

But now we have initial support for internally using the GDAL driver metadata (#103, first used in #189), we could generalize this based on the extension information stored in the driver metadata.
Equivalent fiona PR: Toblerity/Fiona#948

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

Successfully merging a pull request may close this issue.

2 participants