Dear Salvatore, Thank you for your support.
I have now added the system variables and the path values from "setenv.bat", I can actually create a png using this command: C:\spatialsuite\app\ms4w\tools\mapserv\shp2img -m C:\spatialsuite\app\ms4w\apps\mapserv-demo/itasca.map -o C:\spatialsuite\temp\shp2img2.png -l kommune_r But mapserver creates still an empty png (I am using the same "itasca.map" used by shp2img). Here is a part of the log file (showing the success of rendering of kommune_v(vector) and error when trying to render kommune_r(raster) from the same database) [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] CGI Request 1 on process 1372\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msDrawMap(): rendering using outputformat named png (AGG/PNG).\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msDrawMap(): WMS/WFS set-up and query, 0.000s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msDrawMap(): Layer 0 (kommune_v), 0.104s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msDrawMap(): Layer 3 (ctybdpy2), 0.000s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msDrawMap(): Drawing Label Cache, 0.000s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msDrawMap() total time: 0.105s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCA13322838091372.png) total time: 0.122s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCAleg13322838091372.png) total time: 0.004s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCAsb13322838091372.png) total time: 0.003s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCAref13322838091372.png) total time: 0.009s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] mapserv request processing time (loadmap not incl.): 0.248s\r [Tue Mar 20 23:50:09 2012] [error] [client 127.0.0.1] msFreeMap(): freeing map at 02B31FD8.\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] CGI Request 1 on process 3080\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawMap(): rendering using outputformat named png (AGG/PNG).\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawMap(): WMS/WFS set-up and query, 0.000s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawRasterLayerLow(kommune_r): entering.\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] Corrupt, empty or missing file 'PG:host=localhost port=5432 dbname='hto' user='hto' password='hto' \r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] \t\tschema='raster' table='kommune_r' mode='2'' for layer 'kommune_r' ... ignoring this missing data. Error checking geometry type existence. Is PostGIS correctly installed?: no connection to the server\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] \r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawMap(): Layer 1 (kommune_r), 0.002s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawMap(): Layer 3 (ctybdpy2), 0.001s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawMap(): Drawing Label Cache, 0.000s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msDrawMap() total time: 0.003s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCA13322838163080.png) total time: 0.073s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCAleg13322838163080.png) total time: 0.004s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCAsb13322838163080.png) total time: 0.020s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msSaveImage(C:/spatialsuite/app/ms4w/tmp/ms_tmp/ITASCAref13322838163080.png) total time: 0.006s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] mapserv request processing time (loadmap not incl.): 0.113s\r [Tue Mar 20 23:50:16 2012] [error] [client 127.0.0.1] msFreeMap(): freeing map at 02A81FD8.\r It is probably the DATA item Layer definition (as defined here http://www.postgis.org/documentation/manual-svn/RT_FAQ.html#id2822614): LAYER NAME kommune_r TYPE raster STATUS ON DATA "PG:host=localhost port=5432 dbname='hto' user='hto' password='hto' schema='raster' table='kommune_r' mode='2'" PROCESSING "NODATA=0" PROCESSING "SCALE=AUTO" PROCESSING "RESAMPLE=NEAREST" CLASS NAME "kommune_r" COLOR 250 250 250 END END Regards, Hemin -- View this message in context: http://postgis.17.n6.nabble.com/View-PostGIS-raster-in-mapserver-tp4627669p4638697.html Sent from the PostGIS - User mailing list archive at Nabble.com. _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users