Page 1 of 1

Bug importing RASTER GDAL terrain models with .prj extra file

Posted: Wed Jul 05, 2023 7:05 pm
by escolano
Using Files->Import->RASTER GDAL...
when the file to be imported has an extra file .prj (to describe its projection) it is raised this error

Error (l7567): RuntimeError PROJ: proj_create_from_database: Cannot find proj.db
STACK:
RuntimeError PROJ: proj_create_from_database: Cannot find proj.db
while executing
"gdal::Open $filename $gdal::GA_ReadOnly"
(procedure "GDAL::ReadRaster" line 14)
invoked from within
"GDAL::ReadRaster $filename $show_advance_bar"
(procedure "GDAL::ReadPreRaster" line 10)
invoked from within
"GDAL::ReadPreRaster {C:/gid project more/projects/IBER/Users/Gonzalo García-Alén/ProblemaRaster/sada_dem1m.asc}"

Re: Bug importing RASTER GDAL terrain models with .prj extra file

Posted: Wed Jul 05, 2023 7:11 pm
by escolano
This is because GDAL and PROJ libraries now require to set the environment variable PROJ_LIB to find 'proj.db' (its database of projections and coordinate systems)

To fix the problem in GiD 16.1.5d or 16.0.5d can simply unzip this file
osgeo.zip
(1.51 MiB) Downloaded 122 times
inside
<GiD>\scripts\osgeo
e.g.
C:\Program Files\GiD\GiD 16.1.5d\scripts\osgeo

In next GiD versions this problem will be solved without this fix.