2

Using ArcGIS 10.3, I am working with a shapefile with millions of small polygons. I am using python to assign buffer widths to each polygon as an attribute. The buffer widths vary, and some polygons are assigned a buffer width of 0. This presents two issues when I use the buffer tool:

  1. Polygons assigned a width of 0 receive Warning 000636, because the buffer tool assigns them a null geometry. The sheer volume of these warning messages results in a crash if using the python interpreter in ArcMap (useful for code demonstrations).
  2. The polygons themselves are excluded from the final output.

I still need the excluded polygons in the buffer output. I would also prefer not to return a few thousand warnings. For now, my workaround is to assign a buffer width of 0.001 instead of 0. Can anyone give me a better workaround for this issue?

Note: I have found ArcGIS Buffer tool leaves out zero width buffers? that addresses this issue, but the answer does not provide the guidance I am looking for.

2 Answers 2

5

As it says in the documentation that the other question quotes: the buffer tool does not work that way.

The work-around would be:

  1. Export the features that you don't want to buffer to a separate feature class.
  2. Buffer only the features that have valid buffer distances. You could first run a Select and export them to their own feature class. Then, buffer that dataset.
  3. Merge those two results.
2

Another option:

  1. Select by attributes (buffer > 0)
  2. Run the buffer tool (will only run on the selection)
  3. Switch the selection and append to the buffer output (use 'switch selection' or select by attributes (buffer = 0).
3
  • Jbalk - I really like this answer, I didn't know that you could selectively buffer polygons in a shapefile. This actually opens up some very interesting possibilities. It works well in combination with Tom's answer: if you are averse to creating a new feature layer (which would be required to use your selection method in arcpy), Tom's method works well; if memory isn't a restriction, your method may be more streamlined. Thank you!
    – Matt
    Commented Nov 11, 2016 at 21:13
  • Hi Chris. I'm glad you got something out of it. For your info - if you have a selection on your feature class, geoprocessing tools in ArcGIS will only run on the selected features. If you find my answer useful could you please upvote it? Thanks.
    – jbalk
    Commented Nov 14, 2016 at 3:48
  • I like your answer better than my own.
    – Tom
    Commented Jun 3, 2019 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.