pull/827/head
Mike Barry 2024-03-03 21:15:20 -05:00
rodzic b38b8b37a1
commit a33f3b8327
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -284,10 +284,10 @@ public class FeatureCollector implements Iterable<FeatureCollector.Feature> {
if (source instanceof OsmSourceFeature osmSourceFeature) { if (source instanceof OsmSourceFeature osmSourceFeature) {
long osmId = osmSourceFeature.originalElement().id(); long osmId = osmSourceFeature.originalElement().id();
this.id = switch (osmSourceFeature.originalElement()) { this.id = switch (osmSourceFeature.originalElement()) {
case OsmElement.Node node -> node.id() * 10 + 1; case OsmElement.Node node -> node.id() * 3;
case OsmElement.Way way -> way.id() * 10 + 2; case OsmElement.Way way -> way.id() * 3 + 1;
case OsmElement.Relation relation -> relation.id() * 10 + 3; case OsmElement.Relation relation -> relation.id() * 3 + 2;
default -> osmId * 10; default -> osmId;
}; };
} else { } else {
this.id = source.id(); this.id = source.id();

Wyświetl plik

@ -875,7 +875,7 @@ class PlanetilerTests {
feature(newPoint(128, 128), Map.of( feature(newPoint(128, 128), Map.of(
"attr", "value", "attr", "value",
"name", "name value" "name", "name value"
)).withId(11) )).withId(3)
) )
), results.tiles); ), results.tiles);
} }
@ -964,7 +964,7 @@ class PlanetilerTests {
feature(newLineString(128, 128, 192, 192), Map.of( feature(newLineString(128, 128, 192, 192), Map.of(
"attr", "value", "attr", "value",
"name", "name value" "name", "name value"
)).withId(32) )).withId(3 * 3 + 1)
) )
), results.tiles); ), results.tiles);
} }
@ -1089,7 +1089,7 @@ class PlanetilerTests {
"attr", "value", "attr", "value",
"name", "name value", "name", "name value",
"relname", "rel name" "relname", "rel name"
)).withId(173) )).withId(17 * 3 + 2)
) )
), results.tiles); ), results.tiles);
} }