Skip to content

Commit

Permalink
docs: remove references to pygeos
Browse files Browse the repository at this point in the history
  • Loading branch information
nialov committed Nov 1, 2024
1 parent 92de5c6 commit b2f9549
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 214 deletions.
62 changes: 28 additions & 34 deletions docs_src/notebooks/fractopo_network_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,14 @@
"\n",
"warnings.filterwarnings(\"ignore\", message=\"The Shapely GEOS\")\n",
"warnings.filterwarnings(\"ignore\", message=\"In a future version, \")\n",
"warnings.filterwarnings(\"ignore\", message=\"No data for colormapping provided via\")\n",
"warnings.filterwarnings(\n",
" \"ignore\", message=\"Shapely 2.0 is installed, but because PyGEOS is also installed\"\n",
")"
"warnings.filterwarnings(\"ignore\", message=\"No data for colormapping provided via\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`geopandas` is the main module which `fractopo` is based on. It along with `shapely` and `pygeos` implement all spatial operations required for two-dimensional fracture network analysis. `geopandas` further implements all input-output operations like reading and writing spatial datasets (shapefiles, GeoPackages, GeoJSON, etc.)."
"`geopandas` is the main module which `fractopo` is based on. It along with `shapely` implement all spatial operations required for two-dimensional fracture network analysis. `geopandas` further implements all input-output operations like reading and writing spatial datasets (shapefiles, GeoPackages, GeoJSON, etc.)."
]
},
{
Expand All @@ -63,39 +60,36 @@
"metadata": {},
"outputs": [],
"source": [
"import geopandas as gpd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`geopandas` uses `matplotlib` for visualizing spatial datasets."
"from pathlib import Path"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f94a69f7",
"metadata": {},
"outputs": [],
"source": [
"import geopandas as gpd\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"lines_to_next_cell": 2
},
"source": [
"Miscellaneous imports."
"`geopandas` uses `matplotlib` for visualizing spatial datasets."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 2
},
"source": [
"from pathlib import Path"
"Miscellaneous imports."
]
},
{
Expand Down Expand Up @@ -166,12 +160,12 @@
"source": [
"## Network\n",
"\n",
"So far we have not used any `fractopo` functionality, just `geopandas`. Now we use the `Network` class to create `Network` instances that can be thought of as abstract representations of fracture networks. The fracture network contains traces and a target area boundary delineating the traces. \n",
"So far we have not used any `fractopo` functionality, just `geopandas`. Now we use the `Network` class to create `Network` instances that can be thought of as abstract representations of fracture networks. The fracture network contains traces and a target area boundary delineating the traces.\n",
"\n",
"To characterize the topology of a fracture network `fractopo` determines the topological branches and nodes ([Sanderson and Nixon 2015](https://doi.org/10.1016/j.jsg.2015.01.005)). \n",
"To characterize the topology of a fracture network `fractopo` determines the topological branches and nodes ([Sanderson and Nixon 2015](https://doi.org/10.1016/j.jsg.2015.01.005)).\n",
"\n",
"- Nodes consist of trace endpoints which can be isolated or snapped to end at another trace. \n",
"- Branches consist of every trace segment between the aforementioned nodes. \n",
"- Nodes consist of trace endpoints which can be isolated or snapped to end at another trace.\n",
"- Branches consist of every trace segment between the aforementioned nodes.\n",
"\n",
"Automatic determination of branches and nodes is determined with the `determine_branches_nodes` keyword. If given as `False`, they are not determined. You can still use the `Network` object to investigate geometric properties of just the traces.\n",
"\n",
Expand All @@ -184,11 +178,11 @@
"- `circular_target_area`\n",
"\n",
" - If the target area is a circle `circular_target_area` should be given as `True`. A circular target area is recommended to avoid orientation bias in node counting.\n",
" \n",
"\n",
"- `snap_threshold`\n",
"\n",
" - To determine topological relationships between traces the abutments between traces should be snapped to some tolerance. This tolerance can be given here, in the same unit used for the traces. It represents the smallest distance between nodes for which `fractopo` interprets them as two distinct nodes. This value should be carefully chosen depending on the size of the area of interest. As a reference, when digitizing in QGIS with snapping turned on, the tolerance is probably much lower than `0.001`.\n",
" \n",
"\n",
" - The trace validation functionality of `fractopo` can be (and should be) used to check that there are no topological errors within a certain tolerance."
]
},
Expand Down Expand Up @@ -237,7 +231,7 @@
"outputs": [],
"source": [
"# Import identifier strings of topological branches and nodes\n",
"from fractopo.general import CC_branch, CI_branch, II_branch, X_node, Y_node, I_node\n",
"from fractopo.general import CC_branch, CI_branch, I_node, II_branch, X_node, Y_node\n",
"\n",
"\n",
"# Function to determine color for each branch and node type\n",
Expand Down Expand Up @@ -312,16 +306,16 @@
"source": [
"## Geometric Fracture Network Characterization\n",
"\n",
"The most basic geometric properties of traces are their **length** and **orientation**. \n",
"The most basic geometric properties of traces are their **length** and **orientation**.\n",
"\n",
"**Length** is the overall travel distance along the digitized trace. The length of traces individually is usually not interesting but the value **distribution** of all of the lengths is ([Bonnet et al. 2001](https://doi.org/10.1029/1999RG000074)). `fractopo` uses another Python package, `powerlaw`, for determining power-law, lognormal and exponential distribution fits. The wrapper around `powerlaw` is thin and therefore I urge you to see its [documentation](https://github.com/jeffalstott/powerlaw) and associated [article](https://doi.org/10.1371/journal.pone.0095816) for more info.\n",
"\n",
"**Orientation** of a trace (or branch, or any line) can be defined in multiple ways that approach the same result when the line is **sublinear**:\n",
"\n",
"- Draw a straight line between the start and endpoints of the trace and calculate the orientation of that line. \n",
"- Draw a straight line between the start and endpoints of the trace and calculate the orientation of that line.\n",
"\n",
" - This is the approach used in `fractopo`. Simple, but when the trace is curvy enough the simplification might be detrimental to analysis.\n",
" \n",
"\n",
"- Plot each coordinate point of a trace and fit a linear regression trend line. Calculate the orientation of the trend line.\n",
"\n",
"- Calculate the orientation of each segment between coordinate points resulting in multiple orientation values for a single trace."
Expand Down Expand Up @@ -440,17 +434,17 @@
"Branches can be categorized into three main categories:\n",
"\n",
"- **C–C** is connected at both endpoints\n",
" \n",
"\n",
"- **C-I** is connected at one endpoint\n",
"\n",
"- **I-I** is not connected at either endpoint\n",
" \n",
"\n",
"Nodes can be similarly categorized into three categories:\n",
"\n",
"- **X** represents intersection between two traces\n",
" \n",
"\n",
"- **Y** represents abutment of one trace to another\n",
" \n",
"\n",
"- **I** represents isolated termination of a trace\n",
"\n",
"Furthermore **E** node and any **E**-containing branch classification (e.g. **I-E**) are related to the trace area boundary. Branches are always cropped to the boundary and branches that are cut then have a **E** node as end endpoint."
Expand Down
Loading

0 comments on commit b2f9549

Please sign in to comment.