[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 10:42:55 EDT 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>&nbsp;</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&nbsp;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).&nbsp;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>&nbsp;</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>&nbsp;</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&amp;REQUEST=3DGetMap&amp;VERSION=3D1.1.0&amp;LAYERS=3Dparcels&amp;FO=
RMAT=3Decw">http://marspcph/scripts/mapserv_ori.exe?map=3Dd:/mapserver/te=
st01.map&amp;REQUEST=3DGetMap&amp;VERSION=3D1.1.0&amp;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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial><SPAN class=3D854363813-10042003><FONT =
size=3D1>&lt;?xml=20
version=3D'1.0' encoding=3D"ISO-8859-1" standalone=3D"no" =
?&gt;<BR>&lt;!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>"&gt;<BR>&lt;ServiceExceptionReport=20
version=3D"1.1.0"&gt;<BR>&lt;ServiceException&gt;<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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003>&lt;/ServiceException&gt;<BR>&lt;/ServiceExcep=
tionReport&gt;<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).&nbsp;With mapserver&nbsp;I get this error=20
message...</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D854363813-10042003></SPAN></FONT>&nbsp;</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>&nbsp;</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&nbsp;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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp; =

"init=3Depsg:32632"<BR>END</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>WEB<BR>&nbsp;=20
TEMPLATE test01_template.html<BR>&nbsp; IMAGEPATH=20
"D:\mapserver\web_tmp\"<BR>&nbsp; IMAGEURL "/tmp/"<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE "WMS =
Mapserver"<BR>&nbsp;&nbsp;&nbsp;=20
WMS_ABSTRACT "This is only intented for test =
purposes."<BR>&nbsp;&nbsp;&nbsp;=20
WMS_ACCESSCONSTRAINTS "none"</SPAN></FONT></DIV>
<DIV><FONT face=3DArial><SPAN class=3D854363813-10042003><FONT=20
size=3D1>&nbsp;&nbsp;&nbsp; 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>#&nbsp;&nbsp;&nbsp;=20
WMS_SRS "EPSG:32632"<BR>&nbsp; END<BR>END</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003>OUTPUTFORMAT<BR>&nbsp; NAME "ecw"<BR>&nbsp; =
DRIVER=20
"GDAL/ECW"<BR>&nbsp; MIMETYPE "image/ecw"<BR>&nbsp; FORMATOPTION=20
"TARGET=3D20"<BR>END</SPAN></FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D1><SPAN=20
class=3D854363813-10042003>OUTPUTFORMAT<BR>&nbsp; NAME "jp2"<BR>&nbsp; =
DRIVER=20
"GDAL/JP2KAK"<BR>&nbsp; MIMETYPE "image/jp2"<BR>#&nbsp; FORMATOPTION=20
"TARGET=3D20"<BR>END<BR></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>&nbsp;[...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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D1><SPAN =
class=3D854363813-10042003>LAYER<BR>&nbsp; NAME=20
"isprapart_tif"<BR>&nbsp; DATA "isprapart.tif"<BR>&nbsp; TYPE =
RASTER<BR>&nbsp;=20
STATUS OFF<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp;=20
"init=3Depsg:32632"<BR>&nbsp; END<BR>&nbsp; =
METADATA<BR>&nbsp;&nbsp;&nbsp;=20
WMS_TITLE "Ispra TIFF format"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "This =
is a=20
single 112MB image."<BR>&nbsp;&nbsp;&nbsp; WMS_SRS =
"EPSG:32632"<BR>&nbsp;=20
END<BR>END<BR>LAYER<BR>&nbsp; NAME "isprapart_pci"<BR>&nbsp; DATA=20
"isprapart.pci"<BR>&nbsp; TYPE RASTER<BR>&nbsp; STATUS OFF<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; "init=3Depsg:32632"<BR>&nbsp; =
END<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE "Ispra JP2=20
format"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "This is a single 7.4MB=20
image."<BR>&nbsp;&nbsp;&nbsp; WMS_SRS "EPSG:32632"<BR>&nbsp;=20
END<BR>END<BR>LAYER<BR>&nbsp; NAME "isprapart_jpeg"<BR>&nbsp; DATA=20
"isprapart.jpg"<BR>&nbsp; TYPE RASTER<BR>&nbsp; STATUS OFF<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; "init=3Depsg:32632"<BR>&nbsp; =
END<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE "Ispra JPEG=20
format"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "This is a single 11.6MB=20
image."<BR>&nbsp;&nbsp;&nbsp; WMS_SRS "EPSG:32632"<BR>&nbsp;=20
END<BR>END<BR>LAYER<BR>&nbsp; NAME "isprapart_ecw"<BR>&nbsp; DATA=20
"isprapart.ecw"<BR>&nbsp; TYPE RASTER<BR>&nbsp; STATUS OFF<BR>&nbsp;=20
PROJECTION<BR>&nbsp;&nbsp;&nbsp; "init=3Depsg:32632"<BR>&nbsp; =
END<BR>&nbsp;=20
METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE "Ispra ECW=20
format"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "This is a single 14.1MB=20
image."<BR>&nbsp;&nbsp;&nbsp; WMS_SRS "EPSG:32632"<BR>&nbsp;=20
END<BR>END<BR>LAYER<BR>&nbsp; NAME parcels<BR>&nbsp; TYPE =
POLYGON<BR>&nbsp;=20
STATUS ON<BR>&nbsp; DATA testparcels<BR>&nbsp; <BR>&nbsp; CLASSITEM=20
'COMMUNE'<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; EXPRESSION=20
'ispra'<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 128 128 =
128<BR>&nbsp;&nbsp;&nbsp;=20
COLOR 225 225 185<BR>&nbsp; END<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; =
EXPRESSION=20
/./<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp; COLOR =
255 255=20
255<BR>&nbsp; END<BR>&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp; WMS_TITLE=20
"Parcels"<BR>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT "Parcels=20
available"<BR>&nbsp;&nbsp;&nbsp; WMS_SRS "EPSG:32632"<BR>&nbsp;=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