ferrobus.create_isochrone_index

ferrobus.create_isochrone_index#

ferrobus.create_isochrone_index(transit_model, area, cell_resolution, max_walking_time=1200)#

Create a spatial index for isochrone calculations

Parameters:
  • transit_model (TransitModel) – The transportation model containing transit network information.

  • area (str) – Geographic area over which to build the isochrone, as a WKT string.

  • cell_resolution (int) – Resolution of hexagonal grid cells (0-255). Higher values create finer-grained but larger indexes.

  • max_walking_time (int, default=1200) – Maximum time in seconds for walking connections.

Returns:

Pre-computed spatial index structure for rapid isochrone calculations.

Return type:

IsochroneIndex

Raises:
  • ValueError – If the area WKT string cannot be parsed.

  • RuntimeError – If the isochrone index creation fails for other reasons.

Notes

Creating this index may be compute-intensive but allows for extremely fast subsequent isochrone calculations, making it ideal for interactive applications or batch processing multiple isochrones from different starting points.