import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" env.overwriteOutput = True county = "Counties" hospitals = "Hospitals" # Create feature layers for the selection arcpy.MakeFeatureLayer_management(county, "county_FL", "POP2000 > 999999") arcpy.MakeFeatureLayer_management(hospitals, "hospitals_FL") # Find all hospitals within counties with a population >= 1,000,000 arcpy.SelectLayerByLocation_management("hospitals_FL", "INTERSECT", "county_FL") # Create a feature class from the selection arcpy.CopyFeatures_management("hospitals_FL", "hospitals_selection")
import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" env.overwriteOutput = True county = "Counties" hospitals = "Hospitals" # Create feature layers for the selection arcpy.MakeFeatureLayer_management(county, "county_FL", "POP2000 > 999999") arcpy.MakeFeatureLayer_management("county_FL", "county_FL2", "NAME = 'CHESTER'") arcpy.MakeFeatureLayer_management(hospitals, "hospitals_FL") # Find all hospitals within counties with a population >= 1,000,000 arcpy.SelectLayerByLocation_management("hospitals_FL", "INTERSECT", "county_FL2") # Create a feature class from the selection arcpy.CopyFeatures_management("hospitals_FL", "hospitals_selection")
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.