revrt.routing.utilities.map_to_costs#
- map_to_costs(route_points, crs, transform, shape)[source]#
Map route table to cost indices and drop out-of-bounds rows
- Parameters:
route_points (
pandas.DataFrame) – Route definitions table with at least start_lat, start_lon, end_lat, and end_lon coordinate columns.crs (
strorpyproj.crs.CRS) – Coordinate reference system for the cost raster.transform (
affine.Affine) – Rasterio affine transform giving pixel origin and resolution.shape (
tuple) – Raster height and width for bounds checking.
- Returns:
pandas.DataFrame– Updated route table filtered to routes within the cost domain.