cost_eco_model_linker.reef_distances¶
Functions¶
|
Calculate the great circle distance in kilometers between two points |
|
Find clusters of reefs within max_dist of each other. These represent the furthest a ship would travel |
|
Finds the total estimated travel distance from port via the max distance to port from |
Module Contents¶
- cost_eco_model_linker.reef_distances.haversine(x, y)¶
Calculate the great circle distance in kilometers between two points on the earth (specified in decimal degrees)
- cost_eco_model_linker.reef_distances.find_representative_reefs(iv_reef_spatial, regions_data, max_dist=25.0)¶
Find clusters of reefs within max_dist of each other. These represent the furthest a ship would travel between reefs to implement interventions before going back to port. For reefs in unique clusters, the reef furthest from port is selected to represent the maximum travel distance from port, which is used to estimate the logistical cost of the intervention.
- Parameters:
reef_spatial_data (dataframe) – A dataframe from the RME specified key reef IDs and spatial information (loaded from reefmod_gbr.gpkg).
regions_data (dataframe) – A dataframe with key spatial and economics data for each reef in the GBR (loaded from econ_spatial.csv).
iv_reefs (np.array(str)) – GBRMPA IDs of all reefs intervened at in the intervention
max_dist (float) – Maximum allowable distance between reefs in a cluster.
- Returns:
representative_reefs – GBRMPA IDs which represent a subset of iv_reefs which give the reefs furthest from port for each cluster, their names, and distances.
- Return type:
Tuple
- cost_eco_model_linker.reef_distances.find_max_reef_distance(reef_spatial_data, regions_data, iv_reefs, max_dist=25.0)¶
Finds the total estimated travel distance from port via the max distance to port from the closest reef cluster plus the sum of distances between that cluster and any other clusters.
- Parameters:
iv_reefs (list) – List of reef IDs intervened at for a particular intervention
data_store (dataframe) – Storage dataframe for creating economics metric files
- Return type:
Tuple, of (reef_ids, reef_names, distances)