-
Notifications
You must be signed in to change notification settings - Fork 19
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
SRS dimension not detected in gml:posList #214
Comments
This problem is fixed in GmlGeoX version 2, which is under development. You can use this version as soon as it is released. Since this is a new major release, the interface has changed and you need to update the ETSs that used it. |
Also note that the data is simply incorrect. It contains geometries that declare http://www.opengis.net/def/crs/EPSG/0/4258 as the CRS, but then have elevation values (and state
Since srsDimension attributes are optional and hints only, this would not be a fix. Tools are free to ignore the srsDimension values. |
Of course, you are right that the dataset is incorrect. However, as far as we have found, deegree doesn't care about the coherence between the The validation should fail, but what was strange was that this issue escalated directly form deegree and provoked a memory leak. We are working on a hotfix to, at least, prevent the appereance of the exception, at least until you are able to release the new version of A question related to the release of the module is, what is the extent of the changes and how they will affect the ETSs that rely on GML validation? |
We will update etf-validator/governance#57 to include that information for review in the coming weeks. |
We have included a workaround for this issue on the class GeometryElementHandler . Inside the method String dimension = element.attributeValue("srsDimension");
String originalElement = element.asXML();
originalElement.replace("<gml:posList>", "<gml:posList srsDimension=\""+dimension+"\">");
SAXReader modifiedReader = new SAXReader();
org.dom4j.Document modifiedDocument = modifiedReader.read(originalElement);
Element modifiedElement = modifiedDocument.getRootElement(); All validations are executed on the |
If I understand the snippet correctly, this may work for the specific file, but
would lead to invalid XML as dimension is |
We made a modification to check the existence of the dimension before adding the attribute. We also included this on SecondaryGeometryElementHandler Element modifiedElement = element;
String dimension = element.attributeValue("srsDimension");
if (!(dimension == null)) {
String originalElement = element.asXML();
String modifiedXML =originalElement.replace("<gml:posList>", "<gml:posList srsDimension=\""+dimension+"\">");
SAXReader modifiedReader = new SAXReader();
org.dom4j.Document modifiedDocument = modifiedReader.read(new InputSource( new StringReader( modifiedXML ) ));
modifiedElement = modifiedDocument.getRootElement();
} |
Description
During the execution of the TestSuites of Interoperable data sets in GML (Guidelines for the Encoding of Spatial Data version 3.3), we found that certain GML file were causing the INSPIRE validator to crash. After some debugging, we found that this exceptions appearead all along the GML validation. Log attached
etf-issue.zip
Whenever this happened, the JVM started to accumulate memory and the TestRun thread would consume all the resources available in the machine until the application crashed.
After investigating the problem, we found this issues related to this problem
inspire-eu-validation/ets-repository#161
https://github.com/etf-validator/etf-gmlgeox/issues/19
We added the srsDimension and srsName to all the gml:posList attributes and the validation went fine. We are adding on the problematic files and the modified file for comparison.
US_govser_testDataINSPIREvalidator.gml.zip
CORRECTED-US_govser_testDataINSPIREvalidator.gml.zip
Could the memory overload caused by the deegree exception? And if so, what would be the best approach to fix this? Add an early detection of a missing srsDimension attribute?
Operating systems and browser
This is happening in a Docker container with Debian 8, inside an Amazon Linux EC2 instance.
Steps to Reproduce
Expected behavior:
Test report correctly generated after parsing geometry.
Actual behavior:
TestRun thread gets stuck and doesn't free any resource
The text was updated successfully, but these errors were encountered: