opengeospatial / ets-ogcapi-features10

Public Repository for the OGC API - Features Compliance Test Suite
Other
16 stars 6 forks source link

Incorrect processing of point coordinates #222

Closed cportele closed 1 year ago

cportele commented 1 year ago

Describe the bug When I execute the recently updated tests against https://ri.ldproxy.net/daraa for 10 collections, I get two failed tests for test method validateFeaturesWithBoundingBoxResponse, but the evaluation of both results is incorrect:

Geometry 'POINT (35.9535 32.59207)' outside bounding box: '35.9534988,32.5920715,36.1085472,32.6405067'.

The geometry returned by the feature is 35.9535002 32.5920726, not 35.9535 32.59207 as reported. The geometry is within the bounding box.

It looks as if there are some floating point issues when processing the JSON response. The issue seems to be here. response.response.groovyResponse.content has ... "coordinates":[35.9535002,32.5920726] ..., but features.get(3).get("geometry").get("coordinates").toString() is [35.9535, 32.59207].

Geometry 'POINT (36.107697 32.63196)' outside bounding box: '36.1047058,32.6297493,36.1076965,32.6429558'.

The geometry returned by the feature is 36.1076948 32.6319629, not 36.107697 32.63196 as reported. The geometry is within the bounding box. The cause is the same as above.

To Reproduce Steps to reproduce the behavior:

  1. Run the ETS against https://ri.ldproxy.net/daraa for 10 collections.
  2. Open test report.
  3. Search for FAIL

Expected behavior No failed tests should be reported.

Screenshots n/a

Additional context n/a

dstenger commented 1 year ago

Thank you for reporting.

I am able to reproduce the error and, indeed, there seems to be a floating point issue.