kill the extra vertices in a polygon FC

3623
8
Jump to solution
10-24-2014 05:04 PM
forestknutsen1
MVP Regular Contributor

I have a polygon FC with approximately 600,000 polygons. The problem is that polygons have extra unneeded vertices on straight line segments. In one case I counted 23 vertices where 4 would do. 19 * 600,000  =  11,400,000 extra vertices to draw; causing a lot of drag on the users of the data. What is the best way to remove the extra vertices on the straight line segments with out changing a single feature. Please keep in mind that I would like to avoid finding the smallest straight line segment (but I guess I could).

 

Thanks for any input,

 

Forest

Reply
0 Kudos
1 Solution

Accepted Solutions
forestknutsen1
MVP Regular Contributor

Dan  thanks for taking the time to reply. I am aware of the options in the tool. That is why I said this in my original post:

Please keep in mind that I would like to avoid finding the smallest straight line segment (but I guess I could).

But I did not know about the Douglas–Peucker algorithm - thanks for that.

Also I am 99% confident my smallest straight line segment will be smaller then max distance between vertices that I wish to target for removal. I think what I am going to try is:

1) Running the tool aggressively

2) Run the erase tool on the input and output to identify areas that got altered.

3) Fix by hand the problems

View solution in original post

Reply
0 Kudos
8 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Simplify Polygons in the Cartography toolbox if you have the appropriate licence ... never used it search online help for simplify polygons

Reply
0 Kudos
forestknutsen1
MVP Regular Contributor

Dan thank for the suggestion.

Yes, I am aware of that tool. I have used it in the past for operations where my final output was graphical only. My concern with it is that in may alter some of the polygons shape. This is not going to be ok in this case. If I could be 100% positive that all shapes would be preserved and that all extra vertices would be removed I would run it. . .

I don't know maybe the thing to do is turn them into polylines and then try to kill them and then go back to polygons.

Reply
0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

check the options, one of them appeared to be point thinning only

Reply
0 Kudos
forestknutsen1
MVP Regular Contributor

Capture.PNG

Ya, but no. It looks to me that it can change the shape of the polygon. Take a look at this screenshot from the esri docs. I was thinking that esri would have a pre-made tool for this operation. but maybe not. I think I may have to strip the FC down to lines/points and/or attack it with python.

Reply
0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

OK the picture is overexaggerated for dramatic affect...look at the options, for example

The tolerance that determines the degree of simplification. A tolerance must be specified, and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.

  • For POINT_REMOVE algorithm, the tolerance you specify is the maximum allowable offset.

This is apparently using the Douglas-Peuker thinning algorithm.  Regardless of what you want to roll out on your own, you are going to be looking for an offset distance between 3 points or to determine a 3 point angle, keeping only those points that are within a tolerance.  I would experiment keeping in mind the interpoint spacing that you have in your data set.  For example if you have a line that is 100 meters long and 10 equally spaced extra points between the start and end point.  What do you want to preserve? an offset distance of 10cm? 1 cm? 1 mm?  or an angular range of 179-181? 179.5-180.5? 179.99-180.01? (with 180 being straight.  There has got to be some point that you get to say enough, so I would experiment before you end up reinventing the wheel.

Good luck...I would be interesting if you provide some before and after samples of your efforts on a copy...of course.

Reply
0 Kudos
forestknutsen1
MVP Regular Contributor

Dan  thanks for taking the time to reply. I am aware of the options in the tool. That is why I said this in my original post:

Please keep in mind that I would like to avoid finding the smallest straight line segment (but I guess I could).

But I did not know about the Douglas–Peucker algorithm - thanks for that.

Also I am 99% confident my smallest straight line segment will be smaller then max distance between vertices that I wish to target for removal. I think what I am going to try is:

1) Running the tool aggressively

2) Run the erase tool on the input and output to identify areas that got altered.

3) Fix by hand the problems

View solution in original post

Reply
0 Kudos
EduardoAbreu-Freire
New Contributor III

forest knutsen‌ following up the problem you faced here with vertices, could you find a geoprocessing/automation/scripts/pipelines solution to reduce polygons vertices without really change their original shape?

If yes, then to keep feature class topology regarding contiguous polygons, which tools did you use when process is removing shared vertices on polygon limits?

Thank you in advance,

simplify polygon‌

editing vertices‌

#collinear

Reply
0 Kudos
forestknutsen1
MVP Regular Contributor

Hi Eduardo, This was quite some time ago. But as I recall I did end up using Simplify Polygons in the Cartography toolbox

Then I erased the original FC with the new output. I think there was a hand full of polygons that I had to go back and edit by hand. But overall it worked well. I was working with PLSS sections. They are basically square shapes with no gaps or overlaps. My data was not in a formal esri topology. 

Section (United States land surveying) - Wikipedia 

Okay, I hope that helps a little bit. Good luck!