protomaps / basemaps

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

make monaco fails on first run #227

Closed ted-piotrowski closed 5 months ago

ted-piotrowski commented 6 months ago
  1. Clone a fresh copy of the project
  2. make clean
  3. make monaco
Exception in thread "main" java.lang.IllegalArgumentException: java.nio.file.NoSuchFileException: data/sources/natural_earth_vector.sqlite.zip
    at com.protomaps.basemap.feature.NaturalEarthDb.fromSqlite(NaturalEarthDb.java:174)
    at com.protomaps.basemap.Basemap.run(Basemap.java:136)
    at com.protomaps.basemap.Basemap.main(Basemap.java:110)
Caused by: java.nio.file.NoSuchFileException: data/sources/natural_earth_vector.sqlite.zip
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:166)
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:125)
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:120)
    at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:528)
    at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:475)
    at com.protomaps.basemap.feature.NaturalEarthDb.fromSqlite(NaturalEarthDb.java:119)

I believe this is related to this commit: https://github.com/protomaps/basemaps/commit/58d859ed3ed4652f860f53281835a574af3f5018

I managed to get it working by reintroducing the following line back to Basemap.java

Downloader.create(planetiler.config()).add("ne", neUrl, nePath).run()

Happy to make a PR if this is the right fix. Not sure why it's not failing for others but maybe they have the natural earth data predownloaded from a previous run so the Downloader was not necessary.

bdon commented 5 months ago

Thanks for catching this, can you open the PR as suggested?