Skip to content

Commit

Permalink
Add power
Browse files Browse the repository at this point in the history
  • Loading branch information
wipfli committed Mar 11, 2022
1 parent 0a06479 commit 14f16fa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ public static void main(String[] args) throws IOException {
Arguments arguments = Arguments.fromArgsOrConfigFile(args);
PlanetilerConfig planetilerConfig = PlanetilerConfig.from(arguments);
String tag = arguments.getString("tag", "openmaptiles tag to use", "v3.12.2");
String base = "https://raw.githubusercontent.com/openmaptiles/openmaptiles/" + tag + "/";

String base = "https://raw.githubusercontent.com/wipfli/openmaptiles/power/";
// start crawling from openmaptiles.yaml
// then crawl schema from each layers/<layer>/<layer>.yaml file that it references
// then crawl table definitions from each layers/<layer>/mapping.yaml file that the layer references
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.onthegomap.planetiler.basemap.layers;

import com.onthegomap.planetiler.FeatureCollector;
import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema;
import com.onthegomap.planetiler.basemap.generated.Tables;
import com.onthegomap.planetiler.config.PlanetilerConfig;
import com.onthegomap.planetiler.stats.Stats;
import com.onthegomap.planetiler.util.Translations;

public class Power implements
OpenMapTilesSchema.Power,
Tables.OsmPowerLinestring.Handler {

public Power(Translations translations, PlanetilerConfig config, Stats stats) {}

@Override
public void process(Tables.OsmPowerLinestring element, FeatureCollector features) {
features.line(LAYER_NAME)
.setMinZoom(10)
.setAttr(Fields.POWER, element.power());
}
}

0 comments on commit 14f16fa

Please sign in to comment.