Problem with rasterdata in php mapscript
Möri Cédric
Cedric.Moeri at BD.SO.CH
Fri Jun 10 09:15:14 PDT 2005
Hello list
I am using MapServer 4.2.5 as cgi and also wiht php-mapscript. I have a
simple mapfile with just one (raster)layer. If I call this mapfile through
the cgi like
localhost/cgi-bin/sogis/mapserv?mode=map&layer=pk&map=localhost/mapfiles/tes
t_ms4.map;
everything works fine, but if I try it trought php-mapscript I recieve no
image. It is just not drawn. There's not even an error in the logs. It looks
like the $map->draw() function dies without comment.
<?php
dl("php_mapscript.so-4.2.5");
$map = ms_newMapObj("$doc_root$web_root$develop$msuser/xxx/test_ms4.map");
$img = $map->draw();
$url = $img->saveWebImage();
printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d border=\"1\">\n", $server."".$url,
$map->width, $map->height);
?>
I did the same also with php-mapscript 3.6.6 and there it works again.
Has anybody a similar behaviour? What my cause this? I appreciate any hint!
The mapfile and version output of mapserver and gdal is attached on the
bottom.
Best regards
Cédric Möri
My mapfile looks as follows:
NAME "test"
STATUS ON
SYMBOLSET "/opt/wwwroot/sogis/internet/etc/symbols/symbols.neu"
EXTENT 590000 212000 650000 265000
SIZE 675 480
UNITS METERS
SHAPEPATH "/opt/wwwroot/sogis/daten/"
IMAGECOLOR 255 255 255
FONTSET "/opt/wwwroot/sogis/internet/etc/fonts/fonts.list"
IMAGETYPE PNG
RESOLUTION 72
INTERLACE OFF
WEB
HEADER "../../../fr_map/header.html"
TEMPLATE "../../../fr_map/template.html"
FOOTER "../../../fr_map/footer.html"
MINSCALE 1
MAXSCALE 5000000
IMAGEPATH "/opt/wwwroot/sogis/gifs/"
IMAGEURL "/sogis/gifs/"
LOG "/opt/wwwroot/sogis/MapServer/etc/log/MapServer.log"
END
LAYER
NAME pk
STATUS ON
TYPE RASTER
DATA "images/up10m/up11073m_1999.tif"
END
END
mapserv -v:
MapServer version 4.2.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS
=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL IN
PUT=SHAPEFILE
gdalinfo --version:
GDAL 1.2.1.0, released 2004/06/23
gdalinfo --formats:
Supported Formats:
VRT (rw): Virtual Raster
GTiff (rw): GeoTIFF
NITF (rw): National Imagery Transmission Format
HFA (rw): Erdas Imagine Images (.img)
SAR_CEOS (ro): CEOS SAR Image
CEOS (ro): CEOS Image
ELAS (rw): ELAS
AIG (ro): Arc/Info Binary Grid
AAIGrid (rw): Arc/Info ASCII Grid
SDTS (ro): SDTS Raster
DTED (rw): DTED Elevation Raster
PNG (rw): Portable Network Graphics
JPEG (rw): JPEG JFIF
MEM (rw): In Memory Raster
JDEM (ro): Japanese DEM (.mem)
GIF (rw): Graphics Interchange Format (.gif)
ESAT (ro): Envisat Image Format
BSB (ro): Maptech BSB Nautical Charts
XPM (rw): X11 PixMap Format
BMP (rw): MS Windows Device Independent Bitmap
PCIDSK (rw): PCIDSK Database File
PNM (rw): Portable Pixmap Format (netpbm)
DOQ1 (ro): USGS DOQ (Old Style)
DOQ2 (ro): USGS DOQ (New Style)
ENVI (rw): ENVI .hdr Labelled
EHdr (rw): ESRI .hdr Labelled
PAux (rw): PCI .aux Labelled
MFF (rw): Atlantis MFF Raster
MFF2 (rw): Atlantis MFF2 (HKV) Raster
FujiBAS (ro): Fuji BAS Scanner Image
GSC (ro): GSC Geogrid
FAST (ro): EOSAT FAST Format
BT (rw): VTP .bt (Binary Terrain) 1.3 Format
LAN (ro): Erdas .LAN/.GIS
L1B (ro): NOAA Polar Orbiter Level 1b Data Set
FIT (rw): FIT Image
USGSDEM (rw): USGS Optional ASCII DEM (and CDED)
GXF (ro): GeoSoft Grid Exchange Format
mit freundlichen Grüssen
Cédric Möri
********************************************
Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Abteilung SO!GIS Koordination
Rötihof
4509 Solothurn
T: ++41 (0)32 627 2475
Fax: ++41 (0)32 627 2214
mailto:cedric.moeri at bd.so.ch
http://www.sogis.so.ch
********************************************
More information about the MapServer-users
mailing list