[gdal-dev] Postgis Raster issue

Even Rouault even.rouault at mines-paris.org
Tue Oct 22 11:00:16 PDT 2013


Le mardi 22 octobre 2013 17:53:27, Yves Jacolin (Free) a écrit :
> Hello,
> 
> I am playing with QGIS and raster date in postgis. I get somme error which
> get me going to frmts/postgisraster/postgisrasterrasterband.cpp:469.
> 
> From QGIS I get "Warning: RasterIO error: Error retrieving raster data from
> database" error message which come from GDAL.
> 
> If I read the postgresql log I get:
> 
> 2013-10-22 17:38:47 CEST STATEMENT:  SELECT st_band(rast, 1),
> st_width(rast), st_height(rast), st_bandpixeltype(rast, 1),
> st_bandnodatavalue(rast, 1), st_scalex(rast), st_scaley(rast),
> st_upperleftx(rast), st_upperlefty(rast) FROM raster.mnt250 WHERE
> st_intersects(rast,
> st_polygonfromtext('POLYGON((89875,00000000000000000
> 7120125,00000000000000000, 4789875,00000000000000000
> 7120125,00000000000000000, 4789875,00000000000000000
> 2720125,00000000000000000, 89875,00000000000000000
> 2720125,00000000000000000, 89875,00000000000000000
> 7120125,00000000000000000))', 2154))
> 
> 
> Which is incorrect (check the decimal caracter) and is create on l.469 in
> the cpp file.

Salut Yves,

Yes this is a known issue that has been fixed in trunk. This is due to the fact 
that the locale within QGIS switches from the C locale to the locale of your 
language that has comma as decimal separator. This would not be terribly 
difficult to fix in 1.10 branch if needed. As a workaround, you can launch qgis 
with "LC_ALL=C qgis" (but that will be in English)

> 
> My gdal is quiet old and is a 1.10dev (not 1.10 stable). As I can't build
> again 1.10 stable or trunk, I wondering if it was something known.
> 
> Thanks,
> 
> Y.
> PS : I tried to build gdal 1.10 and master and get this issue:
> make[2]: entrant dans le répertoire «
> /home/yjacolin/Documents/Dev/gdal/1.10/gdal/frmts/ogdi »
> /bin/bash /home/yjacolin/Documents/Dev/gdal/1.10/gdal/libtool
> --mode=compile --tag=CXX g++ -g -O2 -msse -DHAVE_SSE_AT_COMPILE_TIME 
> -Wall  -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/port -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/gcore -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/alg -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/ogr -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/ogr/ogrsf_frmts -
> I/usr/include/ogdi  -DOGR_ENABLED -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/port  -c -o
> ../o/ogdidataset.lo ogdidataset.cpp
> libtool: compile:  g++ -g -O2 -msse -DHAVE_SSE_AT_COMPILE_TIME -Wall -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/port -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/gcore -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/alg -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/ogr -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/ogr/ogrsf_frmts -
> I/usr/include/ogdi -DOGR_ENABLED -
> I/home/yjacolin/Documents/Dev/gdal/1.10/gdal/port -c ogdidataset.cpp  -fPIC
> - DPIC -o ../o/.libs/ogdidataset.o
> In file included from /usr/include/ogdi/ecs.h:353:0,
>                  from ogdidataset.cpp:32:
> /usr/include/ogdi/ecs_util.h:108:22: fatal error: projects.h: No such file
> or directory
> compilation terminated.
> make[2]: *** [../o/ogdidataset.lo] Erreur 1
> make[2]: quittant le répertoire «
> /home/yjacolin/Documents/Dev/gdal/1.10/gdal/frmts/ogdi »
> make[1]: *** [ogdi-install-obj] Erreur 2
> make[1]: quittant le répertoire «
> /home/yjacolin/Documents/Dev/gdal/1.10/gdal/frmts »
> make: *** [frmts-target] Erreur 2

Yes, known issue: latest Proj.4 version doesn't install projects.h any longer, 
which was supposed to be a private header file, but is still needed by OGDI. If 
you don't need OGDI, ./configure --without-ogdi . It should also be possible to 
manually install projects.h in /usr/include;

Even

> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list