I have an file that is in the format .osm.pbf
. It's about 8GB. I want to convert it to a feature class and place it in a file geodatabase. From what I can see, the simplest way to do that is using gdal
and ogr2ogr
. I had both installed with my OSGeo/QGIS. The gdal
and ogr2ogr
package files and executables are in my C:\OSGeo4W64\bin
folder. Initially, I tried converting to a shapefile
but ran into problems. I tried running the following command:
ogr2ogr -f "ESRI Shapefile" mydata.shp mydata.osm.pbf
I immediately got the following error messages:
Warning 1: Cannot find osmconf.ini configuration file
ERROR 1: Could not parse configuration file for OSM import
FAILURE:Unable to open datasource `na_test.osm.pbf' with the following drivers.
-> `JP2ECW'
-> `OCI'
...
-> `OSM'
I see that I have an 'OSM' driver, but it seems that either a) I don't have osmconf.ini
or its in the wrong spot, or b) I need to configure something in osmconf.ini
so that it can open a .osm.pbf
file. I do have a osmconf.ini
, but its in my C:\OSGeo4W64\share
folder. I tried copying it and placing it in 'binbut that didn't seem to do any good. My system variable path is pointing to 'C:\OSGeo4W64\bin
. In addition to this, I realized that there is no way I am converting 8GB + osm
files into a shapefile
and I need to convert them to feature classes or geojson if possible. Help, is there a way to do this? Is ther something wrong with my gdal configuration?
Side Note: I do have gdal and ogr2ogr working in a Python 3.x
environment with Pandas/Geopandas
.