Here is a part of mapfile with layer and WMS:
WEB
METADATA
wms_title "Diplom"
wms_abstract "no matter"
wms_onlinesource "http://localhost/cgi-bin/mapserv.exe?map=D:/Diplom/sample.map&"
wms_enable_request "*"
wms_srs "EPS G:4326"
END
LAYER
NAME rastertable
STATUS ON
TYPE RASTER
DATA "PG:host=localhost port=5432 dbname=Diplom user=postgres password=**** schema=public table=rastertable"
PROCESSING "SCALE=AUTO"
PROCESSING "NODATA=9999"
END
I load 2 tif files to postgis db use raster2pgsql -a -t 1000x1000 1.tif 2.tif schema.table and psql query.
Mapserver 3.0.4
Postgresql 9.4.0.
Logfile from mapserver:
[Fri Mar 20 15:31:30 2015].251000 CGI Request 1 on process 3480
[Fri Mar 20 15:31:30 2015].257000 msDrawMap(): rendering using outputformat named png (AGG/PNG).
[Fri Mar 20 15:31:30 2015].257000 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Fri Mar 20 15:31:30 2015].260000 msDrawRasterLayerLow(rastertable): entering.
[Fri Mar 20 15:31:31 2015].263000 msDrawMap(): Layer 3 (rastertable), 1.006s
[Fri Mar 20 15:31:31 2015].263000 msDrawMap(): Drawing Label Cache, 0.000s
[Fri Mar 20 15:31:31 2015].263000 msDrawMap() total time: 1.012s
[Fri Mar 20 15:31:31 2015].377000 msSaveImage(stdout) total time: 0.114s
[Fri Mar 20 15:31:31 2015].378000 mapserv request processing time (msLoadMap not incl.): 1.127s
[Fri Mar 20 15:31:31 2015].378000 msFreeMap(): freeing map at 021ACF58.
When i trying to use http://localhost/cgi-bin/mapserv.exe?map=D:/Diplom/sample.map&layer=rastertable&mode=map in my browser he is display white screen, but if i use Db Manager in QGIS my raster files displayed normally.
I think you have a little problem with the projection.
RépondreSupprimertry the projection "init=epsg:26191"
# debut layer Couche
#
LAYER
NAME "pp"
CONNECTION "user=postgres dbname=dbhost=localhost password=xxx port=5432"
CONNECTIONTYPE POSTGIS
DATA "the_geom FROM p"
PROJECTION
"init=epsg:26191"
END
STATUS DEFAULT
TYPE POLYGON
CLASS
STYLE
COLOR 0 255 100 # couleur
OUTLINECOLOR 0 0 0
END
END
END # Fin Couche
"init=epsg:26191"
END
if its not working .
RépondreSupprimerplay whith EXTENT for exemple
MAP
EXTENT -3300000 3300000 6000000 12000000