Skip to main content
Question

How to pass features to GeometryValidator in loop


Forum|alt.badge.img
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

 

5 replies

david_r
Evangelist
  • March 5, 2014
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

Forum|alt.badge.img
  • Author
  • March 5, 2014
Thank you David! Can you suggest such mechanism to exit the loop?

david_r
Evangelist
  • March 5, 2014
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

Forum|alt.badge.img
  • Author
  • March 5, 2014
Thank you for your help! This is perfect!

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 5, 2014
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.:)

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings