0

I'm working on web map application and I just want to create WPS service request in url form(GET).

Like we can create WFS, WMS service url.. I have executed WPS services like JTS buffer, length etc.. But output is in XML form, I want result is in geojson form.

RAM
  • 2,257
  • 2
  • 19
  • 41
Priyanka
  • 379
  • 2
  • 5

1 Answers1

0

1) If you are using Geoserver.

Geoserver support different output formats. You should specify output format at the end of the string in a GET request like:

&outputFormat=application%2Fjson

Although geoserver recommends using Post request with WPS Services. In Openlayers 3 WPS client is not implemented to create Xml Requests. Geoserver has a WPS Builder that can generate Xml Request from inputs and outputs. Than you can take the generated xml and pass it in a string variable in javascript. Replace xml input values with variables. In my case i needed only one process, but you can do a switch function. You can use a simple xmlPost request to pass the xml string to geoserver.

Or you can have a look at this https://gis.stackexchange.com/questions/136512/implementing-wps-client-in-openlayers-3

2)Other

You can use JSONIX to convert JSON <=> XML. https://github.com/highsource/jsonix