0

I have posted my script for buffering and dissolving polygons.

Could someone help me incorporate an Erase function in order to erase the input file from the buffer?

Script:

import arcpy

infc = r'C:\My\File\Input.shp.shp'
outfc = r'C:\My\File\Output.shp'
bufferDistance = 76.2

arcpy.Buffer_analysis(infc, outfc, bufferDistance, "", "", "ALL")
1

If you have an Advanced License of ArcGIS you could use the Erase function after buffering the infc:

arcpy.Erase_analysis(infc, outfc, r'C:\My\File\EraseOutput.shp','#')
  • In case anyone does not have an Advanced license, you can accomplish the same thing by doing a union and keeping only desired features. – crmackey Sep 2 '16 at 15:20
  • Thank you for this information. Is there a way that this function could be incorporated into the script so that only one polygon is being processed? I understand that I could erase the output file once it is buffered, but I was hoping there was a way to make it more streamlined. – UpNorthGIS Sep 2 '16 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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