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

Only renders Luxemburg #392

Open
Eric-Arz opened this issue Oct 2, 2023 · 7 comments
Open

Only renders Luxemburg #392

Eric-Arz opened this issue Oct 2, 2023 · 7 comments

Comments

@Eric-Arz
Copy link

Eric-Arz commented Oct 2, 2023

Trying to get this working with a custom region and docker compose

---
services:
  tileserver:
    image: overv/openstreetmap-tile-server:latest
    command: run
    restart: always
    ports:
      - 8080:80
    environment:
      - DOWNLOAD_PBF=https://download.geofabrik.de/europe/xx/xx/xx-latest.osm.pbf
      - DOWNLOAD_POLY=https://download.geofabrik.de/europe/xx/xx/xx.poly
    volumes:
      - osm-data:/data/database/

volumes:
  osm-data:

i run docker compose first with "import" and then again with "run". Importing succeeds it writes stuff to the database. Server starts fine but, no matter what pbf i specify the only thing that gets rendered is Luxemburg.

It does download the correct files. Logs from import show:

2023-10-02 10:13:46 (14.3 MB/s) - ‘/data/region.osm.pbf’ saved [84021811/84021811]

@Istador
Copy link
Contributor

Istador commented Oct 2, 2023

I assume you tested it first without the environment variables, then added them and are still running the old version.

When using docker-compose (or docker compose) the command to start the service should be docker-compose up -d and not docker-compose start. Otherwise your changes to the docker-compose.yml will not be applied, but the old container with the old configuration will be started. Starting it with up -d will recreate the container with the new configuration (iff it changes in a way that requires recreating).

You can also do docker-compose down --volumes to delete the already created things.

@PeterRangelov
Copy link

I am experiencing the same issue after I run these commands:

docker volume create osm-data

docker run \
-v ~/path-to.osm.pbf:/data/region.osm.pbf \
-v osm-data:/data/database/ \
overv/openstreetmap-tile-server \
import
docker run \
 -p 8080:80 \
-v osm-data:/data/database \
-e ALLOW_CORS=enabled \
-d overv/openstreetmap-tile-server \
run

I see only Luxemburg data on the world map.

@acakojic
Copy link

acakojic commented Nov 1, 2023

same error.
It always render Letzebuerg.

@KIlian42
Copy link

same here, could someone solve it?

@Istador
Copy link
Contributor

Istador commented Nov 16, 2023

Works for me without issues. This is not a problem with the docker image.

Regardeless if I provide a PBF file as a volume, or let the image download it, in both cases it renders Hamburg (Germany) for me as it's suppose to and the Luxemburg region is empty.

I tested both usage scenarios right now in two clean linux VMs (Debian 11 based).

Mount as a volume:

$ wget  https://download.geofabrik.de/europe/germany/hamburg-latest.osm.pbf
$ docker  volume  create  osm-data
$ docker  run  --rm  -v osm-data:/data/database/  -v ./hamburg-latest.osm.pbf:/data/region.osm.pbf  overv/openstreetmap-tile-server  import
$ docker  run  --rm  -v osm-data:/data/database/  -d  -p 80:80  overv/openstreetmap-tile-server  run

Download URL as environment variable:

$ docker  volume  create  osm-data
$ docker  run  --rm  -v osm-data:/data/database/  -e DOWNLOAD_PBF=https://download.geofabrik.de/europe/germany/hamburg-latest.osm.pbf  overv/openstreetmap-tile-server  import
$ docker  run  --rm  -v osm-data:/data/database/  -d  -p 80:80  overv/openstreetmap-tile-server  run

The Luxemburg region is the default fallback region for the docker image to download, if neither a PBF file is present nor a DOWNLOAD_PBF environment variable is provided.

So if the image does download a Luxemburg PBF file, then there is an issue with one of these two things.

Problems with volume mounts are a common issue, especially on Windows machines. If in the import log it does download the Luxemburg PBF file, then the volume mount was not successful and the file doesn't exist for the container.

And when working with docker-compose the container needs to be recreated when changing anything in the service definition. (See my earlier comment here.)


If you need any support for your issues, please provide all the commands that you executed and the full import output.

@GerritJahn
Copy link

GerritJahn commented Mar 13, 2024

Hi - need to dig this up again.

I did follow the descriptions and entered:

docker volume create my-osm-data

docker run -v my-osm-data:/data/database/ -e DOWNLOAD_PBF=https://download.geofabrik.de/europe/germany/hessen-latest.osm.pbf overv/openstreetmap-tile-server  import

docker run -p 8085:80 -v my-osm-data:/data/database/ -d overv/openstreetmap-tile-server run

and voila - I can see.... Luxembourg! :-)

The import part seemed to download the data for Hessen (roughly 300MB), but the webpage still shows Luxembourg only.

Any idea?

EDT: for whatever reason - just restarted the image again. I can see now Hessen!

All good so far, did not really understand this, but works apparently as expected.
Sorry for the confusion...

@IngoKeen
Copy link

IngoKeen commented Jul 16, 2024

I followed the steps on Switch2Osm and also Luxembourg was rendered. Finally I found out that my container was based on an outdated docker image. After updating the image the behavior was as expected

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

7 participants