[postgis-users] PostGIS raster completely black

Salvatore Larosa lrssvtml at gmail.com
Sat May 26 15:21:19 PDT 2012


hi,
I have a problem with the display of raster both into QGIS or MapServer.
I loaded the raster in PostGIS as follows:

raster2pgsql -s 4236 -I -C /home/sam/pgraster_test/katrina.tif -F -t
64x64 public.katrina > /home/sam/pgraster_test/katrina.sql

workshop=# SELECT rid, ST_Summarystats(rast) FROM katrina;
 rid |                     st_summarystats                     
-----+---------------------------------------------------------
   1 | (4096,481820,117.6318359375,8.52951574339562,70,178)
   2 | (4096,464474,113.39697265625,14.8665821315018,71,212)
   3 | (4096,483084,117.9404296875,21.0049372500341,69,228)
   4 | (4096,481865,117.642822265625,15.5678521244644,82,208)
....................................

then I try to display it in QGIS, via DBManager plugin and I get a
completely black raster (see attached image).
In mapserver get the same! The definition of my mapfile is:

MAP
  IMAGETYPE      png
  EXTENT         -100.01466 9.98533 -69.98533 40.01466
  SIZE           600 600
  #SHAPEPATH      "../data"
  CONFIG MS_ERRORFILE "stderr"
  DEBUG 10 
  PROJECTION
      "init=epsg:4326"
  END
LAYER
  NAME katrina
  TYPE raster
  STATUS ON
  DATA "PG:host=localhost port=5432 dbname=workshop user=postgres
password=********* schema=public table=katrina mode=2"	
  PROCESSING "NODATA=-32768"
  PROCESSING "SCALE=AUTO"   
END
END

Debug shp2img:

$ shp2img -o katrina.png -m katrina.map
[Sun May 27 00:09:12 2012].554199 msDrawRasterLayerLow(katrina):
entering.
[Sun May 27 00:09:12 2012].730670 LoadGDALImage(katrina): NODATA value
-32768 in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Sun May 27 00:09:12 2012].784706 LoadGDALImage(katrina): NODATA value
-32768 in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Sun May 27 00:09:12 2012].842058 LoadGDALImage(katrina): NODATA value
-32768 in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Sun May 27 00:09:12 2012].844221 msDrawMap(): Layer 0 (katrina), 0.290s
[Sun May 27 00:09:12 2012].844267 msDrawMap(): Drawing Label Cache,
0.000s
[Sun May 27 00:09:12 2012].844281 msDrawMap() total time: 0.290s
[Sun May 27 00:09:12 2012].848255 msSaveImage() total time: 0.004s
[Sun May 27 00:09:12 2012].848309 msFreeMap(): freeing map at 0x14293d0.


could the problem be GDAL!?!

my test is with GDAL 2.0dev r24507, PostGIS 2.0.1 r9822

Any hint?

All the Best,

-SL

-- 
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt on freenode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGRasterQGIS.png
Type: image/png
Size: 134236 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120527/c3e1f544/attachment.png>


More information about the postgis-users mailing list