@@ -1040,24 +1040,24 @@ def add_markers2mesh(
1040
1040
1041
1041
1042
1042
# print(hapin['xllcorner'])
1043
- print (hapin ['xllcorner' ],hapin ['yllcorner' ])
1043
+ # print(hapin['xllcorner'],hapin['yllcorner'])
1044
1044
1045
- print ('x[0],y[0]' )
1046
- print (x [0 ],y [0 ])
1047
- print (x [1 ],y [1 ])
1045
+ # print('x[0],y[0]')
1046
+ # print(x[0],y[0])
1047
+ # print(x[1],y[1])
1048
1048
1049
- print ('*' * 20 )
1050
- print ('initial dem shape' )
1051
- print (np .shape (dem ))
1052
- print (dem [0 ][0 ])
1049
+ # print('*'*20)
1050
+ # print('initial dem shape')
1051
+ # print(np.shape(dem))
1052
+ # print(dem[0][0])
1053
1053
1054
1054
1055
1055
dem_flip = np .flipud (dem )
1056
1056
# dem_flip = dem
1057
- print ('*' * 20 )
1058
- print ('flip dem shape' )
1059
- print (np .shape (dem_flip ))
1060
- print (dem_flip [0 ][0 ])
1057
+ # print('*'*20)
1058
+ # print('flip dem shape')
1059
+ # print(np.shape(dem_flip))
1060
+ # print(dem_flip[0][0])
1061
1061
1062
1062
1063
1063
# Get layer top and bottom
@@ -1078,40 +1078,40 @@ def add_markers2mesh(
1078
1078
else :
1079
1079
dem_mat3d_layers = [dem_flip - zz for zz in zone3d_top - (zone3d_top - zone3d_bot )/ 2 ]
1080
1080
1081
- print ('*' * 20 )
1082
- print ('dem_mat3d_layers shape' )
1083
- print (np .shape (dem_mat3d_layers ))
1084
- print (dem_mat3d_layers [0 ][0 ])
1081
+ # print('*'*20)
1082
+ # print('dem_mat3d_layers shape')
1083
+ # print(np.shape(dem_mat3d_layers))
1084
+ # print(dem_mat3d_layers[0][0])
1085
1085
1086
1086
1087
- print ('*' * 20 )
1088
- print ('zone3d_top shape' )
1089
- print (np .shape (zone3d_top ))
1090
- print (zone3d_top [0 ][0 ])
1087
+ # print('*'*20)
1088
+ # print('zone3d_top shape')
1089
+ # print(np.shape(zone3d_top))
1090
+ # print(zone3d_top[0][0])
1091
1091
1092
1092
1093
1093
1094
- print ('*' * 20 )
1095
- print ('x shape' )
1096
- print (np .shape (x ))
1094
+ # print('*'*20)
1095
+ # print('x shape')
1096
+ # print(np.shape(x))
1097
1097
1098
- print ('*' * 20 )
1099
- print ('y shape' )
1100
- print (np .shape (y ))
1098
+ # print('*'*20)
1099
+ # print('y shape')
1100
+ # print(np.shape(y))
1101
1101
1102
1102
1103
1103
# Create a regular mesh from the DEM x and y coordinates and elevation
1104
1104
# ------------------------------------------------------------------
1105
1105
xgrid , ygrid = np .meshgrid (x , y )
1106
1106
1107
1107
1108
- print ('*' * 20 )
1109
- print ('xgrid shape' )
1110
- print (np .shape (xgrid ))
1108
+ # print('*'*20)
1109
+ # print('xgrid shape')
1110
+ # print(np.shape(xgrid))
1111
1111
1112
- print ('*' * 20 )
1113
- print ('ygrid shape' )
1114
- print (np .shape (ygrid ))
1112
+ # print('*'*20)
1113
+ # print('ygrid shape')
1114
+ # print(np.shape(ygrid))
1115
1115
1116
1116
# print('je suis la')
1117
1117
grid_coords_dem = np .array (
@@ -1122,30 +1122,30 @@ def add_markers2mesh(
1122
1122
).T
1123
1123
1124
1124
# print(grid_coords_dem)
1125
- print ('*' * 20 )
1126
- print ('grid_coords_dem shape' )
1127
- print (np .shape (grid_coords_dem ))
1125
+ # print('*'*20)
1126
+ # print('grid_coords_dem shape')
1127
+ # print(np.shape(grid_coords_dem))
1128
1128
1129
1129
1130
- fig , ax = plt .subplots ()
1131
- ax = plt .axes (projection = "3d" )
1130
+ # fig, ax = plt.subplots()
1131
+ # ax = plt.axes(projection="3d")
1132
1132
1133
- cmap = ax .scatter (grid_coords_dem [:,0 ],
1134
- grid_coords_dem [:,1 ],
1135
- np .ravel (zone3d_top [0 ]),
1136
- c = 'k' )
1133
+ # cmap=ax.scatter(grid_coords_dem[:,0],
1134
+ # grid_coords_dem[:,1],
1135
+ # np.ravel(zone3d_top[0]),
1136
+ # c='k')
1137
1137
1138
- # ax.scatter(grid3d['mesh3d_nodes'][:,0],
1139
- # grid3d['mesh3d_nodes'][:,1],
1140
- # grid3d['mesh3d_nodes'][:,2],
1141
- # s=2,
1142
- # cmap = 'coolwarm')
1143
- ax .set_xlabel ('Northing (m)' )
1144
- ax .set_ylabel ('Easting (m)' )
1138
+ # # ax.scatter(grid3d['mesh3d_nodes'][:,0],
1139
+ # # grid3d['mesh3d_nodes'][:,1],
1140
+ # # grid3d['mesh3d_nodes'][:,2],
1141
+ # # s=2,
1142
+ # # cmap = 'coolwarm')
1143
+ # ax.set_xlabel('Northing (m)')
1144
+ # ax.set_ylabel('Easting (m)')
1145
1145
1146
1146
1147
- plt .title ('grid_coords_dem l0' )
1148
- plt .colorbar (cmap ,ax = ax )
1147
+ # plt.title('grid_coords_dem l0')
1148
+ # plt.colorbar(cmap,ax=ax)
1149
1149
1150
1150
1151
1151
# Reduce all to 1D
@@ -1160,16 +1160,16 @@ def add_markers2mesh(
1160
1160
xyz_layers = np .c_ [grid_coords_stk_rep , dem_mat_stk , zones3d_col_stk ]
1161
1161
1162
1162
1163
- fig , ax = plt .subplots ()
1164
- cmap = ax .scatter (xyz_layers [:,0 ],
1165
- xyz_layers [:,1 ],
1166
- c = xyz_layers [:,2 ]
1167
- )
1168
- plt .colorbar (cmap ,ax = ax )
1169
- plt .title ('xyz_layers' )
1163
+ # fig, ax = plt.subplots()
1164
+ # cmap=ax.scatter(xyz_layers[:,0],
1165
+ # xyz_layers[:,1],
1166
+ # c=xyz_layers[:,2]
1167
+ # )
1168
+ # plt.colorbar(cmap,ax=ax)
1169
+ # plt.title('xyz_layers')
1170
1170
1171
1171
1172
- print ('_plot_cellsMarkerpts' )
1172
+ # print('_plot_cellsMarkerpts')
1173
1173
# Plot to check position of points VS mesh
1174
1174
# ------------------------------------------------------------------
1175
1175
_plot_cellsMarkerpts (mesh_pv_attributes ,
@@ -1178,7 +1178,7 @@ def add_markers2mesh(
1178
1178
project_name )
1179
1179
1180
1180
#%%
1181
- print ('_find_nearest_point2DEM' )
1181
+ # print('_find_nearest_point2DEM')
1182
1182
# Assign marker to mesh and overwrite it
1183
1183
# ------------------------------------------------------------------
1184
1184
_find_nearest_point2DEM (
0 commit comments