Skip to contents

This function determines the network paths from a specific point to multiple centroids based on distance thresholds. It can compute the shortest, all shortest, or all simple paths depending on the path type specified.

Usage

calculate_paths_from_point_dist(
  network,
  point,
  minDistPts = 2,
  maxDistPts = 1500,
  centroids,
  path_type = "shortest",
  max_path_weight = 10,
  crs_transform = 27700,
  cache_env = NULL
)

Arguments

network

An sfnetwork object representing the network.

point

An sf or sfc object containing a single point feature from which paths will be calculated.

minDistPts

The minimum distance (in meters) to consider for path calculations.

maxDistPts

The maximum distance (in meters) to consider for path calculations.

centroids

An sf object containing centroids to which paths are calculated.

path_type

A character string indicating the type of path calculation: 'shortest', 'all_shortest', or 'all_simple'.

max_path_weight

Maximum weight allowed for paths in network calculations.

crs_transform

The coordinate reference system to transform to, default is 27700 (British National Grid).

cache_env

An optional environment for caching results. If NULL, no caching is performed.

Value

A list containing the computed paths and their associated weights.