atlas-generator icon indicating copy to clipboard operation
atlas-generator copied to clipboard

Update boundary file downloaded by `downloadBoundaries` task

Open tsmock opened this issue 3 years ago • 2 comments

Right now, downloadBoundaries gets "https://dl.dropboxusercontent.com/s/5a5q6tro5lx4m07/world_boundaries_osm_20171013.txt.gz". This is (a) out of date and (b) in the wrong format.

When using ./gradlew run, the task errors out with the following:

org.openstreetmap.atlas.exception.CoreException: Job Atlas Generator failed.
        at org.openstreetmap.atlas.generator.tools.spark.SparkJob.onRun(SparkJob.java:204)
        at org.openstreetmap.atlas.utilities.runtime.Command.execute(Command.java:338)
        at org.openstreetmap.atlas.utilities.runtime.Command.run(Command.java:282)
        at org.openstreetmap.atlas.generator.AtlasGenerator.main(AtlasGenerator.java:63)
Caused by: org.openstreetmap.atlas.exception.CoreException: Invalid country boundary text file format.
        at org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap.readFromPlainText(CountryBoundaryMap.java:730)
        at org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap.fromPlainText(CountryBoundaryMap.java:189)
        at org.openstreetmap.atlas.geography.boundary.CountryBoundaryMapArchiver.read(CountryBoundaryMapArchiver.java:69)
        at org.openstreetmap.atlas.generator.AtlasGenerator.boundaries(AtlasGenerator.java:393)
        at org.openstreetmap.atlas.generator.AtlasGenerator.start(AtlasGenerator.java:157)
        at org.openstreetmap.atlas.generator.tools.spark.SparkJob.onRun(SparkJob.java:197)
        ... 3 more
Caused by: java.lang.ClassCastException: class org.locationtech.jts.geom.MultiPolygon cannot be cast to class org.locationtech.jts.geom.Polygon (org.locationtech.jts.geom.MultiPolygon and org.locationtech.jts.geom.Polygon are in unnamed module of loader 'app')
        at org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap.readFromPlainText(CountryBoundaryMap.java:723)
        ... 8 more

tsmock avatar Jan 04 '22 18:01 tsmock

Hi @tsmock good catch! This needs an update.

matthieun avatar Jan 04 '22 18:01 matthieun

I am also facing this issue, any workaround or any other link from where we can pull the OSM world boundary file?

kalekarnn avatar May 11 '22 14:05 kalekarnn