I am trying to create a tool in python that can potentially find areas of wind turbines by county. I have the correct process down, but in some counties there are parameters that don't exist. So for example I take into account airports, hydrology, slope, roads, urban areas, and more. But what if an area does not have that parameter ie. no military zones in some counties. But I have a code that requires the military area. Is there a way to use the tool so that it can ignore certain parameters when there is no data? Below is the piece of code that is giving me issues. I would still like to use this code, but I need it to work when there is no data in some of the shape files. I feel there is a way to do this without having to write a ton of if-then blocks.
Thanks in advance!
arcpy.analysis.Union([Airports, Native, Parks, BufRail, Urban, BufRoads, Forests, Military, BufStreams, BufWaterBodies], Workings+"Avoid.shp", "ALL", None, "GAPS")