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

validate rounded numeric values #111

Closed
claeis opened this issue Jun 1, 2018 · 5 comments
Closed

validate rounded numeric values #111

claeis opened this issue Jun 1, 2018 · 5 comments
Assignees

Comments

@claeis
Copy link
Owner

claeis commented Jun 1, 2018

Round the value as read from the XTF to the accuracy as defined by the ili model and then validate against that rounded value.

renato1987 added a commit to claeis/iox-ili that referenced this issue Jun 5, 2018
- added separate test class for numeric
- added test class to test the numericRounding methode
@beistehen
Copy link
Contributor

This new behaviour may lead to duplicate coord errors which actually do not exist in the data.

It was my understanding that the precision of coordinates in ILI2 is not restricted. So a coordinate like

<C1>2721816.3638999984</C1>

was considered VALID against a definition of

2460000.000 .. 2870000.000
(precision = 3)

From my point of view, the precision should be enforced with the input data. So the sending application is responsible to avoid duplicate coords and deliver coordinates with the precision defined in the model.

Please reopen to further discuss this topic.
Stefan

@claeis
Copy link
Owner Author

claeis commented Jul 2, 2018

It is valid to encode numeric values with additional precision. (Because of extended models). Nevertheless the data must still be valid against the base definition/model. Therefore the encoded value is rounded and then then this rounded value is validated.

@beistehen
Copy link
Contributor

Ok, I understand the mechanism with base definitions and your explanation makes sense.

So I suggest that when ilivalidator reports duplicate coord errors, the coordinates of the error location should be reported with the original precision of the input data and not with the rounded precision (as it is done now with ilivalidator v1.9.0). Getting the error location with the orginial precision helps localise the error in the data visually (using a GIS) and textually (in the xtf file). The rounded coordinates do not show up in the original data and are therefore less usefull.

@claeis
Copy link
Owner Author

claeis commented Jul 5, 2018

Would be nice, but big effort (because the rounding and some of the validations (e.g. uniqueness checks) are in very different code locations)

@edigonzales
Copy link
Contributor

While upgrading our web service to v1.9.2 I run into some problems with this new behaviour. When dealing with "Einlenker" of streets that are segmentized and you just copy/paste them from cadastral surveying shapefile (or similar) to e.g. land use planning, you just end up with these "duplicate duplicate coord at" errors.

This will lead to misshapen "Einlenker" when you have to delete some of the vertices. And I fear this will be very hard to communicate as a whole...

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

No branches or pull requests

4 participants