Hi,
I’m trying to use a Clip process instead of a IntersectionFeatureCollection but the request gets an error.
My Clip request:
<?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:Identifiergs:Clip</ows:Identifier>
wps:DataInputs
wps:Input
ows:Identifierfeatures</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:lait=“http://www.lait.it”>
<wfs:Query typeName=“lait:sde_SDEDATA_Tavola_A_explod”/>
</wfs:GetFeature>
</wps:Body>
</wps:Reference>
</wps:Input>
wps:Input
ows:Identifierclip</ows:Identifier>
wps:Data
<wps:ComplexData mimeType=“application/wkt”></wps:ComplexData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
wps:ResponseForm
<wps:RawDataOutput mimeType=“text/xml; subtype=wfs-collection/1.0”>
ows:Identifierresult</ows:Identifier>
</wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>
The error:
Caused by: java.lang.RuntimeException: Unrecognized target type com.vividsolutions.jts.geom.Polygon
at org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.clipGeometry(ClipProcess.java:275)
at org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.hasNext(ClipProcess.java:195)
The intersectionFeatureCollection request work’s (but it’s very very slow…):
<wps:Execute xmlns:wps=“http://www.opengis.net/wps/1.0.0” 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” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
<ows:Identifier xmlns:ows=“http://www.opengis.net/ows/1.1”>gs:IntersectionFeatureCollection</ows:Identifier>
wps:DataInputs
wps:Input
<ows:Identifier xmlns:ows=“http://www.opengis.net/ows/1.1”>firstFeatures</ows:Identifier>
<ows:Title xmlns:ows=“http://www.opengis.net/ows/1.1”>firstFeatures</ows:Title>
wps:Data
<wps:ComplexData mimeType=“application/json”>{“type”:“FeatureCollection”,“features”:[{“type”:“Feature”,“properties”:{},“geometry”:{“type”:“Polygon”,“coordinates”:[[[321280.18957502,4594799.7962427],[321375.01624402,4591812.7561692],[324246.90964802,4591338.6228242],[327457.46972702,4591237.0228217],[328629.25642252,4592435.9028512],[328649.57642302,4594691.4229067],[321280.18957502,4594799.7962427]]]}}]}</wps:ComplexData>
</wps:Data>
</wps:Input>
wps:Input
<ows:Identifier xmlns:ows=“http://www.opengis.net/ows/1.1”>secondFeatures</ows:Identifier>
<ows:Title xmlns:ows=“http://www.opengis.net/ows/1.1”>secondFeatures</ows:Title>
<wps:Reference mimeType=“text/xml; subtype=wfs-collection/1.0” xlink:href=“http://geoserver/wfs” xmlns:xlink=“http://www.w3.org/1999/xlink” method=“POST”>
wps:Body
<wfs:GetFeature xmlns:wfs=“http://www.opengis.net/wfs” service=“WFS” version=“1.0.0” outputFormat=“GML2”>
<wfs:Query typeName=“lait:sde_SDEDATA_Tavola_A_explod”/>
</wfs:GetFeature>
</wps:Body>
</wps:Reference>
</wps:Input>
wps:Input
<ows:Identifier xmlns:ows=“http://www.opengis.net/ows/1.1”>intersectionMode</ows:Identifier>
<ows:Title xmlns:ows=“http://www.opengis.net/ows/1.1”>intersectionMode</ows:Title>
wps:Data
wps:LiteralDataINTERSECTION</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
wps:ResponseForm
wps:RawDataOutput
<ows:Identifier xmlns:ows=“http://www.opengis.net/ows/1.1”>result</ows:Identifier>
</wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>
Any idea?
Thank’s.
On Mon, Apr 14, 2014 at 4:36 PM, Gianni Barrotta
<giannibarrotta@anonymised.com>wrote:
The error:
Caused by: java.lang.RuntimeException: Unrecognized target type
com.vividsolutions.jts.geom.Polygon
at
org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.clipGeometry(ClipProcess.java:275)
at
org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.hasNext(ClipProcess.java:195)
Hum... uh? How old is GeoServer? ClipProcess now only has 268 lines?
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
-------------------------------------------------------
GeoServer 2.5, with wps plugin.
The full log file is avaible here:
http://coreweb1.coremed.it/download/geoserver-log.zip

···
On Mon, Apr 14, 2014 at 4:49 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:
On Mon, Apr 14, 2014 at 4:36 PM, Gianni Barrotta <giannibarrotta@anonymised.com> wrote:
The error:
Caused by: java.lang.RuntimeException: Unrecognized target type com.vividsolutions.jts.geom.Polygon
at org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.clipGeometry(ClipProcess.java:275)
at org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.hasNext(ClipProcess.java:195)
Hum… uh? How old is GeoServer? ClipProcess now only has 268 lines?
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
I discovered that the layer not working has POLYGON geometries, while the other layers have MULTIPOLYGON…looking at the source code, it seems that the only geometries managed by the ClipProcess are MultiLineString, Point, MultiPoint, MultiPolygon. Do I need to convert geometries from POLYGON to MULTIPOLYGON in order to have clip working?
···
On Mon, Apr 14, 2014 at 5:14 PM, Gianni Barrotta <giannibarrotta@anonymised.com> wrote:
GeoServer 2.5, with wps plugin.
The full log file is avaible here:
http://coreweb1.coremed.it/download/geoserver-log.zip

On Mon, Apr 14, 2014 at 4:49 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:
On Mon, Apr 14, 2014 at 4:36 PM, Gianni Barrotta <giannibarrotta@anonymised.com> wrote:
The error:
Caused by: java.lang.RuntimeException: Unrecognized target type com.vividsolutions.jts.geom.Polygon
at org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.clipGeometry(ClipProcess.java:275)
at org.geotools.process.feature.gs.ClipProcess$ClippingFeatureIterator.hasNext(ClipProcess.java:195)
Hum… uh? How old is GeoServer? ClipProcess now only has 268 lines?
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
On Tue, Apr 15, 2014 at 3:00 PM, Gianni Barrotta
<giannibarrotta@anonymised.com>wrote:
I discovered that the layer not working has POLYGON geometries, while the
other layers have MULTIPOLYGON...looking at the source code, it seems that
the only geometries managed by the ClipProcess are MultiLineString, Point,
MultiPoint, MultiPolygon. Do I need to convert geometries from POLYGON to
MULTIPOLYGON in order to have clip working?
Or change the code to support polygon too
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
-------------------------------------------------------