I need the ability to be able to display ECW and JPEG2000 format files within MapServer via a Community Mapbuilder client which sends WMS requests for the images to MapServer

John Mitchell mitchelljj98 at GMAIL.COM
Fri Nov 24 06:46:33 EST 2006


Hi Frank,

Thanks for the information.  I had a couple of questions:

You said below:
"
I am using the "standalone" FWTools binaries for linux
(http://fwtools.maptools.org).  In my Apache cgi-bin directory I have
the script mapserv_landsat which looks like this:

-----------------------
#!/bin/sh

export MS_MAPFILE=/home/warmerda/maps/landsat.map
. /opt/FWTools-1.0.0a2/fwtools_env.sh
exec /opt/FWTools-1.0.0a2/bin/mapserv "$*"
"

How would the above be revised on a windows system?  The exec statement  I
would replace the /opt with /program files since FWTools is within the
"program files" folder on windows.  What about the
. /opt/FWTools-1.0.0a2/fwtools_env.sh statement?  I don't see anything
called fwtools_env.sh within the FWTools folder.  What is #!/bin/sh is this
a linux statement?

Thanks,

John J. Mitchell
On 11/23/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
>
> John Mitchell wrote:
> > Hi,
> >
> > I need the ability to be able to display ECW and JPEG2000 format files
> > within MapServer via a Community Mapbuilder client which sends WMS
> > requests for the images to MapServer.  My current architecture is
> > PostGreSQL database connected to PostGIS which connects to GeoServer on
> > Apache Tomcat and Community Mapbuilder client which sends WMS requests
> > for the images to GeoServer.  I would like to be able to send similar
> > requests to MapServer for compressed Raster data but instead of going to
> > PostGIS I would like to connect to the ECW (which are compressed Raster)
> > files and JPEG2000 files.
> > Since I have never installed or used MapServer before I would appreciate
> > it if someone could give my a high level overview of what I would need
> > to do as far as:
> >
> > 1.) What should I download for a windows server if all I want to do is
> > display ECW and JPEG2000 files via WMS?
> > 2.) What configuration is necessary on the server in order to display
> > via WMS for ECW and JPEG2000 files and what location should I place
> > these files?
> > 3.) What is the format for both a GetMap and GetCapabilities request on
> > the client side which in my case is Community Mapbuilder.
>
> John,
>
> You don't specify what platform you want to deploy on.  The trick with
> JPEG2000 and ECW support is getting a binary build for your platform that
> has these formats included.
>
> I have a service at http://maps.gdal.org serving a big south american
> landsat scene from ecw.  I'll provide details on my configuration.  You
> may find it helpful to take a similar approach.
>
> I am using the "standalone" FWTools binaries for linux
> (http://fwtools.maptools.org).  In my Apache cgi-bin directory I have
> the script mapserv_landsat which looks like this:
>
> -----------------------
> #!/bin/sh
>
> export MS_MAPFILE=/home/warmerda/maps/landsat.map
> . /opt/FWTools-1.0.0a2/fwtools_env.sh
> exec /opt/FWTools-1.0.0a2/bin/mapserv "$*"
> -----------------------
>
> This basically invokes the FWTools mapserver executable with a
> preconfigured mapfile.  The FWTools binaries include essentially all
> required libraries.  The mapfile looks like the following and includes
> sufficient metadat to serve via WMS and WCS.  I think there may be a
> bit of extra cruft in there too.
>
> MAP
>
>    NAME 'LANDSAT'
>
>    EXTENT -180 -90 180 90
>    UNITS DD
>    SIZE 600 300
>    IMAGECOLOR 0 255 0
>
>    IMAGETYPE JPEG
>    DEBUG ON
>
>    PROJECTION
>      "init=epsg:4326"
>    END
>
> OUTPUTFORMAT
>   NAME jpeg2000
>   DRIVER "GDAL/JP2ECW"
>   MIMETYPE "image/jpeg2000"
>   FORMATOPTION "TARGET=95"
>   IMAGEMODE RGB
> END
> #
> # Start of web interface definition
> #
>
>
>    WEB
>      HEADER web/landsatcgi/demo_header.html
>      TEMPLATE web/landsatcgi/demo.html
>      FOOTER web/landsatcgi/demo_footer.html
>      METADATA
>        "ows_title" "Landsat Server"
>        "wcs_label" "Landsat WCS Server"
>        "wcs_keywordlist" "WCS,Landsat"
>        "wcs_onlineresource" "http://maps.gdal.org/cgi-bin/mapserv_landsat"
>      END
>      IMAGEURL "/tmp/"
>      IMAGEPATH "/u/maps/tmp/"
>    END
>
>    LAYER
>      NAME "South America"
>      STATUS ON
>      DEBUG ON
>      TYPE RASTER
>      DATA '/home/warmerda/torrents/data/South America Landsat742.ecw'
>      METADATA
>        wcs_label "Landsat"
>        ows_title "Landsat"
>        ows_srs  "EPSG:4269 EPSG:4326"
>        ows_extent "-82.3512420 -56.8510672 -33.9029540 13.0499433"
>        wcs_resolution "0.00025602 0.00025602"
>        wcs_formats "JPEG PNG24"
>        wcs_nativeformat "ECW"
>      END
>      DUMP TRUE
>      PROJECTION
>        "init=epsg:4326"
>      END
>    END
> END
>
> Note that to use an ecw file (or jpeg2000 file) you just specify the
> name in the DATA line for the layer.
>
> The getcapabilities url for my service is:
>
>
> http://maps.gdal.org/cgi-bin/mapserv_landsat?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
>
> I hope this helps.
>
> Good luck,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>


-- 
John J. Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061124/f0c248f5/attachment.html


More information about the mapserver-users mailing list