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 Answer 1

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','#')
2
  • 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
    Commented Sep 2, 2016 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
    Commented Sep 2, 2016 at 15:59

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.