protomaps / basemaps

Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
https://maps.protomaps.com/
Other
347 stars 44 forks source link

java.lang.IllegalStateException when following usage instructions in README #115

Closed wolfskaempf closed 1 year ago

wolfskaempf commented 1 year ago

Steps for reproduction

Environment

Step by step

  1. Clone this repository.
git clone https://github.com/protomaps/basemaps.git
  1. change to the tiles directory, download dependencies and compile the JAR:
cd basemaps/tiles
mvn clean package
  1. Download and generate monaco.pmtiles in the current directory:
java -jar target/*-with-deps.jar --download --force --area=monaco

Observed behaviour

The process stops with the following exception.

Exception in thread "main" java.lang.IllegalStateException: Error getting size of https://download.geofabrik.de/europe/monaco-latest.osm.pbf
        at com.onthegomap.planetiler.util.Downloader.run(Downloader.java:186)
        at com.onthegomap.planetiler.Planetiler.download(Planetiler.java:903)
        at com.onthegomap.planetiler.Planetiler.run(Planetiler.java:716)
        at com.protomaps.basemap.Basemap.run(Basemap.java:145)
        at com.protomaps.basemap.Basemap.main(Basemap.java:108)
Caused by: java.util.concurrent.TimeoutException
        at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
        at com.onthegomap.planetiler.util.Downloader.run(Downloader.java:180)
        ... 4 more

Expected behaviour

A monaco.pmtiles file is generated.

Thank you

Thank you for making protomaps! I'm so far really enjoying building maps with it with the precompiled .pmtiles files. I'm currently working on making my own tilesets using this repository.

bdon commented 1 year ago

Can you reproduce this now? It looks like an intermittent issue with the PBF download source.

Also, is there a particular reason you need to inside Docker instead of a JVM on the host machine? Does your container have network access?

wolfskaempf commented 1 year ago

@bdon Thank you for your response. Without changing anything, it now works as expected, so I think your assessment is correct.

As for Docker: I wanted to make sure this is not a problem with my local setup of Java and Maven, so running it in a known-good configuration was a shortcut to ensure it's not something I need to fix by changing some Java or Maven configuration on my machine.