from MFII_Arcpy import path_links, get_path, geotools import os print("erase wirecenters from LTE5Coverage") erasewirecenters = geotools.Tools() erasewirecenters.outputPathFolder = path_links.inputbasepath erasewirecenters.outputGDBName = path_links.coverage_minus_subsidy_gdb_name erasewirecenters.create_gdb() erasewirecenters.outputGDB = os.path.join(erasewirecenters.outputPathFolder, erasewirecenters.outputGDBName+".gdb") erasewirecenters.erase_wireCenter_subsidy(wirecenterEnv=os.path.join(path_links.inputbasepath, path_links.wirecenter_splits_gdb_name+".gdb"), LTE5CoverageEnv=os.path.join(path_links.inputbasepath, path_links._06_gdb_name+ ".gdb"), lte5_table_folder_path=path_links.inputbasepath) print("erase MFI Coverages") MFi = geotools.Tools() MFi.outputPathFolder = path_links.inputbasepath MFi.outputGDBName =path_links.mfi_blocks_erased_gdb_name MFi.create_gdb() MFi.inputGDB =erasewirecenters.outputGDB MFi.outputGDB = os.path.join(MFi.outputPathFolder, MFi.outputGDBName+".gdb") MFi.erase_MFI_Blocks(lte_tableList_folder=path_links.inputbasepath)
from MFII_Arcpy import path_links, get_path, geotools import os # all of the end product will go in a input basefile path #import_state boundary to gdb (1) print("\n\n\t\t\timport_state boundary to gdb") state = geotools.Tools() state.outputPathFolder = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" state.inputPath = path_links.raw_state_boundary_path state.outputGDBName = path_links._01_gdb_name state.outputGDB = os.path.join(state.outputPathFolder, state.outputGDBName +".gdb") state.create_gdb() state.importShapefilesToGDB() #import LTE 5 (2) print("\n\n\t\t\tImport LTE5") LTE5Import = geotools.Tools() LTE5Import.outputPathFolder = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" LTE5Import.outputGDBName = path_links._02_gdb_name LTE5Import.outputGDB = os.path.join(LTE5Import.outputPathFolder, LTE5Import.outputGDBName +".gdb") LTE5Import.create_gdb() LTE5Import.inputPath = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\raw_propagations\refiled_propagation" LTE5Import.importShapefilesToGDB() #clip LTE 5 by states (3) print("\n\n\t\t\tclip LTE 5 by state") clipLTE = geotools.Tools() clipLTE.outputPathFolder = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" clipLTE.outputGDBName = path_links._03_gdb_name
import os from arcpy import Exists as arcpyExist from MFII_Arcpy import geotools, get_path, path_links wirecenterIntersect = geotools.Tools() wirecenterIntersect.outputPathFolder = path_links.inputbasepath wirecenterIntersect.outputGDBName = "_01_intersect_subsidy_with_Grid" wirecenterIntersect.create_gdb() wirecenterIntersect.outputGDB = os.path.join( wirecenterIntersect.outputPathFolder, wirecenterIntersect.outputGDBName + ".gdb") wirecenterSplitPath = get_path.pathFinder() LTE5Coverages_path = get_path.pathFinder() states = wirecenterSplitPath.make_fips_list() for fips in states: state_name = wirecenterSplitPath.query_state_name_by_fips( table_path=path_links.Fips_table_path, fips=fips) LTE5Coverages_path.env_0 = path_links.LTE5_diss_gdb_path + ".gdb" LTE5Coverages = LTE5Coverages_path.get_file_path_with_wildcard_from_gdb( "*_" + fips) print(LTE5Coverages) if len(LTE5Coverages) == 0: print("the coverage list was empty, passing this fips") else: intersectlist = [path_links.wireCenter_fc_path, LTE5Coverages[0]] outpath = os.path.join(wirecenterIntersect.outputGDB,
import os from MFII_Arcpy import geotools, get_path, path_links # 1------import_wirecenters to gdb import_wirecenters = geotools.Tools() import_wirecenters.name = "import_wirecenter" import_wirecenters.inputPath = path_links.wirecenter_vintages_path import_wirecenters.outputGDBName = path_links.wirecenter_vintages_name import_wirecenters.outputPathFolder = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" import_wirecenters.create_gdb() # 2---import shapefile to gdb import_wirecenters.outputGDB = os.path.join(path_links.inputbasepath, import_wirecenters.outputGDBName + ".gdb") import_wirecenters.import_shapefiles_to_gdb("*") # 3---merge the wirecenters output import_wirecenters.inputGDB = os.path.join(path_links.inputbasepath, import_wirecenters.outputGDBName + ".gdb") import_wirecenters.merge_feature_class("_merged_wirecenters") # 3---join subsidy table with merged_wirecenters right_table = path_links.subsidy_table_path left_table_object = get_path.pathFinder(env_0=os.path.join(path_links.inputbasepath, import_wirecenters.outputGDBName + ".gdb")) left_table_path = left_table_object.get_file_path_with_wildcard_from_gdb("_merged_wirecenters") import_wirecenters.outputGDBName = "Wirecenter_working"
from MFII_Arcpy import path_links, get_path, geotools import os #intesect_ineligible area with grid intersect_coverages = geotools.Tools() intersect_coverages.outputPathFolder = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" intersect_coverages.outputGDBName = path_links.intersect_inelligible_coverages_gdb_name intersect_coverages.create_gdb() intersect_coverages.inputGDB = os.path.join( r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files", path_links.mfi_blocks_erased_gdb_name + ".gdb") intersect_coverages.outputGDB = os.path.join( intersect_coverages.outputPathFolder, intersect_coverages.outputGDBName + ".gdb") intersect_coverages.intersect_coverages_by_stateGrid( lte_output_table_folder_path= r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" ) # dissolve the by grid diss_coverages = geotools.Tools() diss_coverages.outputPathFolder = r"D:\FCC_GIS_Projects\MFII\DataCollection\final_eligible_area\MFII_python_codes\Coverages\updated_files" diss_coverages.outputGDBName = path_links.diss_inelligible_by_grid_gdb_name diss_coverages.create_gdb() diss_coverages.inputGDB = intersect_coverages.outputGDB diss_coverages.outputGDB = os.path.join(diss_coverages.outputPathFolder, diss_coverages.outputGDBName + ".gdb") diss_coverages.dissolve_ineligible_coverages()
import os from MFII_Arcpy import geotools, get_path, path_links print("1------import block to gdb") mfIIBlocks = geotools.Tools() mfIIBlocks.inputPath = path_links.blocks_shapefile_path mfIIBlocks.outputGDBName = "mfII_Blocks_2010_wgs" mfIIBlocks.outputPathFolder = path_links.inputbasepath mfIIBlocks.create_gdb() print("2---import shapefile to gdb") mfIIBlocks.outputGDB = os.path.join(path_links.inputbasepath, mfIIBlocks.outputGDBName + ".gdb") mfIIBlocks.import_shapefiles_to_gdb("*") print('--- create MFII subsidy_blocks') createMFIIBlocksbyState = geotools.Tools() createMFIIBlocksbyState.inputGDB = mfIIBlocks.outputGDB createMFIIBlocksbyState.outputPathFolder = path_links.inputbasepath createMFIIBlocksbyState.outputGDBName = path_links.mfi_subsidized_blocks_gdb_name createMFIIBlocksbyState.outputGDB = os.path.join(path_links.inputbasepath, createMFIIBlocksbyState.outputGDBName + ".gdb") createMFIIBlocksbyState.create_gdb() createMFIIBlocksbyState.create_MFII_subsidy_blocks_by_state(path_links.MFII_table) createMFIIBlocksbyState.deleteEmptyfeaturesFiles(createMFIIBlocksbyState.outputGDB,"gdb") print('--- split MFII subsidy blocks')
from MFII_Arcpy import path_links, get_path, geotools import os #create water area from blocks water_area = geotools.Tools() water_area.outputPathFolder = path_links.inputbasepath water_area.outputGDBName = "water_area_blocks" water_area.create_gdb() water_area.inputGDB = path_links.blocks_gdb_path water_area.outputGDB = os.path.join(water_area.outputPathFolder, water_area.outputGDBName + ".gdb") water_area.create_water_area_blocks("ALAND10 = 0") #dissovle water area diss_water_area = geotools.Tools() diss_water_area.inputGDB = water_area.outputGDB diss_water_area.outputPathFolder = path_links.inputbasepath diss_water_area.outputGDBName = "water_area_blocks_diss" diss_water_area.create_gdb() diss_water_area.outputGDB = os.path.join( diss_water_area.outputPathFolder, diss_water_area.outputGDBName + ".gdb") diss_water_area.dissolveWaterArea() #Intersect_water_area_with_grid intersect = geotools.Tools() intersect.inputGDB = diss_water_area.outputGDB intersect.outputPathFolder = path_links.inputbasepath intersect.outputGDBName = "water_area_blocks_Grid" intersect.create_gdb()
from MFII_Arcpy import path_links, get_path, geotools import os ''' erase_water_areas = geotools.Tools() erase_water_areas.outputPathFolder = path_links.outputbasepath erase_water_areas.outputGDBName = "_ineligible_area_minus_water_area" erase_water_areas.create_gdb() erase_water_areas.outputGDB = os.path.join(erase_water_areas.outputPathFolder, erase_water_areas.outputGDBName+".gdb") erase_water_areas.inputGDB = r"E:\MFII_Dec2016\GIS\Subsidy_information\WireCenter_Vintages\_dissovled_ineligible_coverages.gdb" erase_water_areas.erase_water_blocks_from_coverage() # add field addfield = geotools.Tools() addfield.inputGDB = r"E:\MFII_Dec2016\GIS\Subsidy_information\WireCenter_Vintages\water_area_blocks_Grid.gdb" addfield.add_field_for_all_fc("WATER_AREA","DOUBLE",field_length=None) addfield.calculate_area_in_meters("WATER_AREA") ''' # deminimus area deminimus = geotools.Tools() deminimus.inputGDB = r"E:\MFII_Dec2016\GIS\Subsidy_information\WireCenter_Vintages\water_area_blocks_Grid.gdb" deminimus.outputPathFolder = path_links.inputbasepath deminimus.outputGDBName = "_provider_coverages_minus_diminimus" deminimus.outputGDB = os.path.join(deminimus.outputPathFolder, deminimus.outputGDBName + ".gdb") deminimus.drop_diminimus_area()
from MFII_Arcpy import path_links, get_path, geotools import os # merge the coverages merge = geotools.Tools() merge.outputPathFolder = path_links.inputbasepath merge.outputGDBName = "_merged_ineligible_area" merge.create_gdb() merge.inputGDB = os.path.join( path_links.outputbasepath, path_links.deminimus_ineligible_area_gdb_name + ".gdb") merge.outputGDB = os.path.join(merge.outputPathFolder, merge.outputGDBName + ".gdb") merge.merge_ineligible_coverages() # erase ineligible area from state grid erase = geotools.Tools() erase.outputPathFolder = path_links.inputbasepath erase.outputGDBName = "_eligible_area" erase.create_gdb() erase.inputGDB = merge.outputGDB erase.outputGDB = os.path.join(erase.outputPathFolder, erase.outputGDBName + ".gdb") erase.erase_coverages_from_state_boundary() # erase water area from eligible area erasewater = geotools.Tools() erasewater.outputPathFolder = path_links.outputbasepath