Address warnings and deprecations (#173)

This commit is contained in:
Michael Barry
2024-06-17 05:22:41 -04:00
committed by GitHub
parent 3c7e26da08
commit 4469a50ad9
16 changed files with 65 additions and 66 deletions

View File

@@ -43,6 +43,7 @@ import static org.openmaptiles.util.Utils.*;
import com.onthegomap.planetiler.FeatureCollector;
import com.onthegomap.planetiler.FeatureMerge;
import com.onthegomap.planetiler.ForwardingProfile;
import com.onthegomap.planetiler.VectorTile;
import com.onthegomap.planetiler.config.PlanetilerConfig;
import com.onthegomap.planetiler.expression.MultiExpression;
@@ -93,8 +94,8 @@ public class Transportation implements
Tables.OsmShipwayLinestring.Handler,
Tables.OsmHighwayPolygon.Handler,
OpenMapTilesProfile.NaturalEarthProcessor,
OpenMapTilesProfile.FeaturePostProcessor,
OpenMapTilesProfile.OsmRelationPreprocessor,
ForwardingProfile.LayerPostProcesser,
ForwardingProfile.OsmRelationPreprocessor,
OpenMapTilesProfile.IgnoreWikidata {
/*
@@ -676,16 +677,16 @@ public class Transportation implements
// TODO merge preserving oneway instead ignoring
int onewayId = 1;
for (var item : items) {
var oneway = item.attrs().get(Fields.ONEWAY);
var oneway = item.tags().get(Fields.ONEWAY);
if (oneway instanceof Number n && ONEWAY_VALUES.contains(n.intValue())) {
item.attrs().put(LIMIT_MERGE_TAG, onewayId++);
item.tags().put(LIMIT_MERGE_TAG, onewayId++);
}
}
var merged = FeatureMerge.mergeLineStrings(items, minLength, tolerance, BUFFER_SIZE);
for (var item : merged) {
item.attrs().remove(LIMIT_MERGE_TAG);
item.tags().remove(LIMIT_MERGE_TAG);
}
return merged;
}