Commit 426efa49 authored by Laura LINDEPERG's avatar Laura LINDEPERG
Browse files

Minor changes

parent bde0a8fb
......@@ -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
......
......@@ -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()
......
......@@ -12,7 +12,7 @@ from Watershed import Watershed
computer = 'jean'
computer = 'Laura'
# **************************** Data *****************************
if(computer == 'laura'):
# Banque Hydro
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment