diff --git a/planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java b/planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java index b68bf33ed3..4221fa6869 100644 --- a/planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java +++ b/planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java @@ -951,7 +951,7 @@ void testOsmPoint() throws Exception { feature(newPoint(128, 128), Map.of( "attr", "value", "name", "name value" - )).withId(1) + )).withId(11) ) ), results.tiles); } @@ -1040,7 +1040,7 @@ void testOsmLine() throws Exception { feature(newLineString(128, 128, 192, 192), Map.of( "attr", "value", "name", "name value" - )).withId(3) + )).withId(32) ) ), results.tiles); } @@ -1166,7 +1166,7 @@ record TestRelationInfo(long id, String name) implements OsmRelationInfo {} "attr", "value", "name", "name value", "relname", "rel name" - )).withId(17) + )).withId(173) ) ), results.tiles); } diff --git a/planetiler-core/src/test/java/com/onthegomap/planetiler/TestUtils.java b/planetiler-core/src/test/java/com/onthegomap/planetiler/TestUtils.java index e58b06e4c5..961b7c52c3 100644 --- a/planetiler-core/src/test/java/com/onthegomap/planetiler/TestUtils.java +++ b/planetiler-core/src/test/java/com/onthegomap/planetiler/TestUtils.java @@ -279,7 +279,9 @@ public static Map> getTileMap(ReadableTileArc case UNKNOWN -> throw new IllegalArgumentException("cannot decompress \"UNKNOWN\""); }; var decoded = VectorTile.decode(bytes).stream() - .map(feature -> feature(decodeSilently(feature.geometry()), feature.layer(), feature.tags())).toList(); + .map(feature -> feature(decodeSilently(feature.geometry()), feature.layer(), + feature.tags()).withId(feature.id())) + .toList(); tiles.put(tile.coord(), decoded); } return tiles; diff --git a/planetiler-examples/src/test/java/com/onthegomap/planetiler/examples/OsmQaTilesTest.java b/planetiler-examples/src/test/java/com/onthegomap/planetiler/examples/OsmQaTilesTest.java index 5faccb6e8b..da4ea44a31 100644 --- a/planetiler-examples/src/test/java/com/onthegomap/planetiler/examples/OsmQaTilesTest.java +++ b/planetiler-examples/src/test/java/com/onthegomap/planetiler/examples/OsmQaTilesTest.java @@ -86,7 +86,6 @@ public OsmElement originalElement() { } @Test - @Disabled /* TODO: Fix failing test */ void integrationTest(@TempDir Path tmpDir) throws Exception { Path dbPath = tmpDir.resolve("output.mbtiles"); OsmQaTiles.run(Arguments.of( @@ -109,7 +108,7 @@ void integrationTest(@TempDir Path tmpDir) throws Exception { "public_transport", "stop_position", "@type", "node", "@version", 4L, - "@id", 1699777833L + "@id", 16997778331L ), GeoUtils.WORLD_LAT_LON_BOUNDS, 1, Point.class); TestUtils .assertNumFeatures(mbtiles, "osm", 12, Map.of( @@ -122,7 +121,7 @@ void integrationTest(@TempDir Path tmpDir) throws Exception { "wikidata", "Q45240", "@type", "relation", "@version", 9L, - "@id", 5986438L + "@id", 59864383L ), GeoUtils.WORLD_LAT_LON_BOUNDS, 1, Polygon.class); TestUtils .assertNumFeatures(mbtiles, "osm", 12, Map.of( @@ -133,7 +132,7 @@ void integrationTest(@TempDir Path tmpDir) throws Exception { "lanes", "2", "@type", "way", "@version", 5L, - "@id", 166009791L + "@id", 1660097912L ), GeoUtils.WORLD_LAT_LON_BOUNDS, 1, LineString.class); } }