why geopandas not support osm.pbf data format? #3015
-
why geopandas not support osm.pbf data format? someone said read file use 'pyogrio' engine,by ‘’gdal‘’ can read osm.pbf, but it can't work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
"can't work" is a bit vague description of the error. GeoPandas depends on GDAL to read files. GDAL is exposed either through Fiona or Pyogrio. Whether either of them can read osm.pbf depends on whether the driver for this file format is included in GDAL and if it is enabled. Fiona generally does not include OSM driver but pyogrio does. You may be hitting this issue, for which there is a fix coming in the next release of pyogrio or a workaround. So, with df = geopandas.read_file(
"http://download.geofabrik.de/europe/andorra-latest.osm.pbf",
engine="pyogrio",
use_arrow=True,
) Without |
Beta Was this translation helpful? Give feedback.
"can't work" is a bit vague description of the error.
GeoPandas depends on GDAL to read files. GDAL is exposed either through Fiona or Pyogrio. Whether either of them can read osm.pbf depends on whether the driver for this file format is included in GDAL and if it is enabled. Fiona generally does not include OSM driver but pyogrio does.
You may be hitting this issue, for which there is a fix coming in the next release of pyogrio or a workaround. So, with
pyogrio
installed using conda from conda-forge, this works:Without
use_arrow=True
, this returnsFeat…