Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSM file correctly tiled, yet getting "No data found for location" #4726

Open
sayan-mitra opened this issue May 12, 2024 · 2 comments
Open

Comments

@sayan-mitra
Copy link

sayan-mitra commented May 12, 2024

The bbox from the status api with verbose on correctly shows this https://download.geofabrik.de/asia/india.html
(Attaching the response file)
bbox.json

But when I issue the below curl by picking any coordinate inside the bbox (even if I directly use a coordinate from the above), getting a 400 response.


curl --location 'http://localhost:8002/locate' \
--header 'Content-Type: application/json' \
--data '{
    "verbose": true,
    "locations": [
        {
            "lat": 26,
            "lon":  69.25
        }
    ],
    "costing": "bicycle",
    "costing_options": {
        "bicycle": {
            "bicycle_type": "road"
        }
    },
    "directions_options": {
        "units": "miles"
    },
    "id": "12abc3afe23984fe"
}'

[
    {
        "reason": "No data found for location",
        "input_lon": 69.250000,
        "nodes": null,
        "input_lat": 26.000000,
        "edges": null
    }
]

Have used the default config / env mentioned here https://github.com/gis-ops/docker-valhalla

docker logs:

2024/05/11 21:48:52.457432 [INFO] Finished with 125860 shortcuts superseding 1824444 edges, average ~14 edges per shortcut
2024/05/11 21:48:52.461873 [WARN] Elevation storage directory does not exist
2024/05/11 21:48:52.724772 [INFO] Adding complex turn restrictions at level 2
2024/05/11 21:51:50.015143 [INFO] --Forward restrictions added: 20
2024/05/11 21:51:50.015764 [INFO] --Reverse restrictions added: 19
2024/05/11 21:51:50.077916 [INFO] Adding complex turn restrictions at level 1
2024/05/11 21:52:16.746075 [INFO] --Forward restrictions added: 123
2024/05/11 21:52:16.746148 [INFO] --Reverse restrictions added: 142
2024/05/11 21:52:17.056312 [INFO] Adding complex turn restrictions at level 0
2024/05/11 21:52:28.167055 [INFO] --Forward restrictions added: 378
2024/05/11 21:52:28.167112 [INFO] --Reverse restrictions added: 360
2024/05/11 21:52:28.352262 [INFO] Finished
2024/05/11 21:52:28.355478 [INFO] Validating, finishing and binning tiles...
2024/05/11 21:57:52.953031 [INFO] Finished
2024/05/11 21:57:52.954120 [INFO] Binning inter-tile edges...
2024/05/11 21:58:36.494922 [INFO] Finished
2024/05/11 21:58:36.501367 [WARN] Possible duplicates at level: 0 = 144
2024/05/11 21:58:36.501537 [WARN] Possible duplicates at level: 1 = 174
2024/05/11 21:58:36.501558 [WARN] Possible duplicates at level: 2 = 4
2024/05/11 21:58:38.045322 [INFO] Cleaning up temporary *.bin files within /custom_files/valhalla_tiles/
INFO: Successfully built files: /custom_files/india-latest.osm.pbf
INFO: Hashing files: /custom_files/india-latest.osm.pbf
INFO: Hashing file: /custom_files/india-latest.osm.pbf
61fab87b6696db92e552551e66eda72f1adf62f8d87f04f2df7a6ed79860c7fb
WARNING: User valhalla is running with sudo privileges. Try building the image with a host user's UID & GID.
INFO: Found config file. Starting valhalla service!
2024/05/11 21:59:41.136957 [INFO] Tile extract successfully loaded with tile count: 4883
2024/05/11 21:59:41.142285 [INFO] Tile extract successfully loaded with tile count: 4883
2024/05/11 21:59:41.148349 [INFO] Tile extract successfully loaded with tile count: 4883
2024/05/11 21:59:41.153692 [WARN] (stat): /custom_files/traffic.tar No such file or directory
2024/05/11 21:59:41.153785 [WARN] Traffic tile extract could not be loaded
2024/05/11 21:59:41.153793 [WARN] (stat): /custom_files/traffic.tar No such file or directory
2024/05/11 21:59:41.153812 [WARN] Traffic tile extract could not be loaded
2024/05/11 21:59:41.154034 [WARN] (stat): /custom_files/traffic.tar No such file or directory
2024/05/11 21:59:41.154051 [WARN] Traffic tile extract could not be loaded
2024/05/11 21:59:41.166263 [INFO] Tile extract successfully loaded with tile count: 4883
2024/05/11 21:59:41.167725 [WARN] (stat): /custom_files/traffic.tar No such file or directory
2024/05/11 21:59:41.167744 [WARN] Traffic tile extract could not be loaded
2024/05/11 21:59:41.176061 [INFO] Tile extract successfully loaded with tile count: 4883
2024/05/11 21:59:41.178320 [WARN] (stat): /custom_files/traffic.tar No such file or directory
2024/05/11 21:59:41.178400 [WARN] Traffic tile extract could not be loaded
2024/05/11 21:59:41.183370 [INFO] Tile extract successfully loaded with tile count: 4883
2024/05/11 21:59:41.185231 [WARN] (stat): /custom_files/traffic.tar No such file or directory
2024/05/11 21:59:41.185311 [WARN] Traffic tile extract could not be loaded

Any help/insights will be much appreciated. Thanks

@ImreSamu
Copy link
Contributor

The bbox from the status api with verbose on correctly shows this https://download.geofabrik.de/asia/india.html
But when I issue the below curl by picking any coordinate inside the bbox (even if I directly use a coordinate from the above),

imho:
The coordinate you're trying to use may be in Pakistan,
which is outside the boundaries of India ( india-latest.osm.pbf ).

You can confirm this by checking here:
https://nominatim.openstreetmap.org/ui/search.html?q=26.000000+%2C+69.250000

If you're interested in a broader area beyond just India,
you might want to extract the specific region from a larger Geofabrik file,
such as from https://download.geofabrik.de/asia.html

@ImreSamu
Copy link
Contributor

this is the visualisation of Geofabrik India poly ( https://download.geofabrik.de/asia/india.poly )
with your coordinate (lat: 26, lon: 69.25).
image

It's important to note that a random coordinate within India might not always work because the india.poly file includes a significant portion of ocean, and the default "search_cutoff" in the configuration file is approximately 35 km.

If you encounter similar issues, please check the OpenStreetMap data for the area. It's possible that no roads have been recorded in that area yet, and if so, these need to be added to OpenStreetMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants