diff --git a/src/main/java/org/openmaptiles/OpenMapTilesProfile.java b/src/main/java/org/openmaptiles/OpenMapTilesProfile.java index cd264ce5..5b70625a 100644 --- a/src/main/java/org/openmaptiles/OpenMapTilesProfile.java +++ b/src/main/java/org/openmaptiles/OpenMapTilesProfile.java @@ -60,8 +60,7 @@ public OpenMapTilesProfile(Planetiler runner) { } public OpenMapTilesProfile(Translations translations, PlanetilerConfig config, Stats stats) { - List onlyLayers = config.arguments().getList("only_layers", "Include only certain layers", List.of()); - List excludeLayers = config.arguments().getList("exclude_layers", "Exclude certain layers", List.of()); + super(config); // register release/finish/feature postprocessor/osm relationship handler methods... List layers = new ArrayList<>(); @@ -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) {