opengeospatial / ets-wfs20

Executable Test Suite for WFS 2.0
Other
8 stars 11 forks source link

Problem with Curve geometry with srsName in HTTP URI format #180

Open calhanson opened 3 years ago

calhanson commented 3 years ago

Hi!

After issue #170 has been solved we have been able to run the tests locally (the online INSPIRE validator skips the Spatial Filter - BBOX tests for unknown reason) and the Spatial Filter tests now passes for both Curve and Surface geometry types. However, when testing a service with srsName in HTTP URI format the tests fails for Curve geometries with error:

Test: org.opengis.cite.iso19142.basic.filter.spatial.BBOXTests.bboxWithDefaultExtent

Error: Failed to create JTS geometry from GML geometry: [MultiCurveType] id:geometry.RoadLink.SAMPLE_tn-ro_RoadLink_1 Cause: Illegal argument: ‘code’=http://www.opengis.net/def/crs/EPSG/0/3034

After some debugging it looks like a MultiCurve element created has an srsName attribute as do the aggregated Curve element, one of these is updated with a value in to urn format (in the Extents.calculateEnvelope method). The lingering HTTP URI breaks the conversion to a JTS geometry.

Geometry type Surface does not seem to have this problem. Perhaps because of a new Polygon element being created, without an explicit srsName, and then added to a MultiSurface with the only srsName attribute in the combined geometry?!

The tested service is available here: http://192.71.92.21/MapService/wfs.axd/InspireTest?service=WFS&version=2.0.0&request=GetCapabilities

Please verify that the service is currently using the HTTP URI format for srsName: http://192.71.92.21/MapService/wfs.axd/InspireTest?service=WFS&version=2.0.0&request=GetFeature&typenames=RoadLink

Regards

dstenger commented 3 years ago

Thank you for reporting.

@keshav-nangare Can you please analyse this issue?

keshavnangare commented 3 years ago

The fix should be added in the geomatics-geotk repository as the GmlUtils.convertToMultiType(geomNode) method belonging to this repo.

Created the issue in geomatics-geotk repo: https://github.com/opengeospatial/geomatics-geotk/issues/6