[mapserver-users] Need help to debug a code
Jeff McKenna
jmckenna at gatewaygeomatics.com
Sat Jun 9 09:36:05 PDT 2012
On 12-06-09 4:34 AM, gautam wrote:
> hi,
>
> While using postgis with mapserver ... i am getting black image in place of
> raster image... please help
>
>
>
> ...
> LAYER
> NAME coolwktraster
> TYPE raster
> STATUS DEFAULT
> DATA "PG:host=localhost port=5432 dbname='postgis' user='postgres'
> password='*******' schema='public' table='test' "
> PROCESSING "NODATA=0"
> PROCESSING "SCALE=AUTO"
> PROJECTION
> "init=epsg:3003"
> END
> METADATA
> "wms_title" "OFC 1:10.000 single"
> "wms_srs" "EPSG:3003 EPSG:4326"
> END
> END
> ...
>
>
> Error report:
>
> [Sat Jun 09 01:49:25 2012].727000 CGI Request 1 on process 2096
> [Sat Jun 09 01:49:25 2012].729000 msDrawMap(): rendering using outputformat
> named png (AGG/PNG).
> [Sat Jun 09 01:49:25 2012].729000 msDrawMap(): WMS/WFS set-up and query,
> 0.000s
> [Sat Jun 09 01:49:25 2012].731000 msDrawRasterLayerLow(coolwktraster):
> entering.
> [Sat Jun 09 01:49:26 2012].252000 LoadGDALImage(coolwktraster): NODATA value
> 0 in GDAL
> file or PROCESSING directive largely ignored. Not yet fully supported for
> unclassified scaled data. The NODATA value is excluded from auto-scaling
> min/max computation, but will not be transparent.
> [Sat Jun 09 01:49:26 2012].259000 LoadGDALImage(coolwktraster): NODATA value
> 0 in GDAL
> file or PROCESSING directive largely ignored. Not yet fully supported for
> unclassified scaled data. The NODATA value is excluded from auto-scaling
> min/max computation, but will not be transparent.
> [Sat Jun 09 01:49:26 2012].265000 LoadGDALImage(coolwktraster): NODATA value
> 0 in GDAL
> file or PROCESSING directive largely ignored. Not yet fully supported for
> unclassified scaled data. The NODATA value is excluded from auto-scaling
> min/max computation, but will not be transparent.
> [Sat Jun 09 01:49:26 2012].269000 msDrawMap(): Layer 0 (coolwktraster),
> 0.540s
> [Sat Jun 09 01:49:26 2012].269000 msDrawMap(): Drawing Label Cache, 0.000s
> [Sat Jun 09 01:49:26 2012].269000 msDrawMap() total time: 0.542s
> [Sat Jun 09 01:49:26 2012].424000 msSaveImage(stdout) total time: 0.155s
> [Sat Jun 09 01:49:26 2012].425000 mapserv request processing time (loadmap
> not incl.): 0.698s
> [Sat Jun 09 01:49:26 2012].425000 msFreeMap(): freeing map at 025D1FE8.
>
Hello,
Some things I might do/check if I was in this same situation:
- when I load the data into Postgres, I would make sure to assign the
projection (if using shp2pgsl then use the -s switch, if using ogr2ogr
then use -s_srs and -a_srs switches)
- I might use Quantum GIS to view that Postgres layer (http://www.qgis.org/)
- then I would use ogrinfo with the -summary switch to connect to that
Postgres layer and check its spatial coordinates
- I would use the extents returned from ogrinfo in my mapfile EXTENT
parameter
- I would remove the NODATA value (and PROCESSING parameters) from the
mapfile layer and then test with the sh2img commandline utility
I hope that helps you or someone else down the line...
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
More information about the MapServer-users
mailing list