Download Plugin - geosolutions-it/MapStore GitHub Wiki
This plugin allows the interaction with the 'gs:Download' WPS process in GeoServer (available from 2.6.x version) in order to download RAW data (both Vector and Raster). The tool provides a easy-to-use graphic user interface with the possibility to:
- Configure the layer (you can load the layer inside the directly from the layer tree's contextual menu).
- Configure the output data format (you can specify from the MapStore's configuration the list of the available format in GeoServer that can be used for involved data to download).
- Provide a spatial selection (as spatial filter for data) with the possibility to chose: the output SRS, geometry filter, geometry buffer, cut mode.
- For vector data you can also specify an alphanumeric filter through attributes (the autocomplete functionality is available if you want as usual in MapStore).
The Download executions are summarized inside a grid panel where you can monitor the status or the progress update of the process, check the process idendifier and obioviusly see exception alerts or retrieve the result.
An useful tool inside the form allows the user to load previous downloads simply specifying the process execution identifier.
Configuration
This tool requires as dependency the Feature Manager plugin (this is used for vector alphanumeric filters). The complete plugin configuration is:
{
"ptype": "gxp_download",
"featureManager": "featuremanager",
"readOnlyLayerSelection": false,
"removePreviousLayerOnSelection": false,
"id": "download",
"layersFromAllCapabilities": false,
"outputTarget": "west",
"sridLinkTpl": "http://spatialreference.org/ref/#AUTH#/#SRID#/",
"autoComplete": {
"sources": ["##existing source name in mapstore##"],
"pageSize": 10
},
"formats": {
"wfs":[
["application/zip", "ESRI Shapefile", "wfs", "zip"],
["application/dxf", "DXF", "wfs", "dxf"],
["text/xml; subtype=wfs-collection/1.0", "GML2", "wfs", "gml"],
["text/xml; subtype=wfs-collection/1.1", "GML3", "wfs", "gml"],
["application/vnd.google-earth.kml+xml", "KML", "wfs", "kml"],
["application/gpx+xml", "GPX", "wfs", "gpx"]
],
"wcs":[
["image/tiff", "GeoTIFF", "wcs", "tif"]
]
},
"targetCSR": [
["Native", "", "", ""],
["EPSG:26713", "EPSG:26713", "epsg", "26713"],
["EPSG:25832", "EPSG:25832", "epsg", "25832"],
["EPSG:32632", "EPSG:32632", "epsg", "32632"],
["EPSG:3034", "EPSG:3034", "epsg", "3034"],
["EPSG:3035", "EPSG:3035", "epsg", "3035"],
["EPSG:3416", "EPSG:3416", "epsg", "3416"],
["EPSG:4258", "EPSG:4258", "epsg", "4258"],
["EPSG:4326", "EPSG:4326", "epsg", "4326"],
["EPSG:3857", "EPSG:900913", "sr-org", "7483"]
]
}
readOnlyLayerSelection
: Default to false that means the layers selection combo is read-only. If true allows to enter the layer name in order to filter the list of the available layer names using the provided string.removePreviousLayerOnSelection
: Remove the previous selected layer from this tool if exists.layersFromAllCapabilities
: Allows the layers selection from all the loaded sources of type 'gxp_wmssource' (this refers the layer selection combo box). By default allows only the overlays (in layetree) can be selectedsridLinkTpl
: The base url to use to getting information about a selected CRS.autoComplete
: The MapStore standard autocomplete configuration.formats
: The list of available formats to use for the download (bot for vector and raster).targetCSR
: The list of available SRS to use for the download.
In order to enable the action link from the layer tree, use the configuration below:
{
"ptype":"gxp_downloadtoolaction",
"downloadTool": "download",
"actionTarget": ["layertree.contextMenu"]
}
downloadTool
: The ID of the download tool to refere.