Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDAL, ogr2ogr "Cannot find proj.db" Error

I've tried to extract certain country from the world shp file from natural earth.

I am currently using windows 10, so I installed python 3.7, gdal to use the ogr2ogr.

I typed the below code in the command to extract the south korea

ogr2ogr -f GeoJSON -where "geonunit='South Korea'" korea-geo.json ne_10m_admin_1_states_provinces.shp

But the below errors are coming out.

ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db

ERROR 1: PROJ: proj_identify: Cannot find proj.db

I already set up the environmental variables for Gdal..

C:\Program Files\GDAL\gdal-data

C:\Program Files\GDAL\gdalplugins

Please guide me to solve this problem.

like image 905
Yang JongHyun Avatar asked Jun 26 '19 01:06

Yang JongHyun


1 Answers

Check your environment_variable:

setx GDAL_DATA "C:\Program Files\GDAL\gdal-data"

setx GDAL_DRIVER_PATH "C:\Program Files\GDAL\gdalplugins"

setx PROJ_LIB "C:\Program Files\GDAL\projlib"

setx PYTHONPATH "C:\Program Files\GDAL\"
like image 55
mrHalfer Avatar answered Oct 03 '22 06:10

mrHalfer