From 7e17a785e5f018c119c52574fa7caa0413868f93 Mon Sep 17 00:00:00 2001 From: gabriele Date: Fri, 24 Nov 2023 10:27:52 +0100 Subject: [PATCH] changes for Adapters.py. Finalized the spacing script example --- .../Spacing/data/cava_pontrelli/FN_set_1.dbf | Bin 61474 -> 61442 bytes .../Spacing/data/cava_pontrelli/FN_set_1.shp | Bin 440524 -> 440388 bytes .../Spacing/data/cava_pontrelli/FN_set_1.shx | Bin 15436 -> 15428 bytes development/Spacing/main.py | 112 ++++-------------- src/fracability/Adapters.py | 32 ++--- 5 files changed, 39 insertions(+), 105 deletions(-) diff --git a/development/Spacing/data/cava_pontrelli/FN_set_1.dbf b/development/Spacing/data/cava_pontrelli/FN_set_1.dbf index 8b72a5ab83f99cbc478da7630ec9f9a076e1c196..fea2c8e38a8f8ec2c45ba7654b812f2d30038394 100644 GIT binary patch delta 21 dcmZ4VfVt@bGb?j7w|LD))~^#bOHJg62LM{u2n+xK delta 32 ocmZpAz`W=IGb?jEyHxE))~^%TEcDDQjSVL!c*|`5Gl4B00J`uCXaE2J diff --git a/development/Spacing/data/cava_pontrelli/FN_set_1.shp b/development/Spacing/data/cava_pontrelli/FN_set_1.shp index 2fb93aa482c5c4d2ba6d58d504014029a7bbb111..0059a194b3e537c207422101b8312dd134579381 100644 GIT binary patch delta 5474 zcmWky2b7al7vx)#5PIkVDWPuYQ9wcuJxB{Zf?#M8dZ-%#H43;l`jzVG5IC*%Sl;;@Ny;>!@Po&B}lAL31uk)D^=r^W&TwJK15cjo+-;k zc(p21QC1-CR}E2C!UPIdAr88%hAW`TSNyQ9p$-VIAteCqT81@ntYva7qHEc9ov^GU zQr3&mdKQ%p{*AQRh|or6H$k_F9fOE&BH9d7kZ22%K~lEDx0zuZ%v)I7E`nR+G&>O8 zO4psRY~vUq#JBMTYOvaPU3;ovQQ7UPO12u@8w0k=;DYVd2{&I~+k|FU@k`*hjNmVc)Ont|$V*0~|ks^Z^I)=nS zDvrZ@h;}ECI>hAHa35y!Bn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Utm(5??VQ_{>84klXBB#h~llMEqzk_BY;oiZAH43hs z6nu=#PWJl*!Cf5bQ)qWnH(Eq@%d@zU+C$D5xWcp<3+rC$$053xmp&f)ee62{;eAX_ rgmFJ_Z4%P^nRLT@fTsK&d64och#X{cDr`B_O+zS$X4ByjniKy6E?OwC diff --git a/development/Spacing/data/cava_pontrelli/FN_set_1.shx b/development/Spacing/data/cava_pontrelli/FN_set_1.shx index 6410ac4551c71027ef3b077aedccb29f92d6bd41..1394d00a2584c78d1c473aa2e81cdc892a327c55 100644 GIT binary patch literal 15428 zcmZviaa^8d)yL0$qo}Ajnc|#^lPMx|h^UCD_>4_tsFR@~qR}HMBK0CIC0t66XbZ^@ zXCk8SLez!4Nl1nh3z2e8Dx8?OFi9!bno5(3CMLe$-*esnyr0k8XYRXmopXNYcdnbQ zJ@+s>HO~Iu|0N~wi814cUHi!Dvo5M#zUrOli+^|T1?yMszpdc)3%;>@)#OY|{By+r zZ~Ol}%p|Phzb$57HvdiX>xh|O&aam-rP0hdj~Rm9W(QPrUT=2bZsPaMVn^W~vx5fU zHnW2_Kmc=qYW_~M!(t(IhpE5Q?C?Zb3KfT-^b5@5 zeYg+KLF$jFfEln2Qh&s(ix;K9kl7;qs&3H)jF=r+2AP|X2(w`^tcPQ;)@*SeWX|H2 zfVvOPk6H(dU>BtSXzoY-M|Ze5u>{hWsC)?OeoD=bkzN>Xt_hL-+U* zi~2hu9d?_Ypm`Z)N%4^WB>6`-X#iH4otO+e;dY3hWlJGGmT5lq%lcsm&N-fx1IeFM z2bp&g^K}o&H82dvVaRNGB7P!fCu^TRvs3V=xu+-&!vzjg*{Uys4G_JvRnPf3_|^TMn?sDhbL${;&Q(9>*(H#^>>k){ zcAnx|I0_?XIl2$>Iqc^hY<7MxaR|;5cbZ+;=Hd${;eNB+3D|0OQ8mnfTOfWyaS)vl zem&-|()~7><>eFe%hiSa)DCw;@@w)SeQPw2_+s^kp!_KAfy~Lzh4oN+)L)VUL$DfV z!>uqCYG2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?hE48o6Vy>)*^j$gT;;UA`h{aqr0`YUz9BiPNqH3ZipOGE9Yq5FgiU2=Y5%*ka0ZT)wOsa$ngvMCaNh Sm%p|eGJoxQi0*Yh4F50S0{5i= diff --git a/development/Spacing/main.py b/development/Spacing/main.py index b170702..41e04a0 100644 --- a/development/Spacing/main.py +++ b/development/Spacing/main.py @@ -47,31 +47,6 @@ def centers_to_lines(center_coords, lengths, frac_dir, assign_id=True) -> pv.Pol return lines -def plot_rose(dir_data): - bin_edges = np.arange(-5, 366, 10) - number_of_strikes, bin_edges = np.histogram(dir_data, bin_edges) - number_of_strikes[0] += number_of_strikes[-1] - half = np.sum(np.split(number_of_strikes[:-1], 2), 0) - two_halves = np.concatenate([half, half]) - fig = plt.figure(figsize=(16, 8)) - - ax = fig.add_subplot(111, projection='polar') - - ax.bar(np.deg2rad(np.arange(0, 360, 10)), two_halves, - width=np.deg2rad(10), bottom=0.0, color='.8', edgecolor='k') - ax.set_theta_zero_location('N') - ax.set_theta_direction(-1) - ax.set_title('Rose Diagram of the "Fault System"', y=1.10, fontsize=15) - - fig.tight_layout() - plt.show() - - -def histogram(dir_data): - sns.histplot(dir_data, bins=18) - plt.show() - - def center_points(center_coords, lengths, dir, resolution=10): """Function used to create a series of points along a line with center, length and direction.""" @@ -99,9 +74,9 @@ def center_points(center_coords, lengths, dir, resolution=10): df = gpd.read_file(data_path) boundary_df = gpd.read_file(boundary_path) -length_plane = 120 -length_scanl = 150 -resolution = 10 +length_plane = 150 +length_scanl = 170 +resolution = 100 df_faults = df.loc[df['Fault'] == 1] @@ -137,72 +112,37 @@ def center_points(center_coords, lengths, dir, resolution=10): fractures_diss = fractures.entity_df.dissolve() split_scanlines_list = [] + +# for scanline in scanlines_shp: +# split_geom = split(scanline, boundary_shp) +# for segment in split_geom.geoms: +# if boundary_shp.buffer(0.001).contains(segment): +# split_scanlines_list.append(segment) + for scanline in scanlines_shp: - split_geom = split(scanline, boundary_shp) + split_geom = split(scanline, fractures_diss['geometry'].values[0]) for segment in split_geom.geoms: - if boundary_shp.covers(segment): - split_segment = split(segment, fractures_diss['geometry'].values[0]) - split_scanlines_list.append(list(split_segment.geoms)) + split_segment = split(segment, boundary_shp) + for line in split_segment.geoms: + if boundary_shp.buffer(0.001).contains(line): + split_scanlines_list.append(line) + -split_scanlines_df = gpd.GeoDataFrame(geometry=np.concatenate(split_scanlines_list)) +split_scanlines_df = gpd.GeoDataFrame(geometry=split_scanlines_list) -valid_scanlines = Entities.Fractures(gdf=split_scanlines_df,set_n=1) +valid_scanlines = Entities.Fractures(gdf=split_scanlines_df, set_n=1) frac_net = Entities.FractureNetwork() -# frac_net.add_fractures(valid_scanlines) -frac_net.add_fractures(scanlines) +frac_net.add_fractures(valid_scanlines) +# frac_net.add_fractures(scanlines) frac_net.add_boundaries(boundary) -frac_net.fractures.vtk_plot() - -# frac_net.calculate_topology() -# -# -# fitter = Statistics.NetworkFitter(frac_net) -# fitter.fit('lognorm') -# matplot_stats_summary(fitter.get_fitted_distribution('lognorm')) - -# -# -# fractures_diss = fractures.entity_df.dissolve() -# splitted_list = [] -# -# for i, scanline in enumerate(scanlines.entity_df['geometry'].values): -# -# splitted = split(scanline, fractures_diss['geometry'].values[0]) -# splitted_list.append(list(splitted.geoms)) -# -# scanline_df = gpd.GeoDataFrame(geometry=np.concatenate(splitted_list)) -# -# new_scanlines = Entities.Fractures(gdf=scanline_df, set_n=4) -# -# -# -# frac_net = Entities.FractureNetwork() -# frac_net.add_fractures(new_scanlines) -# frac_net.add_boundaries(boundary) -# print(frac_net.sets) -# frac_net.cut_net_on_boundary() +print(len(frac_net.fractures.entity_df['length'])) +frac_net.calculate_topology() # frac_net.vtk_plot() -# frac_net.calculate_topology() -# sns.histplot(new_scanlines.entity_df['length'].values) -# plt.show() - - -# fitter = Statistics.NetworkFitter(frac_net) -# fitter.fit('lognorm') -# matplot_stats_summary(fitter.get_fitted_distribution('lognorm')) - -# print(new_scanlines.vtk_object.array_names) +# print(frac_net.fraction_censored) # -# plotter = pv.Plotter() -# plotter.background_color = 'gray' -# plotter.add_mesh(boundary.vtk_object, color='white') -# # plotter.add_mesh(line, color='r') -# # # plotter.add_mesh(mean_plane, color='b') -# # # plotter.add_points(test_points, color='y') -# plotter.add_mesh(lines) -# plotter.view_xy() -# plotter.enable_image_style() -# plotter.show() +fitter = Statistics.NetworkFitter(frac_net) +fitter.fit('lognorm') +matplot_stats_summary(fitter.get_fitted_distribution('lognorm')) diff --git a/src/fracability/Adapters.py b/src/fracability/Adapters.py index 2898968..6a017d4 100644 --- a/src/fracability/Adapters.py +++ b/src/fracability/Adapters.py @@ -5,16 +5,15 @@ TODO: + Add a adapter abstract class in the AbstractClasses. - + Use as input gpd for all - + Use multiblock instead of appender for the fracture network - + Try and find a way to crate vtk object directly from polygon and not from lines of polygon + + Use multiblock instead of appender for fracture network (or all?)? + + Try and find a way to crate boundary vtk object directly from polygon and not from lines of polygon """ import geopandas import networkx import numpy as np -from pyvista import PolyData, lines_from_points +from pyvista import PolyData, lines_from_points, MultiBlock from vtkmodules.vtkFiltersCore import vtkAppendPolyData @@ -50,21 +49,19 @@ def frac_vtk_rep(input_df: geopandas.GeoDataFrame) -> PolyData: points = np.stack((x, y, z), axis=1) # Stack the coordinates to a [n,3] shaped array # offset = np.round(points[0][0]) - pv_obj = lines_from_points(points) # Create the corresponding vtk line with the given points - pv_obj.cell_data['type'] = ['fracture'] * pv_obj.GetNumberOfCells() - pv_obj.point_data['type'] = ['fracture'] * pv_obj.GetNumberOfPoints() - - pv_obj.cell_data['f_set'] = [set_n] * pv_obj.GetNumberOfCells() - pv_obj.point_data['f_set'] = [set_n] * pv_obj.GetNumberOfPoints() + if len(points) != 0: # Avoid empty geometries + pv_obj = lines_from_points(points) # Create the corresponding vtk line with the given points + pv_obj.cell_data['type'] = ['fracture'] * pv_obj.GetNumberOfCells() + pv_obj.point_data['type'] = ['fracture'] * pv_obj.GetNumberOfPoints() - pv_obj.cell_data['RegionId'] = [index] * pv_obj.GetNumberOfCells() - pv_obj.point_data['RegionId'] = [index] * pv_obj.GetNumberOfPoints() + pv_obj.cell_data['f_set'] = [set_n] * pv_obj.GetNumberOfCells() + pv_obj.point_data['f_set'] = [set_n] * pv_obj.GetNumberOfPoints() - if 'length' in input_df.columns: - pv_obj.cell_data['length'] = input_df.loc[index, 'length'] + pv_obj.cell_data['RegionId'] = [index] * pv_obj.GetNumberOfCells() + pv_obj.point_data['RegionId'] = [index] * pv_obj.GetNumberOfPoints() - # pv_obj.cell_data_to_point_data() - # line.plot() + if 'length' in input_df.columns: + pv_obj.cell_data['length'] = input_df.loc[index, 'length'] appender.AddInputData(pv_obj) # Add the new object @@ -159,9 +156,6 @@ def networkx_rep(input_object: PolyData) -> networkx.Graph(): lines = np.delete(lines, np.arange(0, lines.size, 3)).reshape(-1, 2) # remove padding eg. [2 id1 id2 2 id3 id4 ...] -> remove the 2 - # test_types = np.array([{'type': t} for t in network['type']]) - # edges = np.c_[lines.reshape(-1, 2)] - network = nx.Graph() # Create a networkx graph instance network.add_edges_from(lines) # Add the edges