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")
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.