Hi, you can use a simple PHP script which will present a save as dialog to the user.
For an example check out download.php in Chameleon (chameleon.maptools.org). Best regards, Bart -----Oorspronkelijk bericht----- Van: UMN MapServer Users List [mailto:[EMAIL PROTECTED] Ryan Ollerenshaw Verzonden: maandag 10 juli 2006 17:46 Aan: [email protected] Onderwerp: Re: [UMN_MAPSERVER-USERS] WMS map download 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)" <[EMAIL PROTECTED]>: > 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" <[EMAIL PROTECTED]>: > > > 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 <[EMAIL PROTECTED]>: > > > > > 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 -- > > > > [EMAIL PROTECTED] ~]# 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 > > [EMAIL PROTECTED] ~]# % 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. > ************************************************************************ > > 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. ************************************************************************
