fractopo.analysis.contour_grid module
Scripts for creating sample grids for fracture trace, branch and node data.
- fractopo.analysis.contour_grid.create_grid(cell_width, lines)
Create an empty polygon grid for sampling fracture line data.
Grid is created to always contain all given lines.
E.g.
>>> lines = gpd.GeoSeries( ... [ ... LineString([(1, 1), (2, 2)]), ... LineString([(2, 2), (3, 3)]), ... LineString([(3, 0), (2, 2)]), ... LineString([(2, 2), (-2, 5)]), ... ] ... ) >>> create_grid(cell_width=0.1, lines=lines).head(5) geometry 0 POLYGON ((-2 5, -1.9 5, -1.9 4.9, -2 4.9, -2 5)) 1 POLYGON ((-2 4.9, -1.9 4.9, -1.9 4.8, -2 4.8, ... 2 POLYGON ((-2 4.8, -1.9 4.8, -1.9 4.7, -2 4.7, ... :rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~geopandas.geodataframe.GeoDataFrame\``
3 POLYGON ((-2 4.7, -1.9 4.7, -1.9 4.6, -2 4.6, … 4 POLYGON ((-2 4.6, -1.9 4.6, -1.9 4.5, -2 4.5, …
- fractopo.analysis.contour_grid.populate_sample_cell(sample_cell, sample_cell_area, traces, nodes, branches, snap_threshold, resolve_branches_and_nodes, traces_sindex=None)
Take a single grid polygon and populate it with parameters.
Mauldon determination requires that E-nodes are defined for every single sample circle. If correct Mauldon values are wanted resolve_branches_and_nodes must be passed as True. This will result in much longer analysis time.
- Return type:
Dict
[str
,float
]
- fractopo.analysis.contour_grid.sample_grid(grid, traces, nodes, branches, snap_threshold, resolve_branches_and_nodes=False)
Populate a sample polygon grid with geometrical and topological parameters.
- Return type:
GeoDataFrame