GeoNode / geonode-mapstore-client

MapStore Client for GeoNode
http://geonode.org/geonode-mapstore-client/master
Other
14 stars 106 forks source link

Enable KML format for WPS export of vector layers #892

Closed giohappy closed 2 years ago

giohappy commented 2 years ago

Geoserver for GeoNode will ship the KMLPPIO plugin, which will add support to do KML exports for vector layers with WPS. We want to add this format to the available export formats for vector layers.

Tasks:

Example request for a DownloadProcess for KML:

<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
  <ows:Identifier>gs:Download</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>layerName</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>tiger:poi</wps:LiteralData>
      </wps:Data>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>outputFormat</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>application/vnd.google-earth.kml+xml</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput mimeType="application/octet-stream">
      <ows:Identifier>result</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>
giohappy commented 2 years ago

@DavidQuartz Geoserver with WPS MKL output support has been deployed both for development (3.3.x) and master demo instances, so you can use them to test it.

A test with the following body worked for me.

<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:dwn="http://geoserver.org/wps/download" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
   <ows:Identifier>gs:Download</ows:Identifier>
   <wps:DataInputs>
      <wps:Input>
         <ows:Identifier>layerName</ows:Identifier>
         <wps:Data>
            <wps:LiteralData>geonode:Comune_Napoli</wps:LiteralData>
         </wps:Data>
      </wps:Input>
      <wps:Input>
         <ows:Identifier>outputFormat</ows:Identifier>
         <wps:Data>
            <wps:LiteralData>application/vnd.google-earth.kml+xml</wps:LiteralData>
         </wps:Data>
      </wps:Input>
      <wps:Input>
         <ows:Identifier>cropToROI</ows:Identifier>
         <wps:Data>
            <wps:LiteralData>false</wps:LiteralData>
         </wps:Data>
      </wps:Input>
   </wps:DataInputs>
   <wps:ResponseForm>
      <wps:ResponseDocument storeExecuteResponse="true" status="true">
         <wps:Output asReference="true">
            <ows:Identifier>result</ows:Identifier>
         </wps:Output>
      </wps:ResponseDocument>
   </wps:ResponseForm>
</wps:Execute>
allyoucanmap commented 2 years ago

@marthamareal could you please verify if this improvement is working as expected on 3.3.x and 4.x We merged the improvements here

marthamareal commented 2 years ago

@allyoucanmap, THe download of KML format is available both on master.demo and development.demo and i can download the kml file successfully.

allyoucanmap commented 2 years ago

@marthamareal thanks!