[Mapserver-users] problems with outputformats and raster files on a windows WMS mapserver 3.7
Paul Hasenohr
paul.hasenohr at jrc.it
Thu Apr 10 07:42:55 PDT 2003
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C2FF80.3CC3B1F0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi All,
=20
In order to dynamically create images in various formats, I downloaded
mapserver 3.7 binaries for windows (to use the new OUTPUTFORMAT =
declaration)
from the dmsolutions website (I also would like to use mapscript).
It works fine for some formats if I only ask for vector data but I get a
white image if I ask for raster data (all declared in my map file). In =
fact,
I would like to subset and convert raster data using the WMS capability =
of
Mapserver.
=20
Does anyone have an idea of what's going wrong ? I put a part of my =
mapfile
at the bottom of this message.
=20
I made some tests by requesting maps of vector data and I had several
problems with the following output formats :
Here is my query :
http://marspcph/scripts/mapserv_ori.exe?map=3Dd:/mapserver/test01.map
<http://marspcph/scripts/mapserv_ori.exe?map=3Dd:/mapserver/test01.map&RE=
QUEST
=3DGetMap&VERSION=3D1.1.0&LAYERS=3Dparcels&FORMAT=3Decw>
&REQUEST=3DGetMap&VERSION=3D1.1.0&LAYERS=3Dparcels&FORMAT=3Decw
parcels is a shapefile
=20
ECW : the file is created in the mapserver temp directory but not send =
to
the browser. I get this error message :
Content-type: application/vnd.ogc.se_xml
=20
<?xml version=3D'1.0' encoding=3D"ISO-8859-1" standalone=3D"no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "
<http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd>
http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd">
<ServiceExceptionReport version=3D"1.1.0">
<ServiceException>
msSaveImageGDAL(): General error message. Failed to create output ECW =
file.
`D:\mapserver\web_tmp\104998407230080.img.tmp' does not exist in the =
file
system,
and is not recognised as a supported dataset name.
=20
</ServiceException>
</ServiceExceptionReport>
JP2 : I would like to use wavelet compressed images (most probably ecw =
as
there are more readers available for this format) and I am interested in =
the
JPEG2000 format (JP2KAK). I use the GDAL library for windows provided =
with
OpenEV and I can use gdal_translate.exe without any problem to read and
write jp2 files (-of JP2KAK). With mapserver I get this error message...
=20
loadOutputFormat(): General error message. OUTPUTFORMAT clause =
references
driver GDAL/JP2KAK, but this driver isn't configured
=20
And my last question is related to the doc entitled MapFile Reference -
MapServer 3.7. It is written that the "EXTENSION" keyword can be used =
but it
is not recognized by the build of Mapserver I downloaded. Does it work =
under
more recent releases ?
=20
I am sorry about all these questions. A few months ago, I was in an =
other
company and working with mapserver on a linux computer but here, as I =
want
to use ecw format, I have to work on a windows computer.....
=20
Best regards,
Paul
=20
Here is a extract of my mapfile
=20
NAME TEST01
STATUS ON
SIZE 400 400
EXTENT 467498.500 5071706.500 474117.500 5077436.500
UNITS METERS
SHAPEPATH "test01_data"
IMAGECOLOR 255 255 255
=20
IMAGETYPE PNG
=20
PROJECTION
"init=3Depsg:32632"
END
=20
WEB
TEMPLATE test01_template.html
IMAGEPATH "D:\mapserver\web_tmp\"
IMAGEURL "/tmp/"
METADATA
WMS_TITLE "WMS Mapserver"
WMS_ABSTRACT "This is only intented for test purposes."
WMS_ACCESSCONSTRAINTS "none"
WMS_ONLINERESOURCE "
<http://marspcph/scripts/mapserv.exe?map=3Dd:/mapserver/test01.map>
http://marspcph/scripts/mapserv.exe?map=3Dd:/mapserver/test01.map"
# WMS_SRS "EPSG:32632"
END
END
=20
OUTPUTFORMAT
NAME "ecw"
DRIVER "GDAL/ECW"
MIMETYPE "image/ecw"
FORMATOPTION "TARGET=3D20"
END
=20
OUTPUTFORMAT
NAME "jp2"
DRIVER "GDAL/JP2KAK"
MIMETYPE "image/jp2"
# FORMATOPTION "TARGET=3D20"
END
[...I skip here legend, scalebar and symbol clauses ...]
=20
LAYER
NAME "isprapart_tif"
DATA "isprapart.tif"
TYPE RASTER
STATUS OFF
PROJECTION
"init=3Depsg:32632"
END
METADATA
WMS_TITLE "Ispra TIFF format"
WMS_ABSTRACT "This is a single 112MB image."
WMS_SRS "EPSG:32632"
END
END
LAYER
NAME "isprapart_pci"
DATA "isprapart.pci"
TYPE RASTER
STATUS OFF
PROJECTION
"init=3Depsg:32632"
END
METADATA
WMS_TITLE "Ispra JP2 format"
WMS_ABSTRACT "This is a single 7.4MB image."
WMS_SRS "EPSG:32632"
END
END
LAYER
NAME "isprapart_jpeg"
DATA "isprapart.jpg"
TYPE RASTER
STATUS OFF
PROJECTION
"init=3Depsg:32632"
END
METADATA
WMS_TITLE "Ispra JPEG format"
WMS_ABSTRACT "This is a single 11.6MB image."
WMS_SRS "EPSG:32632"
END
END
LAYER
NAME "isprapart_ecw"
DATA "isprapart.ecw"
TYPE RASTER
STATUS OFF
PROJECTION
"init=3Depsg:32632"
END
METADATA
WMS_TITLE "Ispra ECW format"
WMS_ABSTRACT "This is a single 14.1MB image."
WMS_SRS "EPSG:32632"
END
END
LAYER
NAME parcels
TYPE POLYGON
STATUS ON
DATA testparcels
=20
CLASSITEM 'COMMUNE'
CLASS
EXPRESSION 'ispra'
OUTLINECOLOR 128 128 128
COLOR 225 225 185
END
CLASS
EXPRESSION /./
OUTLINECOLOR 0 0 0
COLOR 255 255 255
END
METADATA
WMS_TITLE "Parcels"
WMS_ABSTRACT "Parcels available"
WMS_SRS "EPSG:32632"
END
END
END # Map File
------=_NextPart_000_0001_01C2FF80.3CC3B1F0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>Hi=20
All,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>In =
order to=20
dynamically create images in various formats, I downloaded mapserver 3.7 =
binaries for windows (to use the new OUTPUTFORMAT declaration) from the=20
dmsolutions website (I also would like to use =
mapscript).</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>It =
works fine=20
for some formats if I only ask for vector data but I get a white =
image if I=20
ask for raster data (all declared in my map file). In fact, I would =
like to=20
subset and convert raster data using the WMS capability of=20
Mapserver.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>Does =
anyone have an=20
idea of what's going wrong ? <FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003>I put a part of my mapfile at the bottom of =
this=20
message.</SPAN></FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003><FONT =
face=3DArial=20
size=3D2><SPAN =
class=3D854363813-10042003></SPAN></FONT></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>I made =
some tests by=20
requesting maps of vector data and I had several problems with the =
following=20
output formats :</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>Here =
is my query :=20
<A=20
href=3D"http://marspcph/scripts/mapserv_ori.exe?map=3Dd:/mapserver/test01=
.map&REQUEST=3DGetMap&VERSION=3D1.1.0&LAYERS=3Dparcels&FO=
RMAT=3Decw">http://marspcph/scripts/mapserv_ori.exe?map=3Dd:/mapserver/te=
st01.map&REQUEST=3DGetMap&VERSION=3D1.1.0&LAYERS=3Dparcels&am=
p;FORMAT=3Decw</A></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D854363813-10042003>parcels is a=20
shapefile</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>ECW : =
the file is=20
created in the mapserver temp directory but not send to the browser. I =
get this=20
error message :</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>Content-type:=20
application/vnd.ogc.se_xml</SPAN></FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT face=3DArial><SPAN class=3D854363813-10042003><FONT =
size=3D1><?xml=20
version=3D'1.0' encoding=3D"ISO-8859-1" standalone=3D"no" =
?><BR><!DOCTYPE=20
ServiceExceptionReport SYSTEM "</FONT><A=20
href=3D"http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd"><FONT=20
size=3D1>http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd</FONT></=
A><FONT=20
size=3D1>"><BR><ServiceExceptionReport=20
version=3D"1.1.0"><BR><ServiceException><BR>msSaveImageGDAL(): =
General=20
error message. Failed to create output ECW=20
file.<BR>`D:\mapserver\web_tmp\104998407230080.img.tmp' does not exist =
in the=20
file system,<BR>and is not recognised as a supported dataset=20
name.</FONT></SPAN></FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></ServiceException><BR></ServiceExcep=
tionReport><BR><FONT=20
size=3D2></FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN class=3D854363813-10042003><FONT =
size=3D2>JP2 : I=20
would like to use wavelet compressed images (most probably ecw as there =
are more=20
readers available for this format) and I am interested in the JPEG2000 =
format=20
(JP2KAK). I use the GDAL library for windows provided with OpenEV and I =
can use=20
gdal_translate.exe without any problem to read and write jp2 files (-of=20
JP2KAK). With mapserver I get this error=20
message...</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT size=3D1><SPAN class=3D854363813-10042003>loadOutputFormat(): =
General=20
error message. OUTPUTFORMAT clause references driver GDAL/JP2KAK, but =
this=20
driver isn't configured</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>And my =
last question=20
is related to the doc entitled MapFile Reference - MapServer 3.7. It is =
written=20
that the "EXTENSION" keyword can be used but it is not recognized by=20
the build of Mapserver I downloaded. Does it work under more recent =
releases ?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>I am =
sorry about all=20
these questions. A few months ago, I was in an other company and working =
with=20
mapserver on a linux computer but here, as I want to use ecw format, I =
have to=20
work on a windows computer.....</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>Best=20
regards,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003>Paul</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D854363813-10042003>Here =
is a extract of=20
my mapfile</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN class=3D854363813-10042003>NAME=20
TEST01<BR>STATUS ON<BR>SIZE 400 400<BR>EXTENT 467498.500 5071706.500 =
474117.500=20
5077436.500<BR>UNITS METERS<BR>SHAPEPATH "test01_data"<BR>IMAGECOLOR 255 =
255=20
255</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>IMAGETYPE=20
PNG</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003>PROJECTION</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN class=3D854363813-10042003> =
"init=3Depsg:32632"<BR>END</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>WEB<BR> =20
TEMPLATE test01_template.html<BR> IMAGEPATH=20
"D:\mapserver\web_tmp\"<BR> IMAGEURL "/tmp/"<BR> =20
METADATA<BR> WMS_TITLE "WMS =
Mapserver"<BR> =20
WMS_ABSTRACT "This is only intented for test =
purposes."<BR> =20
WMS_ACCESSCONSTRAINTS "none"</SPAN></FONT></DIV>
<DIV><FONT face=3DArial><SPAN class=3D854363813-10042003><FONT=20
size=3D1> WMS_ONLINERESOURCE "</FONT><A=20
href=3D"http://marspcph/scripts/mapserv.exe?map=3Dd:/mapserver/test01.map=
"><FONT=20
size=3D1>http://marspcph/scripts/mapserv.exe?map=3Dd:/mapserver/test01.ma=
p</FONT></A><FONT=20
size=3D1>"</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003># =20
WMS_SRS "EPSG:32632"<BR> END<BR>END</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003>OUTPUTFORMAT<BR> NAME "ecw"<BR> =
DRIVER=20
"GDAL/ECW"<BR> MIMETYPE "image/ecw"<BR> FORMATOPTION=20
"TARGET=3D20"<BR>END</SPAN></FONT></DIV>
<DIV><FONT size=3D1></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003>OUTPUTFORMAT<BR> NAME "jp2"<BR> =
DRIVER=20
"GDAL/JP2KAK"<BR> MIMETYPE "image/jp2"<BR># FORMATOPTION=20
"TARGET=3D20"<BR>END<BR></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003> [...I skip=20
here legend, scalebar and symbol clauses ...]</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>LAYER<BR> NAME=20
"isprapart_tif"<BR> DATA "isprapart.tif"<BR> TYPE =
RASTER<BR> =20
STATUS OFF<BR> PROJECTION<BR> =20
"init=3Depsg:32632"<BR> END<BR> =
METADATA<BR> =20
WMS_TITLE "Ispra TIFF format"<BR> WMS_ABSTRACT "This =
is a=20
single 112MB image."<BR> WMS_SRS =
"EPSG:32632"<BR> =20
END<BR>END<BR>LAYER<BR> NAME "isprapart_pci"<BR> DATA=20
"isprapart.pci"<BR> TYPE RASTER<BR> STATUS OFF<BR> =20
PROJECTION<BR> "init=3Depsg:32632"<BR> =
END<BR> =20
METADATA<BR> WMS_TITLE "Ispra JP2=20
format"<BR> WMS_ABSTRACT "This is a single 7.4MB=20
image."<BR> WMS_SRS "EPSG:32632"<BR> =20
END<BR>END<BR>LAYER<BR> NAME "isprapart_jpeg"<BR> DATA=20
"isprapart.jpg"<BR> TYPE RASTER<BR> STATUS OFF<BR> =20
PROJECTION<BR> "init=3Depsg:32632"<BR> =
END<BR> =20
METADATA<BR> WMS_TITLE "Ispra JPEG=20
format"<BR> WMS_ABSTRACT "This is a single 11.6MB=20
image."<BR> WMS_SRS "EPSG:32632"<BR> =20
END<BR>END<BR>LAYER<BR> NAME "isprapart_ecw"<BR> DATA=20
"isprapart.ecw"<BR> TYPE RASTER<BR> STATUS OFF<BR> =20
PROJECTION<BR> "init=3Depsg:32632"<BR> =
END<BR> =20
METADATA<BR> WMS_TITLE "Ispra ECW=20
format"<BR> WMS_ABSTRACT "This is a single 14.1MB=20
image."<BR> WMS_SRS "EPSG:32632"<BR> =20
END<BR>END<BR>LAYER<BR> NAME parcels<BR> TYPE =
POLYGON<BR> =20
STATUS ON<BR> DATA testparcels<BR> <BR> CLASSITEM=20
'COMMUNE'<BR> CLASS<BR> EXPRESSION=20
'ispra'<BR> OUTLINECOLOR 128 128 =
128<BR> =20
COLOR 225 225 185<BR> END<BR> CLASS<BR> =
EXPRESSION=20
/./<BR> OUTLINECOLOR 0 0 0<BR> COLOR =
255 255=20
255<BR> END<BR> METADATA<BR> WMS_TITLE=20
"Parcels"<BR> WMS_ABSTRACT "Parcels=20
available"<BR> WMS_SRS "EPSG:32632"<BR> =20
END<BR>END</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN class=3D854363813-10042003>END # =
Map=20
File</SPAN></FONT></DIV></BODY></HTML>
------=_NextPart_000_0001_01C2FF80.3CC3B1F0--
More information about the MapServer-users
mailing list