Hello I am looking to implement these rules within my data:
eliminating:
1) polygons less than 1m2
2) polygons less than 1m in width
3)duplicate vertices less than 1m apart
any help is appreciated.
thanks,
Curtis
Question
Hello I am looking to implement these rules within my data:
eliminating:
1) polygons less than 1m2
2) polygons less than 1m in width
3)duplicate vertices less than 1m apart
any help is appreciated.
thanks,
Curtis
Rule 2 is one of those ones that to a human, is really easy, but to a computer is kinda hard. We can look at a polygon and instantly pick its long/short axis, not so easy for a computer. The best way to do something like this is to use the CircularityCalculator. This essentially looks at the ratio of the area to the perimeter of a shape.
I've attached an example. In that you can see the more 'circular' the feature is, the closer its circularity 'score' is to 1, as it get stretched (a long and narrow rectangle) the closer the score gets to 0
Concerning Rule 2: for polygons that are more or less rectangular you can approximate the width with a formula based on Area and Perimeter (which is called Length in FME):
Rule 2 is one of those ones that to a human, is really easy, but to a computer is kinda hard. We can look at a polygon and instantly pick its long/short axis, not so easy for a computer. The best way to do something like this is to use the CircularityCalculator. This essentially looks at the ratio of the area to the perimeter of a shape.
I've attached an example. In that you can see the more 'circular' the feature is, the closer its circularity 'score' is to 1, as it get stretched (a long and narrow rectangle) the closer the score gets to 0
thanks soo much for the answer. I have Rule 1 and 3 running ok now. it is much appreciated!! For Rule 2: how would I connect my data to run through this workflow ? as when I connect incoming data to all the bufferers it duplicates all my data in the CirclarityCalculator outcome?? thanks again
Concerning Rule 2: for polygons that are more or less rectangular you can approximate the width with a formula based on Area and Perimeter (which is called Length in FME):
This might help with no2: In the GeometryValidator there is a setting to remove vertices within a given distance. If you set this to 1m the polygons with shorter sides would be output via the repaired stream.
Concerning Rule 2: for polygons that are more or less rectangular you can approximate the width with a formula based on Area and Perimeter (which is called Length in FME):
This might help with no2: In the GeometryValidator there is a setting to remove vertices within a given distance. If you set this to 1m the polygons with shorter sides would be output via the repaired stream.
which issue to detect in Geometry Validator are you refering to? I see duplicate consecutive points ? I tried setting that to 1. Or was there another detector ? thanks
With this formula you can select the polygons to remove because of rule 2.
Something like this (continue to the Generalizer, as mentioned by hkingsbury):
thanks. Yes I have both of those formulas working . I was just curious as to how i can implement the CirclarityCalculator? to weed out the different types of shapes which are less than 1m in width
thanks soo much for the answer. I have Rule 1 and 3 running ok now. it is much appreciated!! For Rule 2: how would I connect my data to run through this workflow ? as when I connect incoming data to all the bufferers it duplicates all my data in the CirclarityCalculator outcome?? thanks again
How do you mean duplicates? The features you input into the circularitycalculator are output with a new attribute containing the circularity score
thanks soo much for the answer. I have Rule 1 and 3 running ok now. it is much appreciated!! For Rule 2: how would I connect my data to run through this workflow ? as when I connect incoming data to all the bufferers it duplicates all my data in the CirclarityCalculator outcome?? thanks again
Yes I understand that, but how would I connect the circularity score to my data to find different types of shapes which are under 1m width in size? I think a tester would work based with a similar formula shown below?
thanks soo much for the answer. I have Rule 1 and 3 running ok now. it is much appreciated!! For Rule 2: how would I connect my data to run through this workflow ? as when I connect incoming data to all the bufferers it duplicates all my data in the CirclarityCalculator outcome?? thanks again
Yes, you'd use a tester to filter out results with a low circularity score. I'd usually combine it also with a check on the area. Ie if it has a small area and a low circularity score, then its likely a slither polygon
With this formula you can select the polygons to remove because of rule 2.
Something like this (continue to the Generalizer, as mentioned by hkingsbury):
Maybe it helps to first use the CircularityCalculator, and next remove polygons with a small width that are not circular. Or maybe the circles have an attribute that you can use to exclude them from filtering. Or maybe a totally different approach.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.