dist_thresh_weights_sequential
cellseg_gsontools.graphs.dist_thresh_weights_sequential(gdf, w, thresh, id_col=None, include_self=False)
¶
Threshold edges based on distance to center node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gdf |
GeoDataFrame
|
The input geodataframe. |
required |
w |
W
|
The input spatial weights object. |
required |
thresh |
float
|
The distance threshold. |
required |
id_col |
str
|
The unique id column in the gdf. If None, this uses |
None
|
include_self |
bool, default=True
|
Whether to include self-loops in the neighbors. |
False
|
Returns:
Type | Description |
---|---|
W
|
libpysal.weights.W: A libpysal spatial weights object, containing the neighbor graph data. |