mirror of
https://github.com/cfpwastaken/planetiler-openmaptiles.git
synced 2026-02-04 20:41:09 +00:00
Address warnings and deprecations (#173)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user