-
Notifications
You must be signed in to change notification settings - Fork 23
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
Impossible to read KMZ file #444
Comments
Hi, how did you install geopandas and pyogrio? In my installation from conda-forge, the snippet above works. Can you also show thew output of import pyogrio
pyogrio.list_drivers() |
The install is done via pip in a Docker (without conda) on Debian 11 The drivers are:
|
KML files are read fine, only KMZ files fail |
I think that the reason is that the PyPI wheels contain the KML driver while the conda-forge contain LIBKML driver. |
Is there a workaround to replicate the conda behaviour natively with pypi? |
You can normally prepend the filename with "/vsizip/" to use the virtual filesystem feature of GDAL to do the unzipping. I wonder if there is something wrong with the test file you uploaded... because for another .kmz this workaround works, but not for your test file. import geopandas as gpd
print(gpd.read_file(r"/vsizip/C:/Temp/example.kmz")) |
This file has been part of the test suite for years and worked :'( I have other KMZ that fails too, so maybe there is an issue inside that is weird? Unfortunately, the |
Hmm... indeed, I can open it without problems in e.g. QGIS, so apparently the "KML" driver doesn't only limit the support to uncompressed .kml files but also to a subset of them... so it seems you'll really need the "LIBKML" driver. |
Sadly, this is still the case with version 0.10.0. I have still no clue why it happens, but it's just to notify you. |
GeoPandas 1.0+ is not able to read KMZ files with pyogrio's engine, when setting
engine=fiona
works:With fiona:
With pyogrio:
Here is the file:
AOI_kmz.zip
Versions:
The text was updated successfully, but these errors were encountered: