Skip to content

Commit

Permalink
use dependsOnLayer() ... (#189)
Browse files Browse the repository at this point in the history
* use dependsOnLayer() ...

... to make sure caresAboutLayer() properly handles the situation when
'transportation_name' depends on 'transportation' hence:

- when 'transportation' is exluded, then also 'transportation_name'
  needs to be also treated as exluded
- when 'transportation' is included (e.g. mentioned in --only-layers)
  then 'transportation_name' needs to be also treated as included

* dependsOnLayer() adjusted to match changes in the planetiler-core
  • Loading branch information
phanecak-maptiler authored Aug 27, 2024
1 parent f35a768 commit bf26194
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/openmaptiles/OpenMapTilesProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.onthegomap.planetiler.util.Translations;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import org.openmaptiles.addons.ExtraLayers;
import org.openmaptiles.generated.OpenMapTilesSchema;
Expand Down Expand Up @@ -141,6 +142,11 @@ public OpenMapTilesProfile(Translations translations, PlanetilerConfig config, S
}
}

@Override
public Map<String, List<String>> dependsOnLayer() {
return Map.of("transportation_name", List.of("transportation"));
}

/** Returns the imposm3 table row constructors that match an input element's tags. */
public List<MultiExpression.Match<RowDispatch>> getTableMatches(SourceFeature input) {
return osmMappings.getMatchesWithTriggers(input);
Expand Down

0 comments on commit bf26194

Please sign in to comment.