wiktorn / Overpass-API

Overpass API docker image
MIT License
136 stars 48 forks source link

A complete offline overpass API without update and diff checking #101

Open curtis18 opened 1 year ago

curtis18 commented 1 year ago

I downloaded an osm file and can the application perform a complete offline overpass API without update and diff checking? As I want to compare the data in temporal change, updating the osm file will affect the analysis. Thank you.

What I tried is to run the following command

docker run -itd -p 80:80 -e DOWNLOAD_PBF=file:///osm-data/egypt-latest.osm.pbf -v /mnt/d/docker/osm:/osm-data --name overpass wiktorn/overpass-api:0.7.56.4

wiktorn commented 1 year ago

Looks good to me, what was the issue with this approach?

roiDaniela commented 1 year ago

Hi @wiktorn I tried to do the same but get this error --2022-12-14 14:04:52-- (try:12) http://dev.overpass-api.de/api_drolbr//trigger_clone Connecting to dev.overpass-api.de (dev.overpass-api.de)|**|:80... failed: Connection refused. Connecting to dev.overpass-api.de (dev.overpass-api.de)|**|:80... failed: Cannot assign requested address.

thanks

wiktorn commented 1 year ago

Looks like you're starting it in clone mode. Please read again docs. You need to provide proper mode and planet URL.

geocoderEU commented 11 months ago

Hi @wiktorn I've tried the same as @curtis18. I want to load the planet data from a pbf-file that is located on a docker volume, that my overpass-container mounts. Unfortunately the creation of the container exits after doing nothing with a cURL-error "URL using bad/illegal format or missing URL".

Seems strange, because i used the same parameters as @curtis18 for loading the planet data:

docker run \
    --mount type=bind,source=/var/lib/docker/volumes/data/,target=/data \
    -e OVERPASS_META=yes \
    -e OVERPASS_MODE=init \
    -e DOWNLOAD_PBF=file:///data/baden-wuerttemberg-latest.osm.pbf \
    -e OVERPASS_RULES_LOAD=10 \
    -e OVERPASS_COMPRESSION=gz \
    -e OVERPASS_UPDATE_SLEEP=3600 \
    -e OVERPASS_PLANET_PREPROCESS='mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf' \
    -v /big/docker/overpass_db/:/db \
    -p 12347:80 \
    -i -t -d \
    --name docker.overpass_api.service wiktorn/overpass-api:latest

Anything that i am overseeing?

wiktorn commented 11 months ago

Your call looks OK, the only thing that might not match. I gave few tries to curl, and the only way to get bad URL I found is to skip one of the /, like:

$ curl file://test/
curl: (3) URL using bad/illegal format or missing URL

Remember, that you need three slashes after colon.

I have no other ideas what can be wrong here.

geocoderEU commented 11 months ago

Thanks for checking my issue out and your testing. I guess the reason is the path...couldn't figure it out, but working on it. If i find a solution, i'll post the solution here.