diff --git a/clip_RequiredData.py b/clip_RequiredData.py index cbb5a93925704da93e629c4e1b4d58998fa07fde..c86f5d76736ae53c325fdbb814481034ca337f4e 100644 --- a/clip_RequiredData.py +++ b/clip_RequiredData.py @@ -170,11 +170,13 @@ watershed_code = shp_watersheds.loc[:,'Code'] # watershed_code_IV = shp_BV_IV.loc[shp_BV_IV.loc[:,'Code'].isin(watershed_code)].loc[:, 'Code'] # Get a sample of them for test -code_for_test = watershed_code.loc[0:3] +code_for_test = watershed_code.loc[580:] # code_for_test = ['K9341810'] # code_for_test = ['J4742020'] +## TOPOGRAPHY +# BDAlti 25m for i in code_for_test: # for i in watershed_code: @@ -184,7 +186,7 @@ for i in code_for_test: raster_BDAlti = BDAlti_map.rio.clip(shp_contour_i.geometry.apply(mapping), shp_contour_i.crs) - raster_BDAlti.rio.to_raster('C:/Users/laura.lindeperg/Documents/DonneesLaura/Watersheds/TOPO/BDAlti_25m/'+i+'_BDAlti.tif') + raster_BDAlti.rio.to_raster('C:/Users/laura.lindeperg/Documents/DonneesLaura/Watersheds/TOPO/BDAlti_25m/'+i+'_BDAlti_25m.tif') ## Soil hydraulic properties diff --git a/experiments_and_tests.py b/experiments_and_tests.py index c37d1578d2e86fdcf95879ff5311e2c5cda2f9b7..d91afbe05a265a3b8d6756e96ad7be96fae1206c 100644 --- a/experiments_and_tests.py +++ b/experiments_and_tests.py @@ -32,6 +32,9 @@ bv_for_test_path = 'C:/Users/laura.lindeperg/Documents/DonneesLaura/Watersheds/G bv_for_test = gpd.read_file(bv_for_test_path) +## BDAlti 25m +BDAlti_path = 'C:/Users/laura.lindeperg/Documents/DonneesLaura/Watersheds/TOPO/BDAlti_25m/J4742020_BDAlti_25m.tif' +BDAlti_test = rxr.open_rasterio(BDAlti_path).squeeze() ## BDTopage @@ -143,7 +146,7 @@ FC_bv_test = extract_mean_hydraulic_property(FC_test) -# classesO, countsO = np.unique(ZHp_map, return_counts=True) +classesO, countsO = np.unique(BDAlti_test, return_counts=True) # ZHp_test.rio.resolution() # BV_W3315010.geometry.area @@ -172,11 +175,11 @@ plt.show() -ZHp_test.plot.hist() +BDAlti_test.plot.hist() plt.show() f, ax = plt.subplots(figsize=(10, 4)) -ZHp_test.plot(ax=ax, +BDAlti_test.plot(ax=ax, cmap='Greys') ax.set(title="Final Clipped ZHp") ax.set_axis_off() diff --git a/extract_HydroSig.py b/extract_HydroSig.py index 0dac6eba706e87e1ec15bfd9ca375ba38dcfc688..44447788b1c5e6ce049331e821f5c48f5924da2b 100644 --- a/extract_HydroSig.py +++ b/extract_HydroSig.py @@ -12,7 +12,7 @@ from Watershed import Watershed -computer = 'jean' +computer = 'Laura' # **************************** Data ***************************** if(computer == 'laura'): # Banque Hydro