WMS map download

Ryan Ollerenshaw ollerery at ENGR.ORST.EDU
Mon Jul 10 11:45:43 EDT 2006


I really appreciate your help but I am still a little unclear on exactly what to
do.  I understand the mapscript for a WCS request, but I am still unsure how to
download the data once it is returned from the server.   You gave an example of
a WCS GetCoverage Request as:

$mapurl .=
"request=GetCoverage&coverage=[layer_name]&crs=epsg:28992&resx=25&resy=25&format=image/tiff”

So I am assuming that there is some php call that can be used to capture the
returned image but I am not sure how to do this.  Sorry to ask so many
questions but there is just no good documentation out there for WCS.


Quoting "Eijnden, Bart van den (AGI)" <b.vdeijnden at agi.rws.minvenw.nl>:

> Hi,
>
> to download at the native resolution you can better use WCS instead of WMS.
>
> Using WCS you can perform a DescribeCoverage operation which will give you
> the native resolution of your image. This can then be used in the GetCoverage
> request you request to Mapserver WCS.
>
> An example snippet of a DescribeCoverage response:
>
>   <gml:offsetVector>25 0</gml:offsetVector>
>   <gml:offsetVector>0 -25</gml:offsetVector>
>
> The first one is for the X-direction, the second for Y. So my dataset is at
> 25 x 25 meter per pixel resolution.
>
> Example WCS GetCoverage request:
>
>     $mapurl .= "request=GetCoverage&coverage=[layer_name]&crs=epsg:28992&".
>                "resx=25&resy=25&format=image/tiff;
>
> Output format used:
>
>   OUTPUTFORMAT
>     NAME "GEOTIFF"
>     DRIVER "GDAL/GTiff"
>     MIMETYPE "image/tiff"
>     IMAGEMODE "RGBA"
>     EXTENSION "tif"
>     FORMATOPTION "COMPRESS=PACKBITS"
>   END
>
> Best regards,
> Bart
>
>
>
> Quoting "Curtis W. Ruck" <ruckc at yahoo.com>:
>
> > Try using curl with quotes around the url, by having & signs in the command
> > you are actually executing multiple commands or trying to.
> >
>
> Thank you for you help Curtis.  When i try the command:
>
> curl -O
> "http://neuron/cgi-bin/mapserv?map=../html/mapserver/htdocs/display.map"
>
> a file is infact downloaded but it is not the image that i am looking for,
> infact it is not an image at all, i would assume this is the case becuase i
> am
> no longer specifying a layer name in the URL.  Is there anyway i can download
> a
> specific layer from MapServer?
>
>
> >
> > Quoting Ryan Ollerenshaw <ollerery at engr.orst.edu>:
> >
> > > I would like to make it possible for a user to download a full resolution
> > map
> > > from my Linux based WMS.  Does anyone know where I can look to get
> started
> > > implementing such a feature?
> >
> > It seems that i can use MapServers Web Coverage Services (WCS) to generate
> an image using the following in my mapfile:
> >
> > OUTPUTFORMAT
> >     NAME GTiff
> >     DRIVER "GDAL/GTiff"
> >     MIMETYPE "image/tiff"
> >     IMAGEMODE "RGB"
> >     #IMAGEMODE "PC256"
> >     EXTENSION "tif"
> > END
> >
> > But i am still not getting the full resolution of the images that i am
> > requesting.  Also i am still unsure how to download this image from the
> > command
> > line, cant i use something like curl or sftp?  When i try to use curl i get
> > the
> > following:
> >
> > -- start output --
> >
> > [root at neuron ~]# curl -O
> >
>
http://neuron/cgi-bin/mapserv?map=../html/mapserver/htdocs/display.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=themis
> > [1] 32392
> > [2] 32393
> > [3] 32394
> > [4] 32395
> > [2]-  Done                    SERVICE=WMS
> > [3]   Done                    VERSION=1.1.1
> > [root at neuron ~]#   % Total    % Received % Xferd  Average Speed   Time
> > Time
> >   Time  Current
> >                                  Dload  Upload   Total   Spent    Left
> Speed
> > 100   544    0   544    0     0   7019      0 --:--:-- --:--:-- --:--:--
> > 298k
> >
> > -- end output --
> >
> > Then nothing seems to happen. Any help with this would be great, thanks?
> >
> >
> >
> >
> >
>
>
> Disclaimer
> ************************************************************************
> Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
> uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
> hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
> informeren. Wij adviseren u om bij twijfel over de juistheid of de
> volledigheid van de mail contact met afzender op te nemen.
>
> This message shall not constitute any rights or obligations.
> This message is intended solely for the addressee.
> If you have received this message in error, please delete it and
> notify the sender immediately. When in doubt whether this message
> is correct or complete, please contact the sender.
> ************************************************************************
>
>



More information about the mapserver-users mailing list