Skip to main content

Hi I am using a GeometryValidator with custom set of vaidators (see attached).

I have tried using an intersector, generalizer before GeometryValidator to repair the geometry errors. Unfortunately, in a lot of cases, the auto repair by GeometryValidator isn't correct. It is removing the geometry completely.

Most of the geometry errors are either self intersection, or there is Duplicate Consecutive Points (see attached examples)

Any suggestion how to best approach this and correct the geometry in these cases?

 

Generalizer could help you better if you play with tolerance values.

In case your line geometries are too variable in length, you can use a dynamic value to calculate the tolerance base on the length of each line. Something like "@Length()*0.05" refers a percentage of the line length, in this case 5%.

You may want to use the Generalizer after a first GeometryValidator so you only generalize problematic lines before a second GeometryValidator.


Reply