In the picture below you can see a polygon layer, representing steep slopes, extracted from a TIN. The polygons have a lot of spikes in them. I would like to remove these spikes while the rest of the borders stay on the exact same location. I would like to do this in a Python script, using arcpy or Python functions.
Further info: ArcGIS 10.0, Python 2.6.5, polygon layer is in a GDB
picture
-
3I'm not sure you are going to find an automated method for fixing your spikes. The problem is, how do you distinguish between sharp angles inside polygons vs outside? Or how do you tell your software what is a spike vs nonspike? And since you don't want the rest of the polygon to move/change, that limits what tools will work. That's a tough one.Baltok– Baltok2013年02月19日 15:54:41 +00:00Commented Feb 19, 2013 at 15:54
-
What spatial extent are you working with? Would you be willing to manually edit your vector data (if feasible)?Aaron– Aaron ♦2013年02月19日 20:40:43 +00:00Commented Feb 19, 2013 at 20:40
-
1If you can get access to FME, the SpikeRemover tool can do what you're after. Not really the solution you asked for, but it'd be quick.Fezter– Fezter2013年02月20日 05:06:46 +00:00Commented Feb 20, 2013 at 5:06
-
@Baltok thanks for your answer. Nothing is impossible is it?;) I agree that it's a tough one...Vincent Udo– Vincent Udo2013年02月20日 08:58:24 +00:00Commented Feb 20, 2013 at 8:58
-
@Aaron The spatial extent is too big to do this by hand. Have to do this for a big part of The Netherlands.Vincent Udo– Vincent Udo2013年02月20日 08:59:58 +00:00Commented Feb 20, 2013 at 8:59
2 Answers 2
I suggest playing around with the Simplify Polygon tool (first) or the Smooth Polygon tool (second), to see how well they meet your requirement that "the rest of the border stay on the exact same location".
-
Thanks for the answer! Unfortunately both simplify and smooth don't give the result I'm looking for.Vincent Udo– Vincent Udo2013年02月19日 15:03:56 +00:00Commented Feb 19, 2013 at 15:03
-
Hi Vincent -- can you give some more info about how the result deviates from your requirement? That could help us figure out whether some parameter adjustments might give some acceptable output, or whether a different solution altogether would be better.andytilia– andytilia2013年02月19日 19:33:31 +00:00Commented Feb 19, 2013 at 19:33
-
I have to use the polygons to select lines that are on the borders of the polygons, but I don't want to select the lines intersecting the spikes. Simplify and Smooth alter the borders, which makes it impossible to select the right lines. The lines are used to build the TIN, so they are on the exact same location as the borders of the polygon.Vincent Udo– Vincent Udo2013年02月20日 07:54:34 +00:00Commented Feb 20, 2013 at 7:54
From your image i can say this approach will help you.
The procedure is simple
First Buffer the original layer with some reasonable distance.
Then perform inverse buffer with same distance on the result of step one.
After this clip you original layer with the result of step 2.
you may need to perform simplification on you final layer.
hope that will help you.
-
Thanks for your answer. Unfortunately this method doesn't have the result I'm looking for. It fills the gaps between the spikes and the slopes. I would like to find a way to remove the spikes by removing the vertex in the point of the spike.Vincent Udo– Vincent Udo2013年02月20日 15:07:05 +00:00Commented Feb 20, 2013 at 15:07