No floating point / double fields in response

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No floating point / double fields in response

julianrosser
Hello,

A colleague has been testing out v3.4 of the WPS with GeoTools. It seems that input data with fields containing floating point values are being truncated to integers in the output response, after being processed by the WPS.

I have recreated this issue on the 52N demo WPS and GeoServer and include the exec requests and responses below (from http://geoprocessing.demo.52north.org/wps/test_client).

Note that the input data includes the field <tiger:LAND>2.0</tiger:LAND>
But in the response this is <n52:LAND>2</n52:LAND>.

Over the years we have integrated various useful patches from this board and I think this issue may be related to this post using ver 3.3.0 [1] but perhaps the fix wasn't integrated in next releases? I can't see any related issues on the GitHubso I am happy to add it now if it's new bug.

[1] http://geoprocessing.forum.52north.org/Chaining-FeatureCollections-td4025861.html


Execute Request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
  <ows:Identifier>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>data</ows:Identifier>
      <wps:Reference schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd" xlink:href="http://geoprocessing.demo.52north.org:8080/geoserver/tiger/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=tiger:poly_landmarks&amp;maxFeatures=1&amp;outputFormat=gml3" method="GET"/>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>width</ows:Identifier>
      <wps:Data>
        <wps:LiteralData dataType="xs:double">0.05</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:ResponseDocument storeExecuteResponse="false" lineage="false" status="false">
      <wps:Output asReference="false" schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd" mimeType="text/xml" encoding="UTF-8">
        <ows:Identifier>result</ows:Identifier>
        <ows:Title>result</ows:Title>
        <ows:Abstract>result</ows:Abstract>
      </wps:Output>
    </wps:ResponseDocument>
  </wps:ResponseForm>
</wps:Execute>



Execute Response:

<?xml version="1.0" encoding="UTF-8"?>
<wps:ExecuteResponse xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd"serviceInstance="http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService?REQUEST=GetCapabilities&amp;SERVICE=WPS" xml:lang="en-US" service="WPS" version="1.0.0">
  <wps:Process wps:processVersion="1.1.0">
    <ows:Identifier>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Identifier>
    <ows:Title>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Title>
  </wps:Process>
  <wps:Status creationTime="2016-08-25T11:11:22.463Z">
    <wps:ProcessSucceeded>Process successful</wps:ProcessSucceeded>
  </wps:Status>
  <wps:ProcessOutputs>
    <wps:Output>
      <ows:Identifier>result</ows:Identifier>
      <ows:Title>result</ows:Title>
      <wps:Data>
        <wps:ComplexData schema="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd" encoding="UTF-8"mimeType="text/xml">
          <gml:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml"xmlns:n52="http://www.52north.org/8db20053-f225-47f6-8914-7bdd974db523"xsi:schemaLocation="http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/feature.xsd http://www.52north.org/8db20053-f225-47f6-8914-7bdd974db523 http://geoprocessing.demo.52north.org:8080/wps/static/schemas/8db20053-f225-47f6-8914-7bdd974db523.xsd">
            <gml:featureMembers>
              <n52:Feature-8db20053-f225-47f6-8914-7bdd974db523 gml:id="ID0">
                <gml:boundedBy>
                  <gml:Envelope srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
                    <gml:lowerCorner>-74.04939392637371 40.68002787187654</gml:lowerCorner>
                    <gml:upperCorner>-73.94566838655686 40.78261167244224</gml:upperCorner>
                  </gml:Envelope>
                </gml:boundedBy>
                <n52:the_geom>
                  <gml:MultiSurface srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
                    <gml:surfaceMember>
                      <gml:Polygon srsDimension="2">
                        <gml:exterior>
                          <gml:LinearRing srsDimension="2">
                            <gml:posList>-74.02069649928484 40.686247292338976 -74.02176288264086 40.68677154775413 -74.02256188264086 40.68718554775413 -74.0307542518011 40.69250499180978 -74.03775606793322 40.699315716321216 -74.04330010981228 40.70735779299095 -74.04717479152487 40.71632429950937 -74.0492322375521 40.725873033109366 -74.04939392637371 40.73563957058401 -74.04765368720707 40.74525117633756 -74.04407793551259 40.75434102767507 -74.03880313827678 40.762562214428804 -74.03832313827678 40.763170214428804 -74.03698887731674 40.76478924540304 -74.03646687731674 40.76539624540303 -74.02965735711881 40.7719455783748 -74.02173738837324 40.777097026983704 -74.01298975618623 40.780666657051626 -74.00372679766117 40.78252701375514 -73.99427924979902 40.78261167244224 -73.98498444042407 40.780917610346464 -73.97617424378238 40.77750531451581 -73.97510938153934 40.77697222607191 -73.97422424837278 40.77655626853684 -73.9655511270735 40.77134977240972 -73.95810347132523 40.7645041125548 -73.95218613046477 40.756299497260045 -73.94804131459121 40.74707175992265 -73.94583868036064 40.73719861263112 -73.94566838655686 40.72708418555816 -73.94753740368911 40.71714248500176 -73.95136922867339 40.70778044717425 -73.95385939995722 40.70407059449306 -73.95373303774379 40.703990968988705 -73.9541470377438 40.70333396898871 -73.95554851445848 40.701554154759755 -73.95700701627618 40.69938128138593 -73.95755201627618 40.69872428138593 -73.95768800849432 40.69883709076018 -73.96061519616569 40.69511969023991 -73.9686501725919 40.68843010112219 -73.97790064105692 40.68355770110668 -73.98796212871704 40.6807155338352 -73.99839470125521 40.68002787187654 -74.00874219882418 40.68152478296067 -74.01855218144394 40.685140815279915 -74.01945918144393 40.68558781527991 -74.02069649928484 40.686247292338976</gml:posList>
                          </gml:LinearRing>
                        </gml:exterior>
                      </gml:Polygon>
                    </gml:surfaceMember>
                  </gml:MultiSurface>
                </n52:the_geom>
                <n52:LAND>2</n52:LAND>
                <n52:CFCC>D85</n52:CFCC>
                <n52:LANAME>Washington Square Park</n52:LANAME>
              </n52:Feature-8db20053-f225-47f6-8914-7bdd974db523>
            </gml:featureMembers>
          </gml:FeatureCollection>
        </wps:ComplexData>
      </wps:Data>
    </wps:Output>
  </wps:ProcessOutputs>
</wps:ExecuteResponse>​


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No floating point / double fields in response

BenjaminPross
Hello Julian,

There is already a bug report for this issue: issue 143. We'll fix this for the next version.

Cheers,

Benjamin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No floating point / double fields in response

julianrosser
Thanks Ben. That's good to know. Do you have a rough idea yet of the date for the next release?

Cheers,
Julian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No floating point / double fields in response

BenjaminPross
Hi Julian,

The next version should be released fairly soon, probably in two weeks. I could provide you with a patched jar until then, if you need it.

Cheers,

Benjamin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No floating point / double fields in response

julianrosser
That's great. No, don't worry about providing patches. We will wait for the release.

Thanks,
Julian

Loading...