Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gmlas.d.11: Validate geometries (2) fails for Building 3D GML #161

Open
JohannaOtt opened this issue Apr 24, 2018 · 9 comments
Open

gmlas.d.11: Validate geometries (2) fails for Building 3D GML #161

JohannaOtt opened this issue Apr 24, 2018 · 9 comments

Comments

@JohannaOtt
Copy link

I tested an INSPIRE Buildings 3D GML dataset and got this error on gmlas.d.11: "System error in the Executable Test Suite. Please contact a system administrator. Error information:
[err:XPTY0004] Cannot return item()* as node(): ((db:open-pre("etf-tdb-89ce6cd7-....
(67/33)"
The link to the failed test is: http://inspire-sandbox.jrc.ec.europa.eu/etf-webapp//v2/TestRuns/EID0416b1cb-e2d0-4f62-ba48-31fc83890b55.html?lang=en#EIDd414305c-a7be-4ffe-947d-3ea845a4276d
In case you need the dataset to investigate, please send me an email address where I can send the GML file to.

@robsgnao
Copy link

Hello,
thanks for sharing the link, will have a look at it asap; current deployment at JRC has a limitation on the size of uploaded files, I have the impression from the error code that this may be the reason.
Can you please share with us the GML file, or the link to it?
Thanks.

@JohannaOtt
Copy link
Author

Hello,
the test is executed when using a smaller GML file (containing 3 buildings, I sent it to [email protected] and hope it is going to reach you this way) - thank you for the advice.

Unfortunately the validator now returns an error concerning the srsDimension on the LinearRings ("XML document 'testExport_small.gml', Building 'Building_DETHL56P00003jxG': The feature geometry is not a valid GML geometry: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring
XML document 'testExport_small.gml', Building 'Building_DETHL56P00003k6U': The feature geometry is not a valid GML geometry: Error in XML document (line: 6, column: 248, character offset: 1300): Cannot parse 'gml:posList': contains 15 values, but coordinate dimension is 2. This does not match.
XML document 'testExport_small.gml', Building 'Building_DENW19AL0000dlkx': The feature geometry is not a valid GML geometry: Error in XML document (line: 4, column: 1641, character offset: 2646): Cannot parse 'gml:posList': contains 111 values, but coordinate dimension is 2. This does not match.").

In the GML file, there is a srsDimension of 3 at the level of the MultiSurface that contains the concerned LinearRings, but this information seems not to be taken into account when validating the LinearRings. Is that expected?

@cportele
Copy link
Collaborator

cportele commented May 5, 2018

@JohannaOtt - to make the small test file available, either attach it to a comment (just drag an drop the file to the comment) or send it to a non-github email (e.g. [email protected]). Thanks!

@cportele
Copy link
Collaborator

cportele commented May 7, 2018

Thanks for the sample document. A general issue is that the srsName attribute states that the coordinate reference system is ETRS89 lat/long (a Geographic 2D CRS) while the (not normative) srsDimension attribute says the dimension is 3. The coordinates in the geometries mostly seem to be 3D (but see below). I.e., the CRS declaration seems to be incorrect.

On the three reported errors:

XML document 'testExport_small.gml', Building 'Building_DETHL56P00003jxG': The feature geometry is not a valid GML geometry: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring

This error is not clear to me. It may be the case that the underlying geometry library is not able to handle 3D rings.

XML document 'testExport_small.gml', Building 'Building_DETHL56P00003k6U': The feature geometry is not a valid GML geometry: Error in XML document (line: 6, column: 248, character offset: 1300): Cannot parse 'gml:posList': contains 15 values, but coordinate dimension is 2. This does not match.

Since the CRS is declared as a 2D CRS this message is correct.

However, even if I replace the CRS declaration and use http://www.opengis.net/def/crs/EPSG/0/7409 (which may be the correct CRS assuming the elevation is in EVRF), the error message is the same. This may be related to #51 and https://github.com/etf-validator/etf-gmlgeox/issues/19. I will check this.

XML document 'testExport_small.gml', Building 'Building_DENW19AL0000dlkx': The feature geometry is not a valid GML geometry: Error in XML document (line: 4, column: 1641, character offset: 2646): Cannot parse 'gml:posList': contains 111 values, but coordinate dimension is 2. This does not match.

Some of the geometries contain strange position lists that seem to be neither 2D or 3D coordinates: 51.69294046740865 8.879992259177829 4.434772336235498 4.499922260151334 0.0015476999193630699 51.39410408540394 51.69293247009222 8.879997213831695 4.434774835456967 4.499922415729554 0.0015475999384063058 .... Maybe an issue in the generation of the coordinates?

@jonherrmann
Copy link
Collaborator

@robsgnao could you please check if the file 'testquery.xq' changed in commit 643d300 is up to date?

@robsgnao
Copy link

robsgnao commented May 7, 2018

Yes, 'testquery.xq' is up to date on JRC deployment.

@cportele
Copy link
Collaborator

cportele commented May 8, 2018

We have created two issues in the GmlGeoX repository to address this:

@JohannaOtt
Copy link
Author

@cportele thanks for investigating and creating the new tickets - and also for the hint concerning the geometries with the strange position lists. I will have a look into how they are generated.

josemasensio added a commit that referenced this issue Nov 21, 2019
Add support for new schemaLocation links on MD 1.3
Corresponding community issue: #161
@MalcolmCoull
Copy link

Hi everybody
Not sure if it's allowed to add to this rather than create a new ticket (and I appreciate that this is still flagged as 'Open') but I've been revisiting some INSPIRE conversions this week and have been getting the same/similar error to @JohannaOtt. I'm working with the Soils Theme, trying to convert from OSGB using FME. I have a workbench which reprojects the data, does some attributed management, converts polygons to multisurfaces and writes out to GML.
About a week ago I 'successfully' wrote out a file which passed all of the validations at https://inspire.ec.europa.eu/validator/ but which was in completely the wrong place. After adjusting a few parameters it is now correctly located but when I try and validate I get a combination of ''gml:posList': contains X values, but coordinate dimension is 2. This does not match.' and The feature geometry is not a valid GML geometry: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring'. I have GeometryValidators (for those who use FME) after every stage of the process and none of them report any errors during translation, and I have tried every combination of projection options available in FME and they all give an output with these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants