Learn R Programming

leastcostpath (version 1.8.7)

check_locations: Check locations

Description

Checks that locations can be reached when calculating least cost paths

Usage

check_locations(cost_surface, locations)

Value

numeric vector of location indexes that are not traversable from at least one adjacent cell

Arguments

cost_surface

TransitionLayer (gdistance package). Cost surface to be used when checking whether supplied locations are traversable from at least one adjcacent cell

locations

SpatialPoints* (sp package) locations to check

Author

Joseph Lewis

Details

Using the supplied cost surface, the function checks whether the cells of supplied locations are traversable from at least one adjacent cell. If the cells of the supplied location are not traversable from at least one adjacent cell then a calculated least cost path cannot traverse to that location.