geograph icon indicating copy to clipboard operation
geograph copied to clipboard

[feature] functionality and tutorial for landscape connectivity analysis

Open CWen001 opened this issue 3 years ago • 1 comments

Hello. The package has already provided an excellent presentation of the graph structure of a landscape, mostly for visualization and component/disconnection identification. Is it possible to take one step further, by providing a toolkit to analyze more landscape connectivity indexes? Like dPC, IIC, IF and more?

CWen001 avatar Aug 17 '21 02:08 CWen001

Thank you for the feedback @CWen001 - we will add some of the indexes you mention to the list of metrics included in the package in the next release. In the meantime, you can implement whatever metric you like yourself using the geograph.metrics.Metric class, for example:


from geograph.metrics import Metric
# pass GeoGraph object to custom function to calculate IIC
def iic_metric(geo_graph: geograph.GeoGraph) -> Metric:
    ...
    # calculate IIC here from geo_graph
    ...
    return Metric(
        value=iic_value,
        name="IIC",
        description="Integral index of connectivity.",
    )

geo_graph.metrics["IIC"] = iic_metric(geo_graph)

herbiebradley avatar Aug 21 '21 14:08 herbiebradley