[Users] Method to download raster WCS (and vector WFS)

pablo zader pzader at gmail.com
Mon Sep 15 21:38:56 CEST 2014


Hi list.,

I want get file raster in one step. The same for vector files.

I propose the solution consists of two steps:

step 1:
                                                    OpenLayers.Request.GET({
                 url: 'http://'+host+'/geoserver/wcs?',
params: {
service: "WCS",
                         version: "1.1.1",
                                        request: "getCoverage",
identifier: namelayer,
format: "image/geotiff",
boundingbox: minx+','+miny+','+maxx+','+maxy+',urn:ogc:def:crs:EPSG::4326',
store: true,
async: true
  },
                          success: function(reply) {


                                   ...

                   }

In this case I return an XML file with the link to file raster (store:
true), then I read that link and run the code:

step 2:

                                               var link =
getLinkRasterfromReply(reply.responseText)
                                               var form = body.createChild({
tag: 'form',
name: 'wcs',
cls: 'x-hidden',
id:'hiddenform-form',
        action: linkp,
method: "GET"
});
var input = body.createChild({
tag: 'input',
value: "Submit",
type: 'submit'
});
form.dom.submit();



Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20140915/4f777dd4/attachment.htm 


More information about the Users mailing list