Skip to main content
I have notice that some features have to go through the GeometryValidator more than one time to be completely repaired from topological errors. I thin this happen when a feature have more than one error, but I am not sure if it is the only reason.

 

 

Is there a way to pass features in the GeometryValidator in loop until they are clean? I use to put 2 or 3 GeometryValidator in queue to do the job, but sometimes it is not enough and it is not really neat in the workspace.

 

 

Thanks a lot

 

 

-Max Demars

 

Hi,

 

 

yes, this is possible using a looping custom transformer. 

 

 

 

 

However, be very careful as you might encounter geometries that won't repair properly, leading to an infinite loop if you don't provide for some exit mechanism after a number of loops.

 

 

David
Thank you David! Can you suggest such mechanism to exit the loop?
Hi,

 

 

one solution could be to use a Counter with the Name set to the primary key attribute (I used the OBJECTID in the example below), so that you get a loop count for each attribute:

 

 

 

 

You can then test this loop counter before you decide to loop it once again. (A nice addition could be to use a published parameter for the loop count limit)

 

 

David
Thank you for your help! This is perfect!
Very elegantly done! I actually didn't realize that several passes via the validator will have any effect! Good to know! Now just wrap it up in a costumer transformer to share with the rest.:)

Reply