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

Python bindings: GetOutputDriversFor outdated #8277

Closed
theroggy opened this issue Aug 25, 2023 · 0 comments
Closed

Python bindings: GetOutputDriversFor outdated #8277

theroggy opened this issue Aug 25, 2023 · 0 comments
Assignees

Comments

@theroggy
Copy link
Contributor

theroggy commented Aug 25, 2023

I don't really use it, but I noticed it so just as a heads up.

GetOutputDriversFor in the python bindings is a duplicated implementation of the cpp version in commonutils.cpp, but it isn't really up-to-date anymore: eg. the specific logic to handle ".gpkg.zip" and ".shp.zip" isn't implemented.

I also noticed a bug: in the python version of DoesDriverHandleExtension the space-delimited extensions aren't split but just a string-find is used. This leads to too many drivers being returned: e.g. for .geojson 2 drivers are returned (GeoJSON and GeoJSONSeq) instead of only GeoJSON because extension "geojson" is also found in the string "geojsonl geojsons".

Possibly it would be better if the cpp version would be reused one way or the other to avoid the double implementation...

@rouault rouault self-assigned this Sep 2, 2023
@rouault rouault closed this as completed in 9529471 Sep 2, 2023
rouault added a commit that referenced this issue Sep 2, 2023
osgeo_utils: allign base.get_extension() and util.DoesDriverHandleExtension() on C++ versions, and add tests (fixes #8277)
rouault added a commit that referenced this issue Sep 2, 2023
rouault added a commit that referenced this issue Sep 3, 2023
[Backport release/3.7] osgeo_utils: allign base.get_extension() and util.DoesDriverHandleExtension() on C++ versions, and add tests (fixes #8277)
elpaso pushed a commit to elpaso/gdal that referenced this issue Sep 4, 2023
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

No branches or pull requests

2 participants