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

pyogrio v0.4.0 is currently using GDAL 3.4.1 #2

Open
nmarchio opened this issue Oct 12, 2022 · 2 comments
Open

pyogrio v0.4.0 is currently using GDAL 3.4.1 #2

nmarchio opened this issue Oct 12, 2022 · 2 comments

Comments

@nmarchio
Copy link
Collaborator

nmarchio commented Oct 12, 2022

Hey @nofurtherinformation ! Looks like this is a documented issue in pyogrio's repo as of early last month: pyogrio v0.4.0 is currently using GDAL 3.4.1 instead of 3.5+ which supports GeoParquet. This would explain the issues I've been having trying to use pyogrio with GeoParquet file formats.

Here is the relevant comment from Joris about the issue: geopandas/pyogrio#154 (comment)

And here is the error that tipped me off:

(tiling) nm@nmarchio pmtiles-utils % python3 convert --input=subsaharan_regions.parquet --output=output.pmtiles --config=tiles_config.yaml --retain=TRUE 
Force Overwrite [True]: True
Recycling old files...
🔄 Starting File Conversion 🔄
Checking ogr2ogr / gdal compatibility...
Gdal supports FlatGeoBuf!
Checking Tippecanoe Compatibility...
Tippecanoe supports FlatGeoBuf!
Your Tippecanoe and Ogr2ogr install are compatible!
Converting input file to FGB format...
🔄 Converting to flatgeobuf 🔄
ERROR 4: `./subsaharan_regions.parquet' not recognized as a supported file format.
Traceback (most recent call last):
  File "pyogrio/_io.pyx", line 132, in pyogrio._io.ogr_open
  File "pyogrio/_err.pyx", line 177, in pyogrio._err.exc_wrap_pointer
pyogrio._err.CPLE_OpenFailedError: './subsaharan_regions.parquet' not recognized as a supported file format.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/nm/Desktop/pmtiles-utils/convert/__main__.py", line 3, in <module>
    cli_convert()
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/nm/Desktop/pmtiles-utils/convert/cli.py", line 45, in cli_convert
    fgb_success = convert_to_fgb(input, output_name) 
  File "/Users/nm/Desktop/pmtiles-utils/convert/geo_file_utils.py", line 15, in convert_to_fgb
    df = pyogrio.read_dataframe(f"./{input}")
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/site-packages/pyogrio/geopandas.py", line 137, in read_dataframe
    meta, index, geometry, field_data = read(
  File "/Users/nm/miniconda3/envs/tiling/lib/python3.10/site-packages/pyogrio/raw.py", line 120, in read
    result = ogr_read(
  File "pyogrio/_io.pyx", line 866, in pyogrio._io.ogr_read
  File "pyogrio/_io.pyx", line 141, in pyogrio._io.ogr_open
pyogrio.errors.DataSourceError: './subsaharan_regions.parquet' not recognized as a supported file format.
@nmarchio
Copy link
Collaborator Author

nmarchio commented Oct 12, 2022

Out of curiosity, I wonder how you were able to get this to work? Did you just convert the parquet to gpkg with QGIS then use this repo? Were you able to run at all with GeoParquet in any of your testing?

Also looks like this is part of a bigger issue related to homebrew GDAL installation not including parquet.

opengeospatial/geoparquet#99

You can see here I'm using 3.5.2 and no parquet support:
image

@nmarchio
Copy link
Collaborator Author

nmarchio commented Oct 13, 2022

And for vis, filed an issue here to get GDAL 3.5+ added to QGIS: qgis/QGIS-Mac-Packager#156

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

1 participant