Skip to content

Commit

Permalink
Use super(config) and caresAboutLayer() in OpenMapTilesProfile ... (#182
Browse files Browse the repository at this point in the history
)

use super(config) and caresAboutLayer() in OpenMapTilesProfile ...

... to make sure we're working with onlyLayers and excludeLayers in
OpenMapTilesProfile and ForwardingProfile in consistent manner
  • Loading branch information
phanecak-maptiler authored Aug 6, 2024
1 parent 44b8f98 commit 0893b1e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/openmaptiles/OpenMapTilesProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ public OpenMapTilesProfile(Planetiler runner) {
}

public OpenMapTilesProfile(Translations translations, PlanetilerConfig config, Stats stats) {
List<String> onlyLayers = config.arguments().getList("only_layers", "Include only certain layers", List.of());
List<String> excludeLayers = config.arguments().getList("exclude_layers", "Exclude certain layers", List.of());
super(config);

// register release/finish/feature postprocessor/osm relationship handler methods...
List<Handler> layers = new ArrayList<>();
Expand All @@ -71,7 +70,7 @@ public OpenMapTilesProfile(Translations translations, PlanetilerConfig config, S
var extraLayers = ExtraLayers.create(translations, config, stats);
var allLayers = Stream.concat(omtLayers.stream(), extraLayers.stream()).toList();
for (Layer layer : allLayers) {
if ((onlyLayers.isEmpty() || onlyLayers.contains(layer.name())) && !excludeLayers.contains(layer.name())) {
if (caresAboutLayer(layer)) {
layers.add(layer);
registerHandler(layer);
if (layer instanceof TransportationName transportationName) {
Expand Down

0 comments on commit 0893b1e

Please sign in to comment.