In the attached example, all the outlines are polylines. Is there a reliable method for performing this filtering that I can apply to a much larger set of data? parcel samples.gh (11.6 KB)
Not from the sample data in your GH file since data has been lost. Where are the red and black colors in your image? That’s the file we need, is it a Rhino file? Are the colors on separate layers?
The polylines are internalised within the curve component in the attached Grasshopper file. No Rhino file is needed for testing, and the colors are only for explanatory purposes. I can’t share the entire dataset, so I’ve attached only a small portion of the data. Thanks.
Thanks for trying, Joseph. All the polylines are in the same layer, so I have to filter them based solely on the geometrical information of the outlines. I was able to filter out probably more than 95% using proportions of the angled bounding box of a few curve segments in the primary direction of outlines. Additionally, I used the area/length ratio to eliminate long and narrow outlines. I wanted to achieve close to a 100% filter rate, so I was curious if there were better ideas to enhance the filtering process. This small data set was problematic in my filtering method.
You are probably right. I’m still wondering if there’s a way to determine whether the outlines have long and narrow portions that account for more than 30% of the total outline length.
don’t know how complex your data set is, maybe one more weapon you could add to the filtering-arsenal might be the plugin Fennec, expecially the Region component (here I exploded and jittered the curves just to show its versatility: after explode-flaten-jitter those are just a bunch of curves -even overlapping ones- on a plane)
Here is something that works in this particular case. Length of perimeter divided by square root of area. The ‘L/A ratio’ slider (blue group) filters surface fragments using Dispatch.
The square root did the trick! I had exactly the same filtering process, except for the square root, but it didn’t work well. After adding the square root, I can now filter out long and narrow outlines almost 100%. I still need to visually check the entire data set, but it’s very promising. I might be able to use this as a single filtering method instead of combining the two filtering methods I currently have. Thanks very much for your help.