nilsnolde / docker-valhalla

This is our flexible Docker repository for the Valhalla routing engine
MIT License
257 stars 74 forks source link

Error while building transit #160

Closed cazitouni closed 4 months ago

cazitouni commented 4 months ago

Hello,

I open this issue because I could use some help. I tried to build transit in addition of my base routing tile.

So i've downloaded a local GTFS graph, no problem here, it's read well and valhalla build the transit related tiles but when it comes to enchance the graph i got this error which lead to a segmentation fault

valhalla-valhalla-1  | ===============================
valhalla-valhalla-1  | = Enhancing the initial graph =
valhalla-valhalla-1  | ===============================
valhalla-valhalla-1  | 2024/07/31 07:43:21.829687 [INFO] Running valhalla_build_tiles with 1 thread(s).
valhalla-valhalla-1  | 2024/07/31 07:43:21.830289 [INFO] Start stage = enhance End stage = cleanup
valhalla-valhalla-1  | 2024/07/31 07:43:21.830885 [INFO] Read OSMData unique_names from temp file
valhalla-valhalla-1  | 2024/07/31 07:43:21.845178 [INFO] Done
valhalla-valhalla-1  | 2024/07/31 07:43:21.845566 [INFO] Enhancing local graph...
valhalla-valhalla-1  | 2024/07/31 07:43:21.873340 [INFO] Disabled default speeds assignment from config
valhalla-valhalla-1  | 2024/07/31 07:45:26.322912 [INFO] Finished with max_density 18.553568
valhalla-valhalla-1  | 2024/07/31 07:45:26.323139 [INFO] internal intersection = 5710
valhalla-valhalla-1  | 2024/07/31 07:45:26.324198 [INFO] GraphFilter - nothing to filter. Skipping...
valhalla-valhalla-1  | 2024/07/31 07:45:26.378235 [INFO] Adding 3 transit tiles to the local graph...
valhalla-valhalla-1  | 2024/07/31 07:45:27.477437 [WARN] Could not create transit connect edge from end node because its in another tile
valhalla-valhalla-1  | 2024/07/31 07:45:27.491592 [WARN] Could not create transit connect edge from end node because its in another tile
valhalla-valhalla-1  | 2024/07/31 07:45:27.516691 [WARN] Could not create transit connect edge from end node because its in another tile
valhalla-valhalla-1  | 2024/07/31 07:45:29.883502 [WARN] Could not find connection point for in/egress near: 48.575529,7.816127
valhalla-valhalla-1  | /valhalla/scripts/configure_valhalla.sh: line 254:   290 Segmentation fault      (core dumped) valhalla_build_tiles -c ${CONFIG_FILE} -s enhance ${files}

I guess the main problem lies here

valhalla-valhalla-1  | 2024/07/31 07:45:27.516691 [WARN] Could not create transit connect edge from end node because its in another tile

But I did not understand well this error message, did I missed something with my GTFS ?

this is my docker-compose file for reference

version: '3.0'
services:
  valhalla:
    restart: always
    image: ghcr.io/gis-ops/docker-valhalla/valhalla:latest
    ports:
      - "8002:8002"
    volumes:
      - ./custom_files/:/custom_files
      - ./custom_files/gtfs_feeds:/gtfs_feeds
      - ./custom_files/transit_tiles:/transit_tiles
    environment:
      # The tile_file must be located in the `custom_files` folder.
      # The tile_file has priority and is used when valid.
      # If the tile_file doesn't exist, the url is used instead.
      # Don't blank out tile_url when you use tile_file and vice versa.
      - tile_urls=https://download.geofabrik.de/europe/france/alsace-latest.osm.pbf
      # Get correct bounding box from e.g. https://boundingbox.klokantech.com/
      - min_x=7.3369 # -> Albania | -180 -> World
      - min_y=48.1944 # -> Albania | -90  -> World
      - max_x=8.1059 # -> Albania |  180 -> World
      - max_y=48.9663 # -> Albania |  90  -> World
      - use_tiles_ignore_pbf=True
      - force_rebuild=False
      - force_rebuild_elevation=False
      - build_transit=Force

Thanks in advance for the help. Kind regards, Clément.

chrstnbwnkl commented 4 months ago

We have been getting many reports like this recently, it is very likely that your GTFS feed extends beyond the bounds of your OSM file. You can verify this by using a GTFS utility that converts your feed to a geojson file. In any case, using a much larger OSM extract should solve the problem until somebody has the time to fix this issue upstream

chrstnbwnkl commented 4 months ago

For reference: https://github.com/valhalla/valhalla/issues/4183