I thought transform was already listed for WPS?
Yep here it is:
*vec:Transform*
Computes a new feature collection from the input one by renaming, deleting,
and computing new attributes. Attribute values are specified as ECQL
expressions in the form name=expression.
Combined with:
http://docs.geoserver.org/stable/en/user/filter/function_reference.html
I was able to execute using:
<?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>vec:Transform</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>features</ows:Identifier>
<wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs"
method="POST">
<wps:Body>
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp">
<wfs:Query typeName="topp:states"/>
</wfs:GetFeature>
</wps:Body>
</wps:Reference>
</wps:Input>
<wps:Input>
<ows:Identifier>transform</ows:Identifier>
<wps:Data>
<wps:LiteralData>the_geom=centroid(the_geom);LAND_MILES=LAND_KM*0.386102</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:RawDataOutput mimeType="text/xml; subtype=wfs-collection/1.0">
<ows:Identifier>result</ows:Identifier>
</wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>
Jody Garnett
On Thu, May 29, 2014 at 6:41 AM, Andrea Aime
<andrea.a...@geo-solutions.it>wrote:
> On Wed, May 28, 2014 at 10:57 AM, Roger Bedell <sylvanasc...@gmail.com>wrote:
>
>> Looking for suggestions. I'd like to multiply the output of one of the
>> properties of a WFS request, similar to what I'm doing in an SLD to convert
>> meters to feet for my "value" property.
>>
>> Does this make any sense? It doesn't appear to work, and reading the WFS
>> spec is not helping.
>>
>
> You cannot do any kind of calculation with WFS. Look at WPS instead, it's
> the OGC protocol
> meant to do any kind of calculation.
>
> Unfortunately there is no out of the box process doing exactly what you
> want, but with some java programming
> the TransformProcess defined in GeoTools could be made usable in GeoServer
> WPS.
>
> Cheers
> Andrea
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
> for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users