gis-ops / docker-valhalla

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

Getting Valhalla matrix error (No suitable edges near location) with every pair of coordinates i try #70

Closed mdanev closed 2 years ago

mdanev commented 2 years ago

I'm using vroom on top of valhalla but I'm getting Valhalla matrix error (No suitable edges near location) for every pair of coordinates in Finland i try. I downloaded the map of Finland from Geofabrik and followed the documentation for setting up the service. I checked a different issue on this but couldn't get it working. Below I'm pasting the valhalla.json config file, the input file and what i get as a response. valhalla.json

{
  "additional_data": {
    "elevation": "/data/valhalla/elevation/"
  },
  "httpd": {
    "service": {
      "drain_seconds": 28,
      "interrupt": "ipc:///tmp/interrupt",
      "listen": "tcp://*:8002",
      "loopback": "ipc:///tmp/loopback",
      "shutdown_seconds": 1
    }
  },
  "loki": {
    "actions": [
      "locate",
      "route",
      "height",
      "sources_to_targets",
      "optimized_route",
      "isochrone",
      "trace_route",
      "trace_attributes",
      "transit_available",
      "expansion",
      "centroid",
      "status"
    ],
    "logging": {
      "color": true,
      "file_name": "path_to_some_file.log",
      "long_request": 100.0,
      "type": "std_out"
    },
    "service": {
      "proxy": "ipc:///tmp/loki"
    },
    "service_defaults": {
      "heading_tolerance": 60,
      "minimum_reachability": 50,
      "node_snap_tolerance": 5,
      "radius": 0,
      "search_cutoff": 35000,
      "street_side_max_distance": 1000,
      "street_side_tolerance": 5
    },
    "use_connectivity": true
  },
  "meili": {
    "auto": {
      "search_radius": 50,
      "turn_penalty_factor": 200
    },
    "bicycle": {
      "turn_penalty_factor": 140
    },
    "customizable": [
      "mode",
      "search_radius",
      "turn_penalty_factor",
      "gps_accuracy",
      "interpolation_distance",
      "sigma_z",
      "beta",
      "max_route_distance_factor",
      "max_route_time_factor"
    ],
    "default": {
      "beta": 3,
      "breakage_distance": 2000,
      "geometry": false,
      "gps_accuracy": 5.0,
      "interpolation_distance": 10,
      "max_route_distance_factor": 5,
      "max_route_time_factor": 5,
      "max_search_radius": 100,
      "route": true,
      "search_radius": 50,
      "sigma_z": 4.07,
      "turn_penalty_factor": 0
    },
    "grid": {
      "cache_size": 100240,
      "size": 500
    },
    "logging": {
      "color": true,
      "file_name": "path_to_some_file.log",
      "type": "std_out"
    },
    "mode": "auto",
    "multimodal": {
      "turn_penalty_factor": 70
    },
    "pedestrian": {
      "search_radius": 50,
      "turn_penalty_factor": 100
    },
    "service": {
      "proxy": "ipc:///tmp/meili"
    },
    "verbose": false
  },
  "mjolnir": {
    "admin": "/home/martin/Projects/valhalla/valhalla_tiles/admins.sqlite",
    "data_processing": {
      "allow_alt_name": false,
      "apply_country_overrides": true,
      "infer_internal_intersections": true,
      "infer_turn_channels": true,
      "scan_tar": false,
      "use_admin_db": true,
      "use_direction_on_ways": false,
      "use_rest_area": false,
      "use_urban_tag": false
    },
    "global_synchronized_cache": false,
    "hierarchy": true,
    "id_table_size": 1300000000,
    "import_bike_share_stations": false,
    "include_bicycle": true,
    "include_construction": false,
    "include_driveways": true,
    "include_driving": true,
    "include_pedestrian": true,
    "logging": {
      "color": true,
      "file_name": "path_to_some_file.log",
      "type": "std_out"
    },
    "lru_mem_cache_hard_control": false,
    "max_cache_size": 1000000000,
    "max_concurrent_reader_users": 1,
    "reclassify_links": true,
    "shortcuts": true,
    "tile_dir": "/home/martin/Projects/valhalla/valhalla_tiles",
    "tile_extract": "/home/martin/Projects/valhalla/valhalla_tiles.tar",
    "timezone": "/home/martin/Projects/valhalla/valhalla_tiles/timezones.sqlite",
    "traffic_extract": "/data/valhalla/traffic.tar",
    "transit_dir": "/data/valhalla/transit",
    "use_lru_mem_cache": false,
    "use_simple_mem_cache": false
  },
  "odin": {
    "logging": {
      "color": true,
      "file_name": "path_to_some_file.log",
      "type": "std_out"
    },
    "markup_formatter": {
      "markup_enabled": false,
      "phoneme_format": "<TEXTUAL_STRING> (<span class=<QUOTES>phoneme<QUOTES>>/<VERBAL_STRING>/</span>)"
    },
    "service": {
      "proxy": "ipc:///tmp/odin"
    }
  },
  "service_limits": {
    "auto": {
      "max_distance": 5000000.0,
      "max_locations": 20,
      "max_matrix_distance": 400000.0,
      "max_matrix_location_pairs": 2500
    },
    "bicycle": {
      "max_distance": 500000.0,
      "max_locations": 50,
      "max_matrix_distance": 200000.0,
      "max_matrix_location_pairs": 2500
    },
    "bikeshare": {
      "max_distance": 500000.0,
      "max_locations": 50,
      "max_matrix_distance": 200000.0,
      "max_matrix_location_pairs": 2500
    },
    "bus": {
      "max_distance": 5000000.0,
      "max_locations": 50,
      "max_matrix_distance": 400000.0,
      "max_matrix_location_pairs": 2500
    },
    "centroid": {
      "max_distance": 200000.0,
      "max_locations": 5
    },
    "isochrone": {
      "max_contours": 4,
      "max_distance": 25000.0,
      "max_distance_contour": 200,
      "max_locations": 1,
      "max_time_contour": 120
    },
    "max_alternates": 2,
    "max_exclude_locations": 50,
    "max_exclude_polygons_length": 10000,
    "max_radius": 200,
    "max_reachability": 100,
    "max_timedep_distance": 500000,
    "motor_scooter": {
      "max_distance": 500000.0,
      "max_locations": 50,
      "max_matrix_distance": 200000.0,
      "max_matrix_location_pairs": 2500
    },
    "motorcycle": {
      "max_distance": 500000.0,
      "max_locations": 50,
      "max_matrix_distance": 200000.0,
      "max_matrix_location_pairs": 2500
    },
    "multimodal": {
      "max_distance": 500000.0,
      "max_locations": 50,
      "max_matrix_distance": 0.0,
      "max_matrix_location_pairs": 0
    },
    "pedestrian": {
      "max_distance": 250000.0,
      "max_locations": 50,
      "max_matrix_distance": 200000.0,
      "max_matrix_location_pairs": 2500,
      "max_transit_walking_distance": 10000,
      "min_transit_walking_distance": 1
    },
    "skadi": {
      "max_shape": 750000,
      "min_resample": 10.0
    },
    "status": {
      "allow_verbose": false
    },
    "taxi": {
      "max_distance": 5000000.0,
      "max_locations": 20,
      "max_matrix_distance": 400000.0,
      "max_matrix_location_pairs": 2500
    },
    "trace": {
      "max_alternates": 3,
      "max_alternates_shape": 100,
      "max_distance": 200000.0,
      "max_gps_accuracy": 100.0,
      "max_search_radius": 100.0,
      "max_shape": 16000
    },
    "transit": {
      "max_distance": 500000.0,
      "max_locations": 50,
      "max_matrix_distance": 200000.0,
      "max_matrix_location_pairs": 2500
    },
    "truck": {
      "max_distance": 5000000.0,
      "max_locations": 20,
      "max_matrix_distance": 400000.0,
      "max_matrix_location_pairs": 2500
    }
  },
  "statsd": {
    "port": 8125,
    "prefix": "valhalla"
  },
  "thor": {
    "clear_reserved_memory": false,
    "extended_search": false,
    "logging": {
      "color": true,
      "file_name": "path_to_some_file.log",
      "long_request": 110.0,
      "type": "std_out"
    },
    "max_reserved_labels_count": 1000000,
    "service": {
      "proxy": "ipc:///tmp/thor"
    },
    "source_to_target_algorithm": "select_optimal"
  }
}

The input file i give to vroom:

{
    "vehicles": [
        {
            "id": 1,
            "start": [
                60.21226,
                24.95008
            ],
            "capacity": [
                4
            ],
            "skills": [
                1,
                14
            ],
            "time_window": [
                1600416000,
                1600430400
            ],
            "profile": "auto"
        }
    ],
    "jobs": [
        {
            "id": 1,
            "service": 300,
            "delivery": [
                1
            ],
            "location": [
                60.21278,
                24.94698
            ],
            "skills": [
                1
            ],
            "time_windows": [
                [
                    1600419600,
                    1600423200
                ]
            ]
        },
        {
            "id": 2,
            "service": 300,
            "pickup": [
                1
            ],
            "location": [
                60.21082,
                24.94655
            ],
            "skills": [
                1
            ]
        }
    ]
}

Logs:

valhalla_latest  | INFO: Successfully built files: /custom_files/finland-latest.osm.pbf
valhalla_latest  | INFO: Hashing files: /custom_files/finland-latest.osm.pbf
valhalla_latest  | INFO: Hashing file: /custom_files/finland-latest.osm.pbf
valhalla_latest  | ca6e31b0bb4cf4423d99ff04eec9f322400d07a5f43d113547d25d703ec3eeaa
valhalla_latest  | 2022-07-21 14:57:36,491  INFO: Finished tarring 1471 tiles to /custom_files/valhalla_tiles.tar
valhalla_latest  | WARNING: User valhalla is running with sudo privileges. Try building the image with a host user's UID & GID.
valhalla_latest  | INFO: Found config file. Starting valhalla service!
valhalla_latest  | 2022/07/21 14:57:39.054865 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.055854 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.056645 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.056656 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.056661 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.056667 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.057278 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.057311 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.057318 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.058125 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.058223 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.058230 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.058895 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.058915 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.058924 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.058931 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.058935 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.058938 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.062706 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.062736 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.062757 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.062765 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.062765 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.062776 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.063832 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.063858 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.063863 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.064383 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.064412 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.064419 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.064751 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.064780 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.064785 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.066278 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.066308 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.066315 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.069512 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.069573 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.069581 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.070516 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.070572 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.070594 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.071330 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.071415 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.071424 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 2022/07/21 14:57:39.075427 [INFO] Tile extract successfully loaded with tile count: 1471
valhalla_latest  | 2022/07/21 14:57:39.075474 [WARN] (stat):  No such file or directory
valhalla_latest  | 2022/07/21 14:57:39.075478 [WARN] Traffic tile extract could not be loaded
valhalla_latest  | 0 2022/07/21 14:58:29.991582 GET /sources_to_targets?json={"sources":[{"lon":60.212260,"lat":24.950080},{"lon":60.212780,"lat":24.946980},{"lon":60.210820,"lat":24.946550}],"targets":[{"lon":60.212260,"lat":24.950080},{"lon":60.212780,"lat":24.946980},{"lon":60.210820,"lat":24.946550}],"costing":"auto"} HTTP/1.1
valhalla_latest  | 2022/07/21 14:58:29.991695 [INFO] Got Loki Request 0
valhalla_latest  | 2022/07/21 14:58:29.994155 [WARN] 400::No suitable edges near location request_id=0
valhalla_latest  | 0 2022/07/21 14:58:29.994282 400 247
vroom_http       | Thu, 21 Jul 2022 14:58:29 GMT: [Error] Valhalla matrix error (No suitable edges near location).
vroom_http       | 
nilsnolde commented 2 years ago

Lat lon..