top of page

Buffering

The Python script creates a 15,000-meter buffer around features in the airports.shp feature class classified as an airport (based on the FEATURE field ) and a 7,500-meter buffer around features classified as a seaplane base. The results is two separate feature classes, one for each airport type.

# Ehsan Momeni

from arcpy import env, da, AddFieldDelimiters, Buffer_analysis, DeleteFeatures_management, ValidateFieldName, \
     ListFields, Select_analysis, AddField_management

env.workspace = r"C:\Users\emomeni\"  # workspace
env.overwriteOutput = True   # overwriting outputs

fc = "airports.shp"  #input feature class
filed = "NAME"  # target field

outfc_selection = fc[:-4] + "_airport.shp"  # temporary feature name to save selections


where_clause = '"FEATURE" = \'Airport\''  # where clause condition
Select_analysis(fc, outfc_selection, where_clause)  # saving selected features as a new file
outfc_buffer = outfc_selection[:-4] + "_15000Buffer.shp"  # Output name
Buffer_distnce = "15000 Meter"  # buffer distance
Buffer_analysis (outfc_selection, outfc_buffer, Buffer_distnce)  # buffering


outfc_selection = fc[:-4] + "_SeaplaneBase.shp"  # temporary feature name to save selections
where_clause = '"FEATURE" = \'Seaplane Base\''  # where clause condition
Select_analysis(fc, outfc_selection, where_clause)  # saving selected features as a new file
outfc_buffer = outfc_selection[:-4] + "_7500Buffer.shp"  # Output name
Buffer_distnce = "7500 Meter"  # buffer distance
Buffer_analysis (outfc_selection, outfc_buffer, Buffer_distnce)  # buffering

google_scholar1-300x150.png
ResearchGate.png
Ehsan Momeni ORCID GIS Remote Sensing Ur
Ehsan Momeni LinkedIn GIS Remote Sensing
ncbi-300x150.png
academia.png

(Information on this website may not be up to date)

bottom of page