planetfederal / wps-gui

Graphical User Interface (Model Builder) for OGC:WPS (Web Processing Services)
http://boundlessgeo.com
Apache License 2.0
27 stars 15 forks source link

sourceSRS is not required, but run-time exception #108

Closed bartvde closed 10 years ago

bartvde commented 10 years ago

here is another similar case @dwins Reproject takes optional sourceCRS and targetCRS:

screen shot 2014-10-02 at 10 27 02

which seems a bit weird, I'd expect targetCRS to be required actually, and sourceCRS to be an optional override for the dataset CRS. But they are both marked optional:

            <Input maxOccurs="1" minOccurs="0">
                <ows:Identifier>sourceCRS</ows:Identifier>
                <ows:Title>sourceCRS</ows:Title>
                <ows:Abstract>Coordinate reference system of input geometry</ows:Abstract>
                <LiteralData>
                    <ows:AnyValue/>
                </LiteralData>
            </Input>
            <Input maxOccurs="1" minOccurs="0">
                <ows:Identifier>targetCRS</ows:Identifier>
                <ows:Title>targetCRS</ows:Title>
                <ows:Abstract>Target coordinate reference system to use for
                    reprojection</ows:Abstract>
                <LiteralData>
                    <ows:AnyValue/>
                </LiteralData>
            </Input>

when you don't provide targetSRS, you get a run-time exception though:

<?xml version="1.0" encoding="UTF-8"?><wps:ExecuteResponse xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" service="WPS" serviceInstance="http://sfmta.demo.opengeo.org:80/geoserver/ows?" version="1.0.0"><wps:Process wps:processVersion="1.0.0"><ows:Identifier>geo:reproject</ows:Identifier><ows:Title>Reproject Geometry</ows:Title><ows:Abstract>Reprojects a given geometry into a supplied coordinate reference system.</ows:Abstract></wps:Process><wps:Status creationTime="2014-10-02T08:25:40.422Z"><wps:ProcessFailed><ows:ExceptionReport version="1.1.0"><ows:Exception exceptionCode="NoApplicableCode"><ows:ExceptionText>Process failed during execution
Reprojection faiiled
Argument &amp;quot;sourceCRS&amp;quot; should not be null.</ows:ExceptionText></ows:Exception></ows:ExceptionReport></wps:ProcessFailed></wps:Status></wps:ExecuteResponse>

request is:

<p0:Execute xmlns:p0="http://www.opengis.net/wps/1.0.0" service="WPS" version="1.0.0"><p1:Identifier xmlns:p1="http://www.opengis.net/ows/1.1">geo:reproject</p1:Identifier><p0:DataInputs><p0:Input><p1:Identifier xmlns:p1="http://www.opengis.net/ows/1.1">geometry</p1:Identifier><p0:Data><p0:ComplexData mimeType="application/wkt">POLYGON((-8453323.832114212 -234814.55089206155,-4070118.882129064 234814.55089206155,-4696291.017841227 -3835304.331237004,-8453323.832114212 -234814.55089206155))</p0:ComplexData></p0:Data></p0:Input><p0:Input><p1:Identifier xmlns:p1="http://www.opengis.net/ows/1.1">targetCRS</p1:Identifier><p0:Data><p0:LiteralData>EPSG:4326</p0:LiteralData></p0:Data></p0:Input></p0:DataInputs><p0:ResponseForm><p0:RawDataOutput mimeType="application/wkt"><p1:Identifier xmlns:p1="http://www.opengis.net/ows/1.1">result</p1:Identifier></p0:RawDataOutput></p0:ResponseForm></p0:Execute>
bartvde commented 10 years ago

maybe sourceCRS is required if GeoServer cannot get the SRS from the input geometry, such as WKT. So this would explain the way it is currently.

bartvde commented 10 years ago

yes this must be the case, so closing