I am new in MapServer and I want to visualize some raster tables in MapServer.
My mapfile is:
MAP
CONFIG "MS_ERRORFILE" "error.log"
DEBUG 5
NAME "milad"
STATUS on
SIZE 600 600
EXTENT -8321547 5668833 -7583277 6240180
UNITS meters
LAYER
NAME "poly"
STATUS DEFAULT
TYPE RASTER
DATA "PG:host=localhost port=5432 dbname=geodatabase user=postgres password=**** schema=public table=milad_raster column=st_asraster"
PROJECTION
"init=epsg:3857"
END
PROCESSING "NODATA=-9999"
PROCESSING "SCALE=AUTO"
CLASS
STYLE
COLOR 200 0 0
END
END
END
END
Then I use this URL to see the map but I see nothing. It is just the white screen.
http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/milad/milad_raster.map&mode=map
I checked the log files and I saw that the error is:
[Thu Jan 23 15:34:58 2020].675000
msLoadMap(): 0.016s
[Thu Jan 23 15:34:58 2020].675000 CGI Request
1 on process 7144
[Thu Jan 23 15:34:58 2020].675000
msDrawMap(): rendering using outputformat
named png (AGG/PNG).
[Thu Jan 23 15:34:58 2020].675000
msDrawMap(): WMS/WFS set-up and query, 0.000s
[Thu Jan 23 15:34:58 2020].675000
msDrawRasterLayerLow(poly): entering.
[Thu Jan 23 15:34:58 2020].768000 Corrupt,
empty or missing file 'PG:host=localhost
port=5432 dbname=geodatabase user=postgres
password=**** schema=public
table=milad_raster column=st_asraster' for
layer 'poly' ... ignoring this missing data.
Error browsing database for PostGIS Raster
properties
[Thu Jan 23 15:34:58 2020].768000
msDrawMap(): Layer 0 (poly), 0.093s
[Thu Jan 23 15:34:58 2020].768000
msDrawMap(): Drawing Label Cache, 0.000s
[Thu Jan 23 15:34:58 2020].768000 msDrawMap()
total time: 0.093s
[Thu Jan 23 15:34:58 2020].768000
msSaveImage(stdout) total time: 0.000s
[Thu Jan 23 15:34:58 2020].768000 mapserv
request processing time (msLoadMap not
incl.): 0.093s
[Thu Jan 23 15:34:58 2020].768000
msFreeMap(): freeing map at 02648FD8.
[Thu Jan 23 15:34:58 2020].784000 mapserv
total execution time: 0.125s
If you do not want to read that file, just read this one cuz error is here:
[Thu Jan 23 15:34:58 2020].768000 Corrupt, empty or missing file 'PG:host=localhost port=5436 dbname=geodatabase user=postgres password=**** schema=public table=milad_raster column=st_asraster' for layer 'poly' ... ignoring this missing data. Error browsing database for PostGIS Raster properties
I can visualize my raster table in QGIS. Thus, I believe it should be correct. I checked with gdalinfo and I was able to read the raster table. What is the problem? the URL? the mapfile? or something else?