Skip to content

Commit

Permalink
generate type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Dec 6, 2023
1 parent 74643b0 commit 878f25b
Show file tree
Hide file tree
Showing 13 changed files with 1,183 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.onthegomap.planetiler.reader.osm.OsmRelationInfo;
import com.onthegomap.planetiler.util.Wikidata;
import java.util.List;
import java.util.Locale;
import java.util.function.Consumer;

/**
Expand Down Expand Up @@ -114,7 +115,9 @@ default List<VectorTile.Feature> postProcessLayerFeatures(String layer, int zoom
*
* @see <a href="https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md#metadata">MBTiles specification</a>
*/
String name();
default String name() {
return getClass().getSimpleName().toLowerCase(Locale.ROOT);
}

/**
* Returns the description of the generated tileset to put into {@link Mbtiles} metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,6 @@ private PlanetilerResults runWithReaderFeaturesProfile(
);
}

private PlanetilerResults runWithOsmElements(
Map<String, String> args,
List<OsmElement> features,
BiConsumer<SourceFeature, FeatureCollector> profileFunction
) throws Exception {
return run(
args,
(featureGroup, profile, config) -> processOsmFeatures(featureGroup, profile, config, features),
TestProfile.processSourceFeatures(profileFunction)
);
}

private PlanetilerResults runWithOsmElements(
Map<String, String> args,
List<OsmElement> features,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.onthegomap.planetiler.examples.OsmQaTiles;
import com.onthegomap.planetiler.examples.ToiletsOverlay;
import com.onthegomap.planetiler.examples.ToiletsOverlayLowLevelApi;
import com.onthegomap.planetiler.experimental.lua.GenerateLuaTypes;
import com.onthegomap.planetiler.experimental.lua.LuaMain;
import com.onthegomap.planetiler.experimental.lua.LuaValidator;
import com.onthegomap.planetiler.mbtiles.Verify;
Expand Down Expand Up @@ -46,6 +47,7 @@ public class Main {
entry("custom", ConfiguredMapMain::main),

entry("lua", LuaMain::main),
entry("lua-types", GenerateLuaTypes::main),

entry("generate-shortbread", bundledSchema("shortbread.yml")),
entry("shortbread", bundledSchema("shortbread.yml")),
Expand Down
Loading

0 comments on commit 878f25b

Please sign in to comment.