openstreetmap-tile-server icon indicating copy to clipboard operation
openstreetmap-tile-server copied to clipboard

Only renders Luxemburg

Open Eric-Arz opened this issue 1 year ago • 7 comments

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]

Eric-Arz avatar Oct 02 '23 10:10 Eric-Arz

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.

Istador avatar Oct 02 '23 16:10 Istador

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.

PeterRangelov avatar Oct 04 '23 20:10 PeterRangelov

same error. It always render Letzebuerg.

acakojic avatar Nov 01 '23 08:11 acakojic

same here, could someone solve it?

KIlian42 avatar Nov 16 '23 18:11 KIlian42

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.

Istador avatar Nov 16 '23 20:11 Istador

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...

GerritJahn avatar Mar 13 '24 12:03 GerritJahn

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

IngoKeen avatar Jul 16 '24 18:07 IngoKeen