-o everything.osm.pbf
osmium renumber everything.osm.pbf -o planet.osm.pbf
```
+
NOTE: you need at least `admin.osc.bz2` for the `boundary` layer to show. This takes about 2.5 hours and needs as much
RAM as the `planet.osm.pbf` size.
diff --git a/README.md b/README.md
index 45a8f8ea..494fd024 100644
--- a/README.md
+++ b/README.md
@@ -118,7 +118,7 @@ See the [planetiler-examples](planetiler-examples) project.
Some example runtimes (excluding downloading resources):
-| Input | Profile | Machine | Time | mbtiles size | Logs |
+| Input | Profile | Machine | Time | mbtiles size | Logs |
|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|----------------------------------------------------------|---------------------------|--------------|--------------------------------------------------------------------------------------------------------------------------------|
| s3://osm-pds/2021/planet-211011.osm.pbf (65GB) | Basemap | DO 16cpu 128GB | 3h9m cpu:42h1m avg:13.3 | 99GB | [logs](planet-logs/v0.1.0-planet-do-16cpu-128gb.txt), [VisualVM Profile](planet-logs/v0.1.0-planet-do-16cpu-128gb.nps) |
| [Daylight Distribution v1.6](https://daylightmap.org/2021/09/29/daylight-v16-released.html) with ML buildings and admin boundaries (67GB) | Basemap | DO 16cpu 128GB | 3h13m cpu:43h40m avg:13.5 | 101GB | [logs](planet-logs/v0.1.0-daylight-do-16cpu-128gb.txt) |
diff --git a/eclipse-formatter.xml b/eclipse-formatter.xml
new file mode 100644
index 00000000..5fa6d159
--- /dev/null
+++ b/eclipse-formatter.xml
@@ -0,0 +1,480 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java
index bcf1107d..ada8a34a 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java
@@ -27,15 +27,15 @@ import java.util.List;
*
* Layer implementations extend these interfaces to subscribe to elements from different sources:
*
- * - {@link LakeCenterlineProcessor}
- * - {@link NaturalEarthProcessor}
- * - {@link OsmWaterPolygonProcessor}
- * - {@link OsmAllProcessor} to process every OSM feature
- * - {@link OsmRelationPreprocessor} to process every OSM relation during first pass through OSM file
- * - A {@link Tables.RowHandler} implementation in {@code Tables.java} to process input features filtered and parsed
- * according to the imposm3 mappings defined in the OpenMapTiles schema. Each element corresponds to a row in the
- * table that imposm3 would have generated, with generated methods for accessing the data that would have been in each
- * column
+ * - {@link LakeCenterlineProcessor}
+ * - {@link NaturalEarthProcessor}
+ * - {@link OsmWaterPolygonProcessor}
+ * - {@link OsmAllProcessor} to process every OSM feature
+ * - {@link OsmRelationPreprocessor} to process every OSM relation during first pass through OSM file
+ * - A {@link Tables.RowHandler} implementation in {@code Tables.java} to process input features filtered and parsed
+ * according to the imposm3 mappings defined in the OpenMapTiles schema. Each element corresponds to a row in the table
+ * that imposm3 would have generated, with generated methods for accessing the data that would have been in each
+ * column
*
* Layers can also subscribe to notifications when we finished processing an input source by implementing
* {@link FinishHandler} or post-process features in that layer before rendering the output tile by implementing
@@ -118,9 +118,8 @@ public class BasemapProfile extends ForwardingProfile {
return new RowDispatch(constructor.create(), handlers);
}).simplify().index();
wikidataMappings = Tables.MAPPINGS
- .mapResults(constructor ->
- handlerMap.getOrDefault(constructor.rowClass(), List.of()).stream()
- .anyMatch(handler -> !IgnoreWikidata.class.isAssignableFrom(handler.handlerClass()))
+ .mapResults(constructor -> handlerMap.getOrDefault(constructor.rowClass(), List.of()).stream()
+ .anyMatch(handler -> !IgnoreWikidata.class.isAssignableFrom(handler.handlerClass()))
).filterResults(b -> b).simplify().index();
// register a handler for all OSM elements that forwards to imposm3 "table row" handler methods
@@ -149,8 +148,8 @@ public class BasemapProfile extends ForwardingProfile {
if (elem instanceof OsmElement.Node) {
return wikidataMappings.getOrElse(SimpleFeature.create(EMPTY_POINT, tags), false);
} else if (elem instanceof OsmElement.Way) {
- return wikidataMappings.getOrElse(SimpleFeature.create(EMPTY_POLYGON, tags), false)
- || wikidataMappings.getOrElse(SimpleFeature.create(EMPTY_LINE, tags), false);
+ return wikidataMappings.getOrElse(SimpleFeature.create(EMPTY_POLYGON, tags), false) ||
+ wikidataMappings.getOrElse(SimpleFeature.create(EMPTY_LINE, tags), false);
} else if (elem instanceof OsmElement.Relation) {
return wikidataMappings.getOrElse(SimpleFeature.create(EMPTY_POLYGON, tags), false);
} else {
@@ -201,14 +200,13 @@ public class BasemapProfile extends ForwardingProfile {
}
/**
- * Layers should implement this interface to subscribe to elements from natural
- * earth.
+ * Layers should implement this interface to subscribe to elements from
+ * natural earth.
*/
public interface NaturalEarthProcessor {
/**
- * Process an element from {@code table} in thenatural earth
- * source.
+ * Process an element from {@code table} in thenatural earth source.
*
* @see Profile#processFeature(SourceFeature, FeatureCollector)
*/
@@ -216,8 +214,8 @@ public class BasemapProfile extends ForwardingProfile {
}
/**
- * Layers should implement this interface to subscribe to elements from OSM
- * lake centerlines source.
+ * Layers should implement this interface to subscribe to elements from
+ * OSM lake centerlines source.
*/
public interface LakeCenterlineProcessor {
@@ -231,8 +229,8 @@ public class BasemapProfile extends ForwardingProfile {
}
/**
- * Layers should implement this interface to subscribe to elements from OSM
- * water polygons source.
+ * Layers should implement this interface to subscribe to elements from
+ * OSM water polygons source.
*/
public interface OsmWaterPolygonProcessor {
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/Generate.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/Generate.java
index c019158a..1ab032a6 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/Generate.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/Generate.java
@@ -38,14 +38,14 @@ import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
/**
- * Generates code in the {@code generated} package from the OpenMapTiles schema crawled from a tag or branch in the OpenMapTiles GitHub repo.
+ * Generates code in the {@code generated} package from the OpenMapTiles schema crawled from a tag or branch in the
+ * OpenMapTiles GitHub repo.
*
* {@code OpenMapTilesSchema.java} contains the output layer definitions (i.e. attributes and allowed values) so that
* layer implementations in {@code layers} package can reference them instead of hard-coding.
*
* {@code Tables.java} contains the imposm3 table definitions from
- * mapping.yaml files in the OpenMapTiles repo. Layers in the {@code layer} package can extend the {@code Handler}
+ * mapping.yaml files in the OpenMapTiles repo. Layers in the {@code layer} package can extend the {@code Handler}
* nested class for a table definition to "subscribe" to OSM elements that imposm3 would put in that table.
*
* To run use {@code ./scripts/regenerate-openmaptiles.sh}
@@ -169,8 +169,7 @@ public class Generate {
emitLayerSchemaDefinitions(config.tileset, layers, packageName, output, tag);
emitTableDefinitions(tables, packageName, output, tag);
- LOGGER.info(
- "Done generating code in 'generated' package, now run IntelliJ 'Reformat Code' operation with 'Optimize imports' and 'Cleanup code' options selected.");
+ LOGGER.info("Done!");
}
/** Generates {@code OpenMapTilesSchema.java} */
@@ -178,56 +177,57 @@ public class Generate {
Path output, String tag)
throws IOException {
StringBuilder schemaClass = new StringBuilder();
- schemaClass.append("""
- %s
- package %s;
-
- import static com.onthegomap.planetiler.expression.Expression.*;
- import com.onthegomap.planetiler.config.PlanetilerConfig;
- import com.onthegomap.planetiler.stats.Stats;
- import com.onthegomap.planetiler.expression.MultiExpression;
- import com.onthegomap.planetiler.basemap.Layer;
- import com.onthegomap.planetiler.util.Translations;
- import java.util.List;
- import java.util.Map;
- import java.util.Set;
-
- /**
- * All vector tile layer definitions, attributes, and allowed values generated from the
- * OpenMapTiles vector tile schema %s.
- */
- @SuppressWarnings("unused")
- public class OpenMapTilesSchema {
- public static final String NAME = %s;
- public static final String DESCRIPTION = %s;
- public static final String VERSION = %s;
- public static final String ATTRIBUTION = %s;
- public static final List LANGUAGES = List.of(%s);
-
- /** Returns a list of expected layer implementation instances from the {@code layers} package. */
- public static List createInstances(Translations translations, PlanetilerConfig config, Stats stats) {
- return List.of(
- %s
- );
- }
+ schemaClass.append(
"""
- .formatted(
- GENERATED_FILE_HEADER,
- packageName,
- escapeJavadoc(tag),
- escapeJavadoc(tag),
- Format.quote(info.name),
- Format.quote(info.description),
- Format.quote(info.version),
- Format.quote(info.attribution),
- info.languages.stream().map(Format::quote).collect(joining(", ")),
- layers.stream()
- .map(
- l -> "new com.onthegomap.planetiler.basemap.layers.%s(translations, config, stats)"
- .formatted(lowerUnderscoreToUpperCamel(l.layer.id)))
- .collect(joining("," + LINE_SEPARATOR))
- .indent(6).trim()
- ));
+ %s
+ package %s;
+
+ import static com.onthegomap.planetiler.expression.Expression.*;
+ import com.onthegomap.planetiler.config.PlanetilerConfig;
+ import com.onthegomap.planetiler.stats.Stats;
+ import com.onthegomap.planetiler.expression.MultiExpression;
+ import com.onthegomap.planetiler.basemap.Layer;
+ import com.onthegomap.planetiler.util.Translations;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.Set;
+
+ /**
+ * All vector tile layer definitions, attributes, and allowed values generated from the
+ * OpenMapTiles vector tile schema %s.
+ */
+ @SuppressWarnings("unused")
+ public class OpenMapTilesSchema {
+ public static final String NAME = %s;
+ public static final String DESCRIPTION = %s;
+ public static final String VERSION = %s;
+ public static final String ATTRIBUTION = %s;
+ public static final List LANGUAGES = List.of(%s);
+
+ /** Returns a list of expected layer implementation instances from the {@code layers} package. */
+ public static List createInstances(Translations translations, PlanetilerConfig config, Stats stats) {
+ return List.of(
+ %s
+ );
+ }
+ """
+ .formatted(
+ GENERATED_FILE_HEADER,
+ packageName,
+ escapeJavadoc(tag),
+ escapeJavadoc(tag),
+ Format.quote(info.name),
+ Format.quote(info.description),
+ Format.quote(info.version),
+ Format.quote(info.attribution),
+ info.languages.stream().map(Format::quote).collect(joining(", ")),
+ layers.stream()
+ .map(
+ l -> "new com.onthegomap.planetiler.basemap.layers.%s(translations, config, stats)"
+ .formatted(lowerUnderscoreToUpperCamel(l.layer.id)))
+ .collect(joining("," + LINE_SEPARATOR))
+ .indent(6).trim()
+ ));
for (var layer : layers) {
String layerCode = generateCodeForLayer(tag, layer);
schemaClass.append(layerCode);
@@ -344,68 +344,70 @@ public class Generate {
String tag)
throws IOException {
StringBuilder tablesClass = new StringBuilder();
- tablesClass.append("""
- %s
- package %s;
+ tablesClass.append(
+ """
+ %s
+ package %s;
- import static com.onthegomap.planetiler.expression.Expression.*;
+ import static com.onthegomap.planetiler.expression.Expression.*;
- import com.onthegomap.planetiler.expression.Expression;
- import com.onthegomap.planetiler.expression.MultiExpression;
- import com.onthegomap.planetiler.FeatureCollector;
- import com.onthegomap.planetiler.reader.SourceFeature;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.HashSet;
- import java.util.List;
- import java.util.Map;
- import java.util.Set;
+ import com.onthegomap.planetiler.expression.Expression;
+ import com.onthegomap.planetiler.expression.MultiExpression;
+ import com.onthegomap.planetiler.FeatureCollector;
+ import com.onthegomap.planetiler.reader.SourceFeature;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.HashSet;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.Set;
- /**
- * OSM element parsers generated from the imposm3 table definitions
- * in the OpenMapTiles vector tile schema.
- *
- * These filter and parse the raw OSM key/value attribute pairs on tags into records with fields that match the
- * columns in the tables that imposm3 would generate. Layer implementations can "subscribe" to elements from each
- * "table" but implementing the table's {@code Handler} interface and use the element's typed API to access
- * attributes.
- */
- @SuppressWarnings("unused")
- public class Tables {
- /** A parsed OSM element that would appear in a "row" of the imposm3 table. */
- public interface Row {
+ /**
+ * OSM element parsers generated from the imposm3 table definitions
+ * in the OpenMapTiles vector tile schema.
+ *
+ * These filter and parse the raw OSM key/value attribute pairs on tags into records with fields that match the
+ * columns in the tables that imposm3 would generate. Layer implementations can "subscribe" to elements from each
+ * "table" but implementing the table's {@code Handler} interface and use the element's typed API to access
+ * attributes.
+ */
+ @SuppressWarnings("unused")
+ public class Tables {
+ /** A parsed OSM element that would appear in a "row" of the imposm3 table. */
+ public interface Row {
- /** Returns the original OSM element. */
- SourceFeature source();
- }
+ /** Returns the original OSM element. */
+ SourceFeature source();
+ }
- /** A functional interface that the constructor of a new table row can be coerced to. */
- @FunctionalInterface
- public interface Constructor {
+ /** A functional interface that the constructor of a new table row can be coerced to. */
+ @FunctionalInterface
+ public interface Constructor {
- Row create(SourceFeature source, String mappingKey);
- }
+ Row create(SourceFeature source, String mappingKey);
+ }
- /** The {@code rowClass} of an imposm3 table row and its constructor coerced to a {@link Constructor}. */
- public record RowClassAndConstructor(
- Class extends Row> rowClass,
- Constructor create
- ) {}
+ /** The {@code rowClass} of an imposm3 table row and its constructor coerced to a {@link Constructor}. */
+ public record RowClassAndConstructor(
+ Class extends Row> rowClass,
+ Constructor create
+ ) {}
- /** A functional interface that the typed handler method that a layer implementation can be coerced to. */
- @FunctionalInterface
- public interface RowHandler {
+ /** A functional interface that the typed handler method that a layer implementation can be coerced to. */
+ @FunctionalInterface
+ public interface RowHandler {
- /** Process a typed element according to the profile. */
- void process(T element, FeatureCollector features);
- }
+ /** Process a typed element according to the profile. */
+ void process(T element, FeatureCollector features);
+ }
- /** The {@code handlerClass} of a layer handler and it's {@code process} method coerced to a {@link RowHandler}. */
- public record RowHandlerAndClass(
- Class> handlerClass,
- RowHandler handler
- ) {}
- """.formatted(GENERATED_FILE_HEADER, packageName, escapeJavadoc(tag)));
+ /** The {@code handlerClass} of a layer handler and it's {@code process} method coerced to a {@link RowHandler}. */
+ public record RowHandlerAndClass(
+ Class> handlerClass,
+ RowHandler handler
+ ) {}
+ """
+ .formatted(GENERATED_FILE_HEADER, packageName, escapeJavadoc(tag)));
List classNames = new ArrayList<>();
Map fieldNameToType = new TreeMap<>();
@@ -489,17 +491,19 @@ public class Generate {
));
""".formatted(
classNames.stream().map(
- className -> "MultiExpression.entry(new RowClassAndConstructor(%s.class, %s::new), %s.MAPPING)".formatted(
- className, className, className))
+ className -> "MultiExpression.entry(new RowClassAndConstructor(%s.class, %s::new), %s.MAPPING)".formatted(
+ className, className, className))
.collect(joining("," + LINE_SEPARATOR)).indent(2).strip()
).indent(2));
- String handlerCondition = classNames.stream().map(className ->
- """
- if (handler instanceof %s.Handler typedHandler) {
- result.computeIfAbsent(%s.class, cls -> new ArrayList<>()).add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
- }""".formatted(className, className)
- ).collect(joining(LINE_SEPARATOR));
+ String handlerCondition = classNames.stream()
+ .map(
+ className -> """
+ if (handler instanceof %s.Handler typedHandler) {
+ result.computeIfAbsent(%s.class, cls -> new ArrayList<>()).add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
+ }"""
+ .formatted(className, className)
+ ).collect(joining(LINE_SEPARATOR));
tablesClass.append("""
/**
* Returns a map from imposm3 "table row" class to the layers that have a handler for it from a list of layer
@@ -518,15 +522,15 @@ public class Generate {
}
/**
- * Returns an {@link Expression} that implements the same logic as the Imposm3
- * Data Mapping definition for a table.
+ * Returns an {@link Expression} that implements the same logic as the
+ * Imposm3 Data Mapping definition for a table.
*/
static Expression parseImposm3MappingExpression(Imposm3Table table) {
if (table.type_mappings != null) {
return or(
- table.type_mappings.entrySet().stream().map(entry ->
- parseImposm3MappingExpression(entry.getKey(), entry.getValue(), table.filters)
- ).toList()
+ table.type_mappings.entrySet().stream()
+ .map(entry -> parseImposm3MappingExpression(entry.getKey(), entry.getValue(), table.filters)
+ ).toList()
).simplify();
} else {
return parseImposm3MappingExpression(table.type, table.mapping, table.filters);
@@ -534,8 +538,8 @@ public class Generate {
}
/**
- * Returns an {@link Expression} that implements the same logic as the Imposm3
- * Data Mapping filters for a table.
+ * Returns an {@link Expression} that implements the same logic as the
+ * Imposm3 Data Mapping filters for a table.
*/
static Expression parseImposm3MappingExpression(String type, JsonNode mapping, Imposm3Filters filters) {
return and(
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java
index 30a69e02..f366f7e4 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java
@@ -37,10 +37,7 @@ See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for deta
package com.onthegomap.planetiler.basemap.generated;
-import static com.onthegomap.planetiler.expression.Expression.FALSE;
-import static com.onthegomap.planetiler.expression.Expression.and;
-import static com.onthegomap.planetiler.expression.Expression.matchAny;
-import static com.onthegomap.planetiler.expression.Expression.or;
+import static com.onthegomap.planetiler.expression.Expression.*;
import com.onthegomap.planetiler.basemap.Layer;
import com.onthegomap.planetiler.config.PlanetilerConfig;
@@ -57,11 +54,11 @@ import java.util.Set;
*/
@SuppressWarnings("unused")
public class OpenMapTilesSchema {
-
public static final String NAME = "OpenMapTiles";
public static final String DESCRIPTION = "A tileset showcasing all layers in OpenMapTiles. https://openmaptiles.org";
public static final String VERSION = "3.13.0";
- public static final String ATTRIBUTION = "© OpenMapTiles © OpenStreetMap contributors";
+ public static final String ATTRIBUTION =
+ "© OpenMapTiles © OpenStreetMap contributors";
public static final List LANGUAGES = List.of("am", "ar", "az", "be", "bg", "br", "bs", "ca", "co", "cs", "cy",
"da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "fy", "ga", "gd", "he", "hi", "hr", "hu", "hy", "id",
"is", "it", "ja", "ja_kana", "ja_rm", "ja-Latn", "ja-Hira", "ka", "kk", "kn", "ko", "ko-Latn", "ku", "la", "lb",
@@ -93,15 +90,15 @@ public class OpenMapTilesSchema {
/**
* Water polygons representing oceans and lakes. Covered watered areas are excluded (covered=yes
). On low
* zoom levels all water originates from Natural Earth. To get a more correct display of the south pole you should
- * also style the covering ice shelves over the water. On higher zoom levels water polygons from OpenStreetMapData are used. The polygons are split into many smaller
+ * also style the covering ice shelves over the water. On higher zoom levels water polygons from
+ * OpenStreetMapData are used. The polygons are split into many smaller
* polygons to improve rendering performance. This however can lead to less rendering options in clients since these
* boundaries show up. So you might not be able to use border styling for ocean water features.
- *
- * Generated from water.yaml
+ *
+ * Generated from
+ * water.yaml
*/
public interface Water extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "water";
@@ -112,13 +109,14 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the water layer. */
final class Fields {
-
/**
* All water polygons from OpenStreetMapData have the class
- * ocean
. Water bodies with the waterway=riverbank
- * or water=river
tag are classified
- * as river. Wet and dry docks tagged waterway=dock
- * are classified as a dock
. All other water bodies are classified as lake
.
+ * ocean
. Water bodies with the
+ * waterway=riverbank
or
+ * water=river
tag are classified as
+ * river. Wet and dry docks tagged
+ * waterway=dock
are classified as
+ * a dock
. All other water bodies are classified as lake
.
*
* allowed values:
*
@@ -131,8 +129,8 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
- * Mark with 1
if it is an intermittent
- * water polygon.
+ * Mark with 1
if it is an
+ * intermittent water polygon.
*
* allowed values:
*
@@ -153,10 +151,8 @@ public class OpenMapTilesSchema {
*/
public static final String BRUNNEL = "brunnel";
}
-
/** Attribute values for map elements in the water layer. */
final class FieldValues {
-
public static final String CLASS_DOCK = "dock";
public static final String CLASS_RIVER = "river";
public static final String CLASS_LAKE = "lake";
@@ -166,28 +162,25 @@ public class OpenMapTilesSchema {
public static final String BRUNNEL_TUNNEL = "tunnel";
public static final Set BRUNNEL_VALUES = Set.of("bridge", "tunnel");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the water layer. */
final class FieldMappings {
-
- public static final MultiExpression Class = MultiExpression.of(
- List.of(MultiExpression.entry("dock", matchAny("waterway", "dock")),
+ public static final MultiExpression Class =
+ MultiExpression.of(List.of(MultiExpression.entry("dock", matchAny("waterway", "dock")),
MultiExpression.entry("river", or(matchAny("water", "river"), matchAny("waterway", "riverbank"))),
MultiExpression.entry("lake", matchAny("waterway", "")), MultiExpression.entry("ocean", FALSE)));
}
}
-
/**
* OpenStreetMap waterways for higher zoom levels (z9 and
* more) and Natural Earth rivers and lake centerlines for low zoom levels (z3 - z8). Linestrings without a name or
* which are too short are filtered out at low zoom levels. Till z11 there is river
class only, in z12
* there is also canal
generated, starting z13 there is no generalization according to class
* field applied. Waterways do not have a subclass
field.
- *
- * Generated from waterway.yaml
+ *
+ * Generated from
+ * waterway.yaml
*/
public interface Waterway extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "waterway";
@@ -198,7 +191,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the waterway layer. */
final class Fields {
-
/**
* The OSM name
value of the waterway. The
* name
field may be empty for NaturalEarth data or at lower zoom levels.
@@ -236,8 +228,8 @@ public class OpenMapTilesSchema {
public static final String BRUNNEL = "brunnel";
/**
- * Mark with 1
if it is an intermittent
- * waterway.
+ * Mark with 1
if it is an
+ * intermittent waterway.
*
* allowed values:
*
@@ -247,10 +239,8 @@ public class OpenMapTilesSchema {
*/
public static final String INTERMITTENT = "intermittent";
}
-
/** Attribute values for map elements in the waterway layer. */
final class FieldValues {
-
public static final String CLASS_STREAM = "stream";
public static final String CLASS_RIVER = "river";
public static final String CLASS_CANAL = "canal";
@@ -261,23 +251,21 @@ public class OpenMapTilesSchema {
public static final String BRUNNEL_TUNNEL = "tunnel";
public static final Set BRUNNEL_VALUES = Set.of("bridge", "tunnel");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the waterway layer. */
final class FieldMappings {
}
}
-
/**
* Landcover is used to describe the physical material at the surface of the earth. At lower zoom levels this is from
- * Natural Earth data for glaciers and ice shelves and at higher zoom levels the landcover is implied by OSM tags. The most common use case for this
+ * Natural Earth data for glaciers and ice shelves and at higher zoom levels the landcover is
+ * implied by OSM tags. The most common use case for this
* layer is to style wood (class=wood
) and grass (class=grass
) areas.
- *
- * Generated from landcover.yaml
+ *
+ * Generated from landcover.yaml
*/
public interface Landcover extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "landcover";
@@ -288,7 +276,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the landcover layer. */
final class Fields {
-
/**
* Use the class to assign natural colors for landcover.
*
@@ -306,11 +293,11 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
- * Use subclass to do more precise styling. Original value of either the natural
, landuse
, leisure
, or wetland
tag.
+ * Use subclass to do more precise styling. Original value of either the
+ * natural
,
+ * landuse
,
+ * leisure
, or
+ * wetland
tag.
*
* allowed values:
*
@@ -354,10 +341,8 @@ public class OpenMapTilesSchema {
*/
public static final String SUBCLASS = "subclass";
}
-
/** Attribute values for map elements in the landcover layer. */
final class FieldValues {
-
public static final String CLASS_FARMLAND = "farmland";
public static final String CLASS_ICE = "ice";
public static final String CLASS_WOOD = "wood";
@@ -365,8 +350,8 @@ public class OpenMapTilesSchema {
public static final String CLASS_GRASS = "grass";
public static final String CLASS_WETLAND = "wetland";
public static final String CLASS_SAND = "sand";
- public static final Set CLASS_VALUES = Set.of("farmland", "ice", "wood", "rock", "grass", "wetland",
- "sand");
+ public static final Set CLASS_VALUES =
+ Set.of("farmland", "ice", "wood", "rock", "grass", "wetland", "sand");
public static final String SUBCLASS_ALLOTMENTS = "allotments";
public static final String SUBCLASS_BARE_ROCK = "bare_rock";
public static final String SUBCLASS_BEACH = "beach";
@@ -403,36 +388,39 @@ public class OpenMapTilesSchema {
public static final String SUBCLASS_WET_MEADOW = "wet_meadow";
public static final String SUBCLASS_WETLAND = "wetland";
public static final String SUBCLASS_WOOD = "wood";
- public static final Set SUBCLASS_VALUES = Set.of("allotments", "bare_rock", "beach", "bog", "dune",
- "scrub", "farm", "farmland", "fell", "forest", "garden", "glacier", "grass", "grassland", "golf_course",
- "heath", "mangrove", "marsh", "meadow", "orchard", "park", "plant_nursery", "recreation_ground", "reedbed",
- "saltern", "saltmarsh", "sand", "scree", "swamp", "tidalflat", "tundra", "village_green", "vineyard",
- "wet_meadow", "wetland", "wood");
+ public static final Set SUBCLASS_VALUES =
+ Set.of("allotments", "bare_rock", "beach", "bog", "dune", "scrub", "farm", "farmland", "fell", "forest",
+ "garden", "glacier", "grass", "grassland", "golf_course", "heath", "mangrove", "marsh", "meadow", "orchard",
+ "park", "plant_nursery", "recreation_ground", "reedbed", "saltern", "saltmarsh", "sand", "scree", "swamp",
+ "tidalflat", "tundra", "village_green", "vineyard", "wet_meadow", "wetland", "wood");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the landcover layer. */
final class FieldMappings {
-
- public static final MultiExpression Class = MultiExpression.of(List.of(MultiExpression.entry("farmland",
- matchAny("subclass", "farmland", "farm", "orchard", "vineyard", "plant_nursery")),
- MultiExpression.entry("ice", matchAny("subclass", "glacier", "ice_shelf")),
- MultiExpression.entry("wood", matchAny("subclass", "wood", "forest")),
- MultiExpression.entry("rock", matchAny("subclass", "bare_rock", "scree")), MultiExpression.entry("grass",
- matchAny("subclass", "fell", "grassland", "heath", "scrub", "tundra", "grass", "meadow", "allotments", "park",
- "village_green", "recreation_ground", "garden", "golf_course")), MultiExpression.entry("wetland",
- matchAny("subclass", "wetland", "bog", "swamp", "wet_meadow", "marsh", "reedbed", "saltern", "tidalflat",
- "saltmarsh", "mangrove")), MultiExpression.entry("sand", matchAny("subclass", "beach", "sand", "dune"))));
+ public static final MultiExpression Class =
+ MultiExpression
+ .of(List.of(
+ MultiExpression.entry("farmland",
+ matchAny("subclass", "farmland", "farm", "orchard", "vineyard", "plant_nursery")),
+ MultiExpression.entry("ice", matchAny("subclass", "glacier", "ice_shelf")),
+ MultiExpression.entry("wood", matchAny("subclass", "wood", "forest")),
+ MultiExpression.entry("rock", matchAny("subclass", "bare_rock", "scree")),
+ MultiExpression.entry("grass",
+ matchAny("subclass", "fell", "grassland", "heath", "scrub", "tundra", "grass", "meadow", "allotments",
+ "park", "village_green", "recreation_ground", "garden", "golf_course")),
+ MultiExpression.entry("wetland",
+ matchAny("subclass", "wetland", "bog", "swamp", "wet_meadow", "marsh", "reedbed", "saltern", "tidalflat",
+ "saltmarsh", "mangrove")),
+ MultiExpression.entry("sand", matchAny("subclass", "beach", "sand", "dune"))));
}
}
-
/**
* Landuse is used to describe use of land by humans. At lower zoom levels this is from Natural Earth data for
* residential (urban) areas and at higher zoom levels mostly OSM landuse
tags.
- *
- * Generated from landuse.yaml
+ *
+ * Generated from
+ * landuse.yaml
*/
public interface Landuse extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "landuse";
@@ -443,15 +431,14 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the landuse layer. */
final class Fields {
-
/**
- * Use the class to assign special colors to areas. Original value of either the landuse
, amenity
, leisure
, tourism
, place
or waterway
tag.
+ * Use the class to assign special colors to areas. Original value of either the
+ * landuse
,
+ * amenity
,
+ * leisure
,
+ * tourism
,
+ * place
or
+ * waterway
tag.
*
* allowed values:
*
@@ -484,10 +471,8 @@ public class OpenMapTilesSchema {
*/
public static final String CLASS = "class";
}
-
/** Attribute values for map elements in the landuse layer. */
final class FieldValues {
-
public static final String CLASS_RAILWAY = "railway";
public static final String CLASS_CEMETERY = "cemetery";
public static final String CLASS_MILITARY = "military";
@@ -513,25 +498,23 @@ public class OpenMapTilesSchema {
public static final String CLASS_QUARTER = "quarter";
public static final String CLASS_NEIGHBOURHOOD = "neighbourhood";
public static final String CLASS_DAM = "dam";
- public static final Set CLASS_VALUES = Set.of("railway", "cemetery", "military", "residential",
- "commercial", "industrial", "garages", "retail", "bus_station", "school", "university", "kindergarten",
- "college", "library", "hospital", "stadium", "pitch", "playground", "track", "theme_park", "zoo", "suburb",
- "quarter", "neighbourhood", "dam");
+ public static final Set CLASS_VALUES =
+ Set.of("railway", "cemetery", "military", "residential", "commercial", "industrial", "garages", "retail",
+ "bus_station", "school", "university", "kindergarten", "college", "library", "hospital", "stadium", "pitch",
+ "playground", "track", "theme_park", "zoo", "suburb", "quarter", "neighbourhood", "dam");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the landuse layer. */
final class FieldMappings {
}
}
-
/**
* Natural peaks
- *
- * Generated from mountain_peak.yaml
+ *
+ * Generated from mountain_peak.yaml
*/
public interface MountainPeak extends Layer {
-
double BUFFER_SIZE = 64.0;
String LAYER_NAME = "mountain_peak";
@@ -542,7 +525,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the mountain_peak layer. */
final class Fields {
-
/** The OSM name
value of the peak. */
public static final String NAME = "name";
/** English name name:en
if available, otherwise name
. */
@@ -581,10 +563,8 @@ public class OpenMapTilesSchema {
/** Rank of the peak within one tile (starting at 1 that is the most important peak). */
public static final String RANK = "rank";
}
-
/** Attribute values for map elements in the mountain_peak layer. */
final class FieldValues {
-
public static final String CLASS_PEAK = "peak";
public static final String CLASS_VOLCANO = "volcano";
public static final String CLASS_RIDGE = "ridge";
@@ -592,22 +572,22 @@ public class OpenMapTilesSchema {
public static final String CLASS_ARETE = "arete";
public static final Set CLASS_VALUES = Set.of("peak", "volcano", "ridge", "cliff", "arete");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the mountain_peak layer. */
final class FieldMappings {
}
}
-
/**
- * The park layer contains parks from OpenStreetMap tagged with boundary=national_park
,
- * boundary=protected_area
,
- * or leisure=nature_reserve
.
- *
- * Generated from park.yaml
+ * The park layer contains parks from OpenStreetMap tagged with
+ * boundary=national_park
,
+ * boundary=protected_area
, or
+ * leisure=nature_reserve
.
+ *
+ * Generated from
+ * park.yaml
*/
public interface Park extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "park";
@@ -618,15 +598,16 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the park layer. */
final class Fields {
-
/**
* Use the class to differentiate between different parks. The class for
- * boundary=protected_area
parks is the lower-case of the protection_title
- * value with blanks replaced by _
. national_park
is the class of
+ * boundary=protected_area
parks is the lower-case of the
+ * protection_title
value with
+ * blanks replaced by _
. national_park
is the class of
* protection_title=National Park
and boundary=national_park
.
* nature_reserve
is the class of protection_title=Nature Reserve
and
- * leisure=nature_reserve
. The class for other protection_title
- * values is similarly assigned.
+ * leisure=nature_reserve
. The class for other
+ * protection_title
values is
+ * similarly assigned.
*/
public static final String CLASS = "class";
/**
@@ -644,29 +625,29 @@ public class OpenMapTilesSchema {
/** Rank of the park within one tile, starting at 1 that is the most important park (point features only). */
public static final String RANK = "rank";
}
-
/** Attribute values for map elements in the park layer. */
final class FieldValues {
}
-
/** Complex mappings to generate attribute values from OSM element tags in the park layer. */
final class FieldMappings {
}
}
-
/**
- * Contains administrative boundaries as linestrings. Until z4 Natural
- * Earth data is used after which OSM boundaries (boundary=administrative
)
- * are present from z5 to z14 (also for maritime boundaries with admin_level <= 2
at z4). OSM data
- * contains several admin_level
+ * Contains administrative boundaries as linestrings. Until z4
+ * Natural Earth data is used after which OSM boundaries
+ * (boundary=administrative
) are
+ * present from z5 to z14 (also for maritime boundaries with admin_level <= 2
at z4). OSM data
+ * contains several
+ * admin_level
* but for most styles it makes sense to just style admin_level=2
and admin_level=4
.
- *
- * Generated from boundary.yaml
+ *
+ * Generated from
+ * boundary.yaml
*/
public interface Boundary extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "boundary";
@@ -677,7 +658,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the boundary layer. */
final class Fields {
-
/**
* OSM admin_level
* indicating the level of importance of this boundary. The admin_level
corresponds to the lowest
@@ -722,8 +702,8 @@ public class OpenMapTilesSchema {
*/
public static final String DISPUTED_NAME = "disputed_name";
/**
- * ISO2 code of country, which wants to see the boundary line. For country boundaries only (admin_level =
- * 2
).
+ * ISO2 code of country, which wants to see the boundary line. For country boundaries only
+ * (admin_level = 2
).
*/
public static final String CLAIMED_BY = "claimed_by";
@@ -738,10 +718,8 @@ public class OpenMapTilesSchema {
*/
public static final String MARITIME = "maritime";
}
-
/** Attribute values for map elements in the boundary layer. */
final class FieldValues {
-
public static final String DISPUTED_NAME_ABUMUSAISLAND = "AbuMusaIsland";
public static final String DISPUTED_NAME_BARAHOTIIVALLEYS = "BaraHotiiValleys";
public static final String DISPUTED_NAME_CHINESECLAIM = "ChineseClaim";
@@ -753,26 +731,24 @@ public class OpenMapTilesSchema {
public static final String DISPUTED_NAME_PAKISTANICLAIM = "PakistaniClaim";
public static final String DISPUTED_NAME_SAMDUVALLEYS = "SamduValleys";
public static final String DISPUTED_NAME_TIRPANIVALLEYS = "TirpaniValleys";
- public static final Set DISPUTED_NAME_VALUES = Set.of("AbuMusaIsland", "BaraHotiiValleys", "ChineseClaim",
- "Crimea", "Demchok", "Dokdo", "IndianClaim-North", "IndianClaimwesternKashmir", "PakistaniClaim",
- "SamduValleys", "TirpaniValleys");
+ public static final Set DISPUTED_NAME_VALUES =
+ Set.of("AbuMusaIsland", "BaraHotiiValleys", "ChineseClaim", "Crimea", "Demchok", "Dokdo", "IndianClaim-North",
+ "IndianClaimwesternKashmir", "PakistaniClaim", "SamduValleys", "TirpaniValleys");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the boundary layer. */
final class FieldMappings {
}
}
-
/**
* Aeroway polygons based of OpenStreetMap aeroways. Airport
* buildings are contained in the building layer but all other airport related polygons can be found
* in the aeroway layer.
- *
- * Generated from aeroway.yaml
+ *
+ * Generated from
+ * aeroway.yaml
*/
public interface Aeroway extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "aeroway";
@@ -783,8 +759,9 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the aeroway layer. */
final class Fields {
-
- /** The OSM ref
tag of the runway/taxiway. */
+ /**
+ * The OSM ref
tag of the runway/taxiway.
+ */
public static final String REF = "ref";
/**
@@ -804,10 +781,8 @@ public class OpenMapTilesSchema {
*/
public static final String CLASS = "class";
}
-
/** Attribute values for map elements in the aeroway layer. */
final class FieldValues {
-
public static final String CLASS_AERODROME = "aerodrome";
public static final String CLASS_HELIPORT = "heliport";
public static final String CLASS_RUNWAY = "runway";
@@ -815,27 +790,25 @@ public class OpenMapTilesSchema {
public static final String CLASS_TAXIWAY = "taxiway";
public static final String CLASS_APRON = "apron";
public static final String CLASS_GATE = "gate";
- public static final Set CLASS_VALUES = Set.of("aerodrome", "heliport", "runway", "helipad", "taxiway",
- "apron", "gate");
+ public static final Set CLASS_VALUES =
+ Set.of("aerodrome", "heliport", "runway", "helipad", "taxiway", "apron", "gate");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the aeroway layer. */
final class FieldMappings {
}
}
-
/**
* transportation contains roads, railways, aerial ways, and shipping lines. This layer is directly
* derived from the OSM road hierarchy. At lower zoom levels major highways from Natural Earth are used. It contains
* all roads from motorways to primary, secondary and tertiary roads to residential roads and foot paths. Styling the
* roads is the most essential part of the map. The transportation
layer also contains polygons for
* features like plazas.
- *
- * Generated from transportation.yaml
+ *
+ * Generated from transportation.yaml
*/
public interface Transportation extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "transportation";
@@ -846,15 +819,14 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the transportation layer. */
final class Fields {
-
/**
* Distinguish between more and less important roads or railways and roads under construction. Class is derived
- * from the value of the highway
, construction
, railway
, aerialway
, route
tag (for shipping ways), or man_made
.
+ * from the value of the highway
,
+ * construction
,
+ * railway
,
+ * aerialway
,
+ * route
tag (for shipping ways), or
+ * man_made
.
*
* allowed values:
*
@@ -884,10 +856,10 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
- * Distinguish more specific classes of railway and path: Subclass is value of the railway
, highway
(for paths), or public_transport
(for
+ * Distinguish more specific classes of railway and path: Subclass is value of the
+ * railway
,
+ * highway
(for paths), or
+ * public_transport
(for
* platforms) tag.
*
* allowed values:
@@ -912,9 +884,10 @@ public class OpenMapTilesSchema {
*/
public static final String SUBCLASS = "subclass";
/**
- * The network type derived mainly from network
- * tag of the road. See more info about us-
- *
, ca-transcanada
, or
+ * The network type derived mainly from
+ * network
tag of the road. See more
+ * info about us-
,
+ * ca-transcanada
, or
* gb-
.
*/
public static final String NETWORK = "network";
@@ -972,8 +945,9 @@ public class OpenMapTilesSchema {
public static final String SERVICE = "service";
/**
- * Access restrictions on this road. Supported values of the access
- * tag are no
and private
, which resolve to no
.
+ * Access restrictions on this road. Supported values of the
+ * access
tag are no
and
+ * private
, which resolve to no
.
*
* allowed values:
*
@@ -983,8 +957,8 @@ public class OpenMapTilesSchema {
public static final String ACCESS = "access";
/**
- * Whether this is a toll road, based on the toll
- * tag.
+ * Whether this is a toll road, based on the
+ * toll
tag.
*
* allowed values:
*
@@ -995,8 +969,8 @@ public class OpenMapTilesSchema {
public static final String TOLL = "toll";
/**
- * Whether this is an expressway, based on the expressway
- * tag.
+ * Whether this is an expressway, based on the
+ * expressway
tag.
*
* allowed values:
*
@@ -1007,14 +981,14 @@ public class OpenMapTilesSchema {
/** Original value of the layer
tag. */
public static final String LAYER = "layer";
/**
- * Experimental feature! Filled only for steps and footways. Original value of the level
tag.
+ * Experimental feature! Filled only for steps and footways. Original value of the
+ * level
tag.
*/
public static final String LEVEL = "level";
/**
- * Experimental feature! Filled only for steps and footways. Original value of the indoor
tag.
+ * Experimental feature! Filled only for steps and footways. Original value of the
+ * indoor
tag.
*
* allowed values:
*
@@ -1058,10 +1032,8 @@ public class OpenMapTilesSchema {
*/
public static final String SURFACE = "surface";
}
-
/** Attribute values for map elements in the transportation layer. */
final class FieldValues {
-
public static final String CLASS_MOTORWAY = "motorway";
public static final String CLASS_TRUNK = "trunk";
public static final String CLASS_PRIMARY = "primary";
@@ -1103,9 +1075,9 @@ public class OpenMapTilesSchema {
public static final String SUBCLASS_BRIDLEWAY = "bridleway";
public static final String SUBCLASS_CORRIDOR = "corridor";
public static final String SUBCLASS_PLATFORM = "platform";
- public static final Set SUBCLASS_VALUES = Set.of("rail", "narrow_gauge", "preserved", "funicular",
- "subway", "light_rail", "monorail", "tram", "pedestrian", "path", "footway", "cycleway", "steps", "bridleway",
- "corridor", "platform");
+ public static final Set SUBCLASS_VALUES =
+ Set.of("rail", "narrow_gauge", "preserved", "funicular", "subway", "light_rail", "monorail", "tram",
+ "pedestrian", "path", "footway", "cycleway", "steps", "bridleway", "corridor", "platform");
public static final String BRUNNEL_BRIDGE = "bridge";
public static final String BRUNNEL_TUNNEL = "tunnel";
public static final String BRUNNEL_FORD = "ford";
@@ -1117,18 +1089,16 @@ public class OpenMapTilesSchema {
public static final String SERVICE_DRIVEWAY = "driveway";
public static final String SERVICE_ALLEY = "alley";
public static final String SERVICE_PARKING_AISLE = "parking_aisle";
- public static final Set SERVICE_VALUES = Set.of("spur", "yard", "siding", "crossover", "driveway",
- "alley", "parking_aisle");
+ public static final Set SERVICE_VALUES =
+ Set.of("spur", "yard", "siding", "crossover", "driveway", "alley", "parking_aisle");
public static final String SURFACE_PAVED = "paved";
public static final String SURFACE_UNPAVED = "unpaved";
public static final Set SURFACE_VALUES = Set.of("paved", "unpaved");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the transportation layer. */
final class FieldMappings {
-
- public static final MultiExpression Class = MultiExpression.of(
- List.of(MultiExpression.entry("motorway", matchAny("highway", "motorway", "motorway_link")),
+ public static final MultiExpression Class =
+ MultiExpression.of(List.of(MultiExpression.entry("motorway", matchAny("highway", "motorway", "motorway_link")),
MultiExpression.entry("trunk", matchAny("highway", "trunk", "trunk_link")),
MultiExpression.entry("primary", matchAny("highway", "primary", "primary_link")),
MultiExpression.entry("secondary", matchAny("highway", "secondary", "secondary_link")),
@@ -1140,7 +1110,8 @@ public class OpenMapTilesSchema {
MultiExpression.entry("service", matchAny("highway", "service")),
MultiExpression.entry("track", matchAny("highway", "track")),
MultiExpression.entry("raceway", matchAny("highway", "raceway")),
- MultiExpression.entry("busway", matchAny("highway", "busway")), MultiExpression.entry("motorway_construction",
+ MultiExpression.entry("busway", matchAny("highway", "busway")),
+ MultiExpression.entry("motorway_construction",
and(matchAny("highway", "construction"), matchAny("construction", "motorway", "motorway_link"))),
MultiExpression.entry("trunk_construction",
and(matchAny("highway", "construction"), matchAny("construction", "trunk", "trunk_link"))),
@@ -1150,11 +1121,14 @@ public class OpenMapTilesSchema {
and(matchAny("highway", "construction"), matchAny("construction", "secondary", "secondary_link"))),
MultiExpression.entry("tertiary_construction",
and(matchAny("highway", "construction"), matchAny("construction", "tertiary", "tertiary_link"))),
- MultiExpression.entry("minor_construction", and(matchAny("highway", "construction"),
- matchAny("construction", "", "unclassified", "residential", "living_street", "road"))),
+ MultiExpression.entry(
+ "minor_construction",
+ and(matchAny("highway", "construction"),
+ matchAny("construction", "", "unclassified", "residential", "living_street", "road"))),
MultiExpression.entry("path_construction", and(matchAny("highway", "construction"),
or(matchAny("construction", "pedestrian", "path", "footway", "cycleway", "steps", "bridleway", "corridor"),
- matchAny("public_transport", "platform")))), MultiExpression.entry("service_construction",
+ matchAny("public_transport", "platform")))),
+ MultiExpression.entry("service_construction",
and(matchAny("highway", "construction"), matchAny("construction", "service"))),
MultiExpression.entry("track_construction",
and(matchAny("highway", "construction"), matchAny("construction", "track"))),
@@ -1162,16 +1136,15 @@ public class OpenMapTilesSchema {
and(matchAny("highway", "construction"), matchAny("construction", "raceway")))));
}
}
-
/**
- * All OSM Buildings. All building tags are imported (building=
). The buildings are not yet
+ * All OSM Buildings. All building tags are imported
+ * (building=
). The buildings are not yet
* ready for 3D rendering support and any help to improve this is welcomed.
- *
- * Generated from building.yaml
+ *
+ * Generated from
+ * building.yaml
*/
public interface Building extends Layer {
-
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "building";
@@ -1182,7 +1155,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the building layer. */
final class Fields {
-
/**
* An approximated height from levels and height of the building or building:part after the method of Paul Norman
* in OSM Clear. For future 3D rendering of buildings.
@@ -1197,31 +1169,29 @@ public class OpenMapTilesSchema {
/** Colour */
public static final String COLOUR = "colour";
/**
- * If True, building (part) should not be rendered in 3D. Currently, building
- * outlines are marked as hide_3d.
+ * If True, building (part) should not be rendered in 3D. Currently,
+ * building outlines are marked as hide_3d.
*/
public static final String HIDE_3D = "hide_3d";
}
-
/** Attribute values for map elements in the building layer. */
final class FieldValues {
}
-
/** Complex mappings to generate attribute values from OSM element tags in the building layer. */
final class FieldMappings {
}
}
-
/**
- * Lake center lines for labelling lake bodies. This is based of the osm-lakelines
- * project which derives nice centerlines from OSM water bodies. Only the most important lakes contain labels.
- *
- * Generated from water_name.yaml
+ * Lake center lines for labelling lake bodies. This is based of the
+ * osm-lakelines project which derives nice centerlines
+ * from OSM water bodies. Only the most important lakes contain labels.
+ *
+ * Generated from water_name.yaml
*/
public interface WaterName extends Layer {
-
double BUFFER_SIZE = 256.0;
String LAYER_NAME = "water_name";
@@ -1232,8 +1202,9 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the water_name layer. */
final class Fields {
-
- /** The OSM name
value of the water body. */
+ /**
+ * The OSM name
value of the water body.
+ */
public static final String NAME = "name";
/** English name name:en
if available, otherwise name
. */
public static final String NAME_EN = "name_en";
@@ -1251,8 +1222,8 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
- * Mark with 1
if it is an intermittent
- * lake.
+ * Mark with 1
if it is an
+ * intermittent lake.
*
* allowed values:
*
@@ -1262,30 +1233,26 @@ public class OpenMapTilesSchema {
*/
public static final String INTERMITTENT = "intermittent";
}
-
/** Attribute values for map elements in the water_name layer. */
final class FieldValues {
-
public static final String CLASS_LAKE = "lake";
public static final Set CLASS_VALUES = Set.of("lake");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the water_name layer. */
final class FieldMappings {
}
}
-
/**
* This is the layer for labelling the highways. Only highways that are named name=
and are long enough
* to place text upon appear. The OSM roads are stitched together if they contain the same name to have better label
* placement than having many small linestrings. For motorways you should use the ref
field to label them
* while for other roads you should use name
.
- *
- * Generated from transportation_name.yaml
+ *
+ * Generated from transportation_name.yaml
*/
public interface TransportationName extends Layer {
-
double BUFFER_SIZE = 8.0;
String LAYER_NAME = "transportation_name";
@@ -1296,7 +1263,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the transportation_name layer. */
final class Fields {
-
/**
* The OSM name
value
* of the highway.
@@ -1315,9 +1281,10 @@ public class OpenMapTilesSchema {
public static final String REF_LENGTH = "ref_length";
/**
- * The network type derived mainly from network
- * tag of the road. See more info about us-
- *
, ca-transcanada
, or
+ * The network type derived mainly from
+ * network
tag of the road. See more
+ * info about us-
,
+ * ca-transcanada
, or
* gb-
.
*
* allowed values:
@@ -1366,9 +1333,10 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
- * Distinguish more specific classes of path: Subclass is value of the highway
- * (for paths), and "junction" for motorway
- * junctions
.
+ * Distinguish more specific classes of path: Subclass is value of the
+ * highway
(for paths), and
+ * "junction" for
+ * motorway junctions
.
*
* allowed values:
*
@@ -1397,19 +1365,19 @@ public class OpenMapTilesSchema {
*/
public static final String BRUNNEL = "brunnel";
/**
- * Experimental feature! Filled only for steps and footways. Original value of level
tag.
+ * Experimental feature! Filled only for steps and footways. Original value of
+ * level
tag.
*/
public static final String LEVEL = "level";
/**
- * Experimental feature! Filled only for steps and footways. Original value of layer
tag.
+ * Experimental feature! Filled only for steps and footways. Original value of
+ * layer
tag.
*/
public static final String LAYER = "layer";
/**
- * Experimental feature! Filled only for steps and footways. Original value of indoor
tag.
+ * Experimental feature! Filled only for steps and footways. Original value of
+ * indoor
tag.
*
* allowed values:
*
@@ -1430,10 +1398,8 @@ public class OpenMapTilesSchema {
/** 6th route concurrency. */
public static final String ROUTE_6 = "route_6";
}
-
/** Attribute values for map elements in the transportation_name layer. */
final class FieldValues {
-
public static final String NETWORK_US_INTERSTATE = "us-interstate";
public static final String NETWORK_US_HIGHWAY = "us-highway";
public static final String NETWORK_US_STATE = "us-state";
@@ -1441,8 +1407,8 @@ public class OpenMapTilesSchema {
public static final String NETWORK_GB_MOTORWAY = "gb-motorway";
public static final String NETWORK_GB_TRUNK = "gb-trunk";
public static final String NETWORK_ROAD = "road";
- public static final Set NETWORK_VALUES = Set.of("us-interstate", "us-highway", "us-state",
- "ca-transcanada", "gb-motorway", "gb-trunk", "road");
+ public static final Set NETWORK_VALUES =
+ Set.of("us-interstate", "us-highway", "us-state", "ca-transcanada", "gb-motorway", "gb-trunk", "road");
public static final String CLASS_MOTORWAY = "motorway";
public static final String CLASS_TRUNK = "trunk";
public static final String CLASS_PRIMARY = "primary";
@@ -1466,11 +1432,11 @@ public class OpenMapTilesSchema {
public static final String CLASS_RAIL = "rail";
public static final String CLASS_TRANSIT = "transit";
public static final String CLASS_MOTORWAY_JUNCTION = "motorway_junction";
- public static final Set CLASS_VALUES = Set.of("motorway", "trunk", "primary", "secondary", "tertiary",
- "minor", "service", "track", "path", "raceway", "motorway_construction", "trunk_construction",
- "primary_construction", "secondary_construction", "tertiary_construction", "minor_construction",
- "service_construction", "track_construction", "path_construction", "raceway_construction", "rail", "transit",
- "motorway_junction");
+ public static final Set CLASS_VALUES =
+ Set.of("motorway", "trunk", "primary", "secondary", "tertiary", "minor", "service", "track", "path", "raceway",
+ "motorway_construction", "trunk_construction", "primary_construction", "secondary_construction",
+ "tertiary_construction", "minor_construction", "service_construction", "track_construction",
+ "path_construction", "raceway_construction", "rail", "transit", "motorway_junction");
public static final String SUBCLASS_PEDESTRIAN = "pedestrian";
public static final String SUBCLASS_PATH = "path";
public static final String SUBCLASS_FOOTWAY = "footway";
@@ -1480,31 +1446,29 @@ public class OpenMapTilesSchema {
public static final String SUBCLASS_CORRIDOR = "corridor";
public static final String SUBCLASS_PLATFORM = "platform";
public static final String SUBCLASS_JUNCTION = "junction";
- public static final Set SUBCLASS_VALUES = Set.of("pedestrian", "path", "footway", "cycleway", "steps",
- "bridleway", "corridor", "platform", "junction");
+ public static final Set SUBCLASS_VALUES =
+ Set.of("pedestrian", "path", "footway", "cycleway", "steps", "bridleway", "corridor", "platform", "junction");
public static final String BRUNNEL_BRIDGE = "bridge";
public static final String BRUNNEL_TUNNEL = "tunnel";
public static final String BRUNNEL_FORD = "ford";
public static final Set BRUNNEL_VALUES = Set.of("bridge", "tunnel", "ford");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the transportation_name layer. */
final class FieldMappings {
}
}
-
/**
- * The place layer consists out of countries, states and cities. Apart from the roads this is also one of the more
- * important layers to create a beautiful map. We suggest you use different font styles and sizes to create a text
- * hierarchy.
- *
- * Generated from place.yaml
+ * The place layer consists out of countries,
+ * states and
+ * cities. Apart from the roads this is also one of the
+ * more important layers to create a beautiful map. We suggest you use different font styles and sizes to create a
+ * text hierarchy.
+ *
+ * Generated from
+ * place.yaml
*/
public interface Place extends Layer {
-
double BUFFER_SIZE = 256.0;
String LAYER_NAME = "place";
@@ -1515,7 +1479,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the place layer. */
final class Fields {
-
/** The OSM name
value of the POI. */
public static final String NAME = "name";
/** English name name:en
if available, otherwise name
. */
@@ -1524,8 +1487,9 @@ public class OpenMapTilesSchema {
public static final String NAME_DE = "name_de";
/**
- * The capital field marks the admin_level
- * of the boundary the place is a capital of.
+ * The capital field marks the admin_level
of
+ * the boundary the place is a capital of.
*
* allowed values:
*
@@ -1560,8 +1524,8 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
* Two-letter country code ISO 3166-1 alpha-2.
- * Available only for class=country
. Original value of the country_code_iso3166_1_alpha_2
- * tag.
+ * Available only for class=country
. Original value of the country_code_iso3166_1_alpha_2
tag.
*/
public static final String ISO_A2 = "iso_a2";
/**
@@ -1571,17 +1535,14 @@ public class OpenMapTilesSchema {
* important cities and continues from 10
serially based on the local importance of the city (derived
* from population and city class). You can use the rank to limit density of labels or improve
* the text hierarchy. The rank value is a combination of the Natural Earth scalerank
,
- * labelrank
and datarank
values for countries and states and for cities consists out
- * of
+ * labelrank
and datarank
values for countries and states and for cities consists out of
* a shifted Natural Earth scalerank
combined with a local rank within a grid for cities that do not
* have a Natural Earth scalerank
.
*/
public static final String RANK = "rank";
}
-
/** Attribute values for map elements in the place layer. */
final class FieldValues {
-
public static final String CLASS_CONTINENT = "continent";
public static final String CLASS_COUNTRY = "country";
public static final String CLASS_STATE = "state";
@@ -1597,22 +1558,20 @@ public class OpenMapTilesSchema {
public static final Set CLASS_VALUES = Set.of("continent", "country", "state", "province", "city", "town",
"village", "hamlet", "suburb", "quarter", "neighbourhood", "isolated_dwelling");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the place layer. */
final class FieldMappings {
}
}
-
/**
* Everything in OpenStreetMap which contains a addr:housenumber
tag useful for labelling housenumbers on
* a map. This adds significant size to z14. For buildings the centroid of the building is used as
* housenumber.
- *
- * Generated from housenumber.yaml
+ *
+ * Generated from housenumber.yaml
*/
public interface Housenumber extends Layer {
-
double BUFFER_SIZE = 8.0;
String LAYER_NAME = "housenumber";
@@ -1623,30 +1582,25 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the housenumber layer. */
final class Fields {
-
/** Value of the addr:housenumber
tag. */
public static final String HOUSENUMBER = "housenumber";
}
-
/** Attribute values for map elements in the housenumber layer. */
final class FieldValues {
}
-
/** Complex mappings to generate attribute values from OSM element tags in the housenumber layer. */
final class FieldMappings {
}
}
-
/**
* Points of interests containing a of a variety
* of OpenStreetMap tags. Mostly contains amenities, sport, shop and tourist POIs.
- *
+ *
* Generated from poi.yaml
*/
public interface Poi extends Layer {
-
double BUFFER_SIZE = 64.0;
String LAYER_NAME = "poi";
@@ -1657,7 +1611,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the poi layer. */
final class Fields {
-
/** The OSM name
value of the POI. */
public static final String NAME = "name";
/** English name name:en
if available, otherwise name
. */
@@ -1711,36 +1664,37 @@ public class OpenMapTilesSchema {
public static final String CLASS = "class";
/**
* Original value of either the amenity
,
- * barrier
, historic
, information
, landuse
, leisure
, railway
, shop
, sport
, station
, religion
, tourism
, aerialway
, building
, highway
or waterway
tag. Use this to do more
+ * barrier
,
+ * historic
,
+ * information
,
+ * landuse
,
+ * leisure
,
+ * railway
,
+ * shop
,
+ * sport
,
+ * station
,
+ * religion
,
+ * tourism
,
+ * aerialway
,
+ * building
,
+ * highway
or
+ * waterway
tag. Use this to do more
* precise styling.
*/
public static final String SUBCLASS = "subclass";
/**
* The POIs are ranked ascending according to their importance within a grid. The rank
value shows
* the local relative importance of a POI within it's cell in the grid. This can be used to reduce label density
- * at z14. Since all POIs already need to be contained at z14 you can use less than
- * rank=10
epxression to limit POIs. At some point like z17 you can show all POIs.
+ * at z14. Since all POIs already need to be contained at z14 you can use
+ * less than rank=10
epxression to limit POIs. At some point like z17 you can show all POIs.
*/
public static final String RANK = "rank";
/**
* Experimental feature! Indicates main platform of public transport stops (buses, trams, and subways). Grouping
- * of platforms is implemented using uic_ref
- * tag that is not used worldwide.
+ * of platforms is implemented using
+ * uic_ref
tag that is not used
+ * worldwide.
*
* allowed values:
*
@@ -1763,10 +1717,8 @@ public class OpenMapTilesSchema {
*/
public static final String INDOOR = "indoor";
}
-
/** Attribute values for map elements in the poi layer. */
final class FieldValues {
-
public static final String CLASS_SHOP = "shop";
public static final String CLASS_TOWN_HALL = "town_hall";
public static final String CLASS_GOLF = "golf";
@@ -1805,11 +1757,10 @@ public class OpenMapTilesSchema {
"ice_cream", "post", "cafe", "school", "alcohol_shop", "bar", "harbor", "car", "hospital", "cemetery",
"attraction", "beer", "music", "stadium", "art_gallery", "clothing_store", "swimming", "castle");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the poi layer. */
final class FieldMappings {
-
- public static final MultiExpression Class = MultiExpression.of(List.of(MultiExpression.entry("shop",
+ public static final MultiExpression Class = MultiExpression.of(List.of(
+ MultiExpression.entry("shop",
matchAny("subclass", "accessories", "antiques", "beauty", "bed", "boutique", "camera", "carpet", "charity",
"chemist", "coffee", "computer", "convenience", "copyshop", "cosmetics", "garden_centre", "doityourself",
"erotic", "electronics", "fabric", "florist", "frozen_food", "furniture", "video_games", "video", "general",
@@ -1822,7 +1773,8 @@ public class OpenMapTilesSchema {
MultiExpression.entry("golf", matchAny("subclass", "golf", "golf_course", "miniature_golf")),
MultiExpression.entry("fast_food", matchAny("subclass", "fast_food", "food_court")),
MultiExpression.entry("park", matchAny("subclass", "park", "bbq")),
- MultiExpression.entry("bus", matchAny("subclass", "bus_stop", "bus_station")), MultiExpression.entry("railway",
+ MultiExpression.entry("bus", matchAny("subclass", "bus_stop", "bus_station")),
+ MultiExpression.entry("railway",
or(and(matchAny("subclass", "station"), matchAny("mapping_key", "railway")),
matchAny("subclass", "halt", "tram_stop", "subway"))),
MultiExpression.entry("aerialway", and(matchAny("subclass", "station"), matchAny("mapping_key", "aerialway"))),
@@ -1831,11 +1783,13 @@ public class OpenMapTilesSchema {
MultiExpression.entry("laundry", matchAny("subclass", "laundry", "dry_cleaning")),
MultiExpression.entry("grocery",
matchAny("subclass", "supermarket", "deli", "delicatessen", "department_store", "greengrocer",
- "marketplace")), MultiExpression.entry("library", matchAny("subclass", "books", "library")),
+ "marketplace")),
+ MultiExpression.entry("library", matchAny("subclass", "books", "library")),
MultiExpression.entry("college", matchAny("subclass", "university", "college")),
MultiExpression.entry("lodging",
matchAny("subclass", "hotel", "motel", "bed_and_breakfast", "guest_house", "hostel", "chalet", "alpine_hut",
- "dormitory")), MultiExpression.entry("ice_cream", matchAny("subclass", "chocolate", "confectionery")),
+ "dormitory")),
+ MultiExpression.entry("ice_cream", matchAny("subclass", "chocolate", "confectionery")),
MultiExpression.entry("post", matchAny("subclass", "post_box", "post_office")),
MultiExpression.entry("cafe", matchAny("subclass", "cafe")),
MultiExpression.entry("school", matchAny("subclass", "school", "kindergarten")),
@@ -1855,14 +1809,13 @@ public class OpenMapTilesSchema {
MultiExpression.entry("castle", matchAny("subclass", "castle", "ruins"))));
}
}
-
/**
* Aerodrome labels
- *
- * Generated from aerodrome_label.yaml
+ *
+ * Generated from aerodrome_label.yaml
*/
public interface AerodromeLabel extends Layer {
-
double BUFFER_SIZE = 64.0;
String LAYER_NAME = "aerodrome_label";
@@ -1873,7 +1826,6 @@ public class OpenMapTilesSchema {
/** Attribute names for map elements in the aerodrome_label layer. */
final class Fields {
-
/** The OSM name
value of the aerodrome. */
public static final String NAME = "name";
/** English name name:en
if available, otherwise name
. */
@@ -1882,8 +1834,8 @@ public class OpenMapTilesSchema {
public static final String NAME_DE = "name_de";
/**
- * Distinguish between more and less important aerodromes. Class is derived from the value of aerodrome
and
+ * Distinguish between more and less important aerodromes. Class is derived from the value of
+ * aerodrome
and
* aerodrome:type
tags.
*
* allowed values:
@@ -1906,23 +1858,19 @@ public class OpenMapTilesSchema {
/** Elevation (ele
) in feets. */
public static final String ELE_FT = "ele_ft";
}
-
/** Attribute values for map elements in the aerodrome_label layer. */
final class FieldValues {
-
public static final String CLASS_INTERNATIONAL = "international";
public static final String CLASS_PUBLIC = "public";
public static final String CLASS_REGIONAL = "regional";
public static final String CLASS_MILITARY = "military";
public static final String CLASS_PRIVATE = "private";
public static final String CLASS_OTHER = "other";
- public static final Set CLASS_VALUES = Set.of("international", "public", "regional", "military",
- "private", "other");
+ public static final Set CLASS_VALUES =
+ Set.of("international", "public", "regional", "military", "private", "other");
}
-
/** Complex mappings to generate attribute values from OSM element tags in the aerodrome_label layer. */
final class FieldMappings {
-
public static final MultiExpression Class = MultiExpression.of(List.of(
MultiExpression.entry("international",
or(matchAny("aerodrome", "international"), matchAny("aerodrome_type", "international"))),
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java
index af81966f..dbaecf62 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java
@@ -52,14 +52,13 @@ import java.util.Map;
* OSM element parsers generated from the imposm3 table definitions
* in the OpenMapTiles vector tile
* schema.
- *
+ *
* These filter and parse the raw OSM key/value attribute pairs on tags into records with fields that match the columns
- * in the tables that imposm3 would generate. Layer implementations can "subscribe" to elements from each "table" but
+ * in the tables that imposm3 would generate. Layer implementations can "subscribe" to elements from each "table" but
* implementing the table's {@code Handler} interface and use the element's typed API to access attributes.
*/
@SuppressWarnings("unused")
public class Tables {
-
/** A parsed OSM element that would appear in a "row" of the imposm3 table. */
public interface Row {
@@ -89,19 +88,16 @@ public class Tables {
}
/** The {@code handlerClass} of a layer handler and it's {@code process} method coerced to a {@link RowHandler}. */
- public record RowHandlerAndClass(
+ public record RowHandlerAndClass (
Class> handlerClass,
RowHandler handler
) {}
-
/** An OSM element that would appear in the {@code osm_water_polygon} table generated by imposm3. */
- public record OsmWaterPolygon(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String natural,
- @Override String landuse, @Override String waterway, @Override String water, @Override boolean isIntermittent,
- @Override boolean isTunnel, @Override boolean isBridge, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithNatural, WithLanduse, WithWaterway, WithWater,
- WithIsIntermittent, WithIsTunnel, WithIsBridge, WithSource {
-
+ public record OsmWaterPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String natural, @Override String landuse, @Override String waterway, @Override String water,
+ @Override boolean isIntermittent, @Override boolean isTunnel, @Override boolean isBridge,
+ @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithNatural, WithLanduse,
+ WithWaterway, WithWater, WithIsIntermittent, WithIsTunnel, WithIsBridge, WithSource {
public OsmWaterPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("natural"), source.getString("landuse"), source.getString("waterway"),
@@ -110,29 +106,24 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(
- or(matchAny("landuse", "reservoir", "basin", "salt_pond"), matchAny("leisure", "swimming_pool"),
+ public static final Expression MAPPING =
+ and(or(matchAny("landuse", "reservoir", "basin", "salt_pond"), matchAny("leisure", "swimming_pool"),
matchAny("natural", "water", "bay", "spring"), matchAny("waterway", "riverbank", "dock"),
matchAny("water", "river")), not(matchAny("covered", "yes")), matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmWaterPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmWaterPolygon}.
*/
public interface Handler {
-
void process(OsmWaterPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_waterway_linestring} table generated by imposm3. */
- public record OsmWaterwayLinestring(
- @Override String waterway, @Override String name, @Override String nameEn, @Override String nameDe,
- @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isIntermittent,
- @Override SourceFeature source
- ) implements Row, WithWaterway, WithName, WithNameEn, WithNameDe, WithIsTunnel, WithIsBridge, WithIsIntermittent,
- WithSource {
-
+ public record OsmWaterwayLinestring(@Override String waterway, @Override String name, @Override String nameEn,
+ @Override String nameDe, @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isIntermittent,
+ @Override SourceFeature source) implements Row, WithWaterway, WithName, WithNameEn, WithNameDe, WithIsTunnel,
+ WithIsBridge, WithIsIntermittent, WithSource {
public OsmWaterwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("waterway"), source.getString("name"), source.getString("name:en"),
source.getString("name:de"), source.getBoolean("tunnel"), source.getBoolean("bridge"),
@@ -140,24 +131,20 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(matchAny("waterway", "stream", "river", "canal", "drain", "ditch"),
- matchType("linestring"));
+ public static final Expression MAPPING =
+ and(matchAny("waterway", "stream", "river", "canal", "drain", "ditch"), matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmWaterwayLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmWaterwayLinestring}.
*/
public interface Handler {
-
void process(OsmWaterwayLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_landcover_polygon} table generated by imposm3. */
- public record OsmLandcoverPolygon(
- @Override String subclass, @Override String mappingKey, @Override SourceFeature source
- ) implements Row, WithSubclass, WithMappingKey, WithSource {
-
+ public record OsmLandcoverPolygon(@Override String subclass, @Override String mappingKey,
+ @Override SourceFeature source) implements Row, WithSubclass, WithMappingKey, WithSource {
public OsmLandcoverPolygon(SourceFeature source, String mappingKey) {
this(source.getString(mappingKey), mappingKey, source);
}
@@ -167,26 +154,23 @@ public class Tables {
matchAny("landuse", "allotments", "farm", "farmland", "orchard", "plant_nursery", "vineyard", "grass",
"grassland", "meadow", "forest", "village_green", "recreation_ground"),
matchAny("natural", "wood", "wetland", "fell", "grassland", "heath", "scrub", "tundra", "glacier", "bare_rock",
- "scree", "beach", "sand", "dune"), matchAny("leisure", "park", "garden", "golf_course"),
- matchAny("wetland", "bog", "swamp", "wet_meadow", "marsh", "reedbed", "saltern", "tidalflat", "saltmarsh",
- "mangrove")), matchType("polygon"));
+ "scree", "beach", "sand", "dune"),
+ matchAny("leisure", "park", "garden", "golf_course"), matchAny("wetland", "bog", "swamp", "wet_meadow", "marsh",
+ "reedbed", "saltern", "tidalflat", "saltmarsh", "mangrove")),
+ matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmLandcoverPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmLandcoverPolygon}.
*/
public interface Handler {
-
void process(OsmLandcoverPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_landuse_polygon} table generated by imposm3. */
- public record OsmLandusePolygon(
- @Override String landuse, @Override String amenity, @Override String leisure, @Override String tourism,
- @Override String place, @Override String waterway, @Override SourceFeature source
- ) implements Row, WithLanduse, WithAmenity, WithLeisure, WithTourism, WithPlace, WithWaterway, WithSource {
-
+ public record OsmLandusePolygon(@Override String landuse, @Override String amenity, @Override String leisure,
+ @Override String tourism, @Override String place, @Override String waterway, @Override SourceFeature source)
+ implements Row, WithLanduse, WithAmenity, WithLeisure, WithTourism, WithPlace, WithWaterway, WithSource {
public OsmLandusePolygon(SourceFeature source, String mappingKey) {
this(source.getString("landuse"), source.getString("amenity"), source.getString("leisure"),
source.getString("tourism"), source.getString("place"), source.getString("waterway"), source);
@@ -197,26 +181,22 @@ public class Tables {
matchAny("landuse", "railway", "cemetery", "military", "residential", "commercial", "industrial", "garages",
"retail"),
matchAny("amenity", "bus_station", "school", "university", "kindergarten", "college", "library", "hospital",
- "grave_yard"), matchAny("leisure", "stadium", "pitch", "playground", "track"),
- matchAny("tourism", "theme_park", "zoo"), matchAny("place", "suburb", "quarter", "neighbourhood"),
- matchAny("waterway", "dam")), matchType("polygon"));
+ "grave_yard"),
+ matchAny("leisure", "stadium", "pitch", "playground", "track"), matchAny("tourism", "theme_park", "zoo"),
+ matchAny("place", "suburb", "quarter", "neighbourhood"), matchAny("waterway", "dam")), matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmLandusePolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmLandusePolygon}.
*/
public interface Handler {
-
void process(OsmLandusePolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_peak_point} table generated by imposm3. */
- public record OsmPeakPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String ele,
- @Override String wikipedia, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithEle, WithWikipedia, WithSource {
-
+ public record OsmPeakPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String ele, @Override String wikipedia, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithEle, WithWikipedia, WithSource {
public OsmPeakPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getString("ele"),
source.getString("wikipedia"), source);
@@ -226,48 +206,39 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("natural", "peak", "volcano", "saddle"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmPeakPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmPeakPoint}.
*/
public interface Handler {
-
void process(OsmPeakPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_mountain_linestring} table generated by imposm3. */
- public record OsmMountainLinestring(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String wikipedia,
- @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithWikipedia, WithSource {
-
+ public record OsmMountainLinestring(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String wikipedia, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithWikipedia, WithSource {
public OsmMountainLinestring(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("wikipedia"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(matchAny("natural", "ridge", "cliff", "arete"),
- matchType("linestring"));
+ public static final Expression MAPPING =
+ and(matchAny("natural", "ridge", "cliff", "arete"), matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmMountainLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmMountainLinestring}.
*/
public interface Handler {
-
void process(OsmMountainLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_park_polygon} table generated by imposm3. */
- public record OsmParkPolygon(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String landuse,
- @Override String leisure, @Override String boundary, @Override String protectionTitle,
- @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithLanduse, WithLeisure, WithBoundary, WithProtectionTitle,
- WithSource {
-
+ public record OsmParkPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String landuse, @Override String leisure, @Override String boundary, @Override String protectionTitle,
+ @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithLanduse, WithLeisure,
+ WithBoundary, WithProtectionTitle, WithSource {
public OsmParkPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("landuse"), source.getString("leisure"), source.getString("boundary"),
@@ -275,25 +246,21 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(
- or(matchAny("leisure", "nature_reserve"), matchAny("boundary", "national_park", "protected_area")),
- matchType("polygon"));
+ public static final Expression MAPPING =
+ and(or(matchAny("leisure", "nature_reserve"), matchAny("boundary", "national_park", "protected_area")),
+ matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmParkPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmParkPolygon}.
*/
public interface Handler {
-
void process(OsmParkPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_aeroway_polygon} table generated by imposm3. */
- public record OsmAerowayPolygon(
- @Override String ref, @Override String aeroway, @Override SourceFeature source
- ) implements Row, WithRef, WithAeroway, WithSource {
-
+ public record OsmAerowayPolygon(@Override String ref, @Override String aeroway, @Override SourceFeature source)
+ implements Row, WithRef, WithAeroway, WithSource {
public OsmAerowayPolygon(SourceFeature source, String mappingKey) {
this(source.getString("ref"), source.getString(mappingKey), source);
}
@@ -305,20 +272,16 @@ public class Tables {
matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmAerowayPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmAerowayPolygon}.
*/
public interface Handler {
-
void process(OsmAerowayPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_aeroway_linestring} table generated by imposm3. */
- public record OsmAerowayLinestring(
- @Override String ref, @Override String aeroway, @Override SourceFeature source
- ) implements Row, WithRef, WithAeroway, WithSource {
-
+ public record OsmAerowayLinestring(@Override String ref, @Override String aeroway, @Override SourceFeature source)
+ implements Row, WithRef, WithAeroway, WithSource {
public OsmAerowayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("ref"), source.getString("aeroway"), source);
}
@@ -327,20 +290,16 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("aeroway", "runway", "taxiway"), matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmAerowayLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmAerowayLinestring}.
*/
public interface Handler {
-
void process(OsmAerowayLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_aeroway_point} table generated by imposm3. */
- public record OsmAerowayPoint(
- @Override String ref, @Override String aeroway, @Override SourceFeature source
- ) implements Row, WithRef, WithAeroway, WithSource {
-
+ public record OsmAerowayPoint(@Override String ref, @Override String aeroway, @Override SourceFeature source)
+ implements Row, WithRef, WithAeroway, WithSource {
public OsmAerowayPoint(SourceFeature source, String mappingKey) {
this(source.getString("ref"), source.getString("aeroway"), source);
}
@@ -349,30 +308,26 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("aeroway", "gate"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmAerowayPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmAerowayPoint}.
*/
public interface Handler {
-
void process(OsmAerowayPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_highway_linestring} table generated by imposm3. */
- public record OsmHighwayLinestring(
- @Override String highway, @Override String construction, @Override String ref, @Override String network,
- @Override int zOrder, @Override long layer, @Override long level, @Override boolean indoor, @Override String name,
- @Override String nameEn, @Override String nameDe, @Override String shortName, @Override boolean isTunnel,
- @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord, @Override int isOneway,
- @Override boolean isArea, @Override String service, @Override String access, @Override boolean toll,
- @Override String usage, @Override String publicTransport, @Override String manMade, @Override String bicycle,
- @Override String foot, @Override String horse, @Override String mtbScale, @Override String sacScale,
- @Override String surface, @Override boolean expressway, @Override SourceFeature source
- ) implements Row, WithHighway, WithConstruction, WithRef, WithNetwork, WithZOrder, WithLayer, WithLevel, WithIndoor,
- WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel, WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway,
- WithIsArea, WithService, WithAccess, WithToll, WithUsage, WithPublicTransport, WithManMade, WithBicycle, WithFoot,
- WithHorse, WithMtbScale, WithSacScale, WithSurface, WithExpressway, WithSource {
-
+ public record OsmHighwayLinestring(@Override String highway, @Override String construction, @Override String ref,
+ @Override String network, @Override int zOrder, @Override long layer, @Override long level,
+ @Override boolean indoor, @Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String shortName, @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isRamp,
+ @Override boolean isFord, @Override int isOneway, @Override boolean isArea, @Override String service,
+ @Override String access, @Override boolean toll, @Override String usage, @Override String publicTransport,
+ @Override String manMade, @Override String bicycle, @Override String foot, @Override String horse,
+ @Override String mtbScale, @Override String sacScale, @Override String surface, @Override boolean expressway,
+ @Override SourceFeature source) implements Row, WithHighway, WithConstruction, WithRef, WithNetwork, WithZOrder,
+ WithLayer, WithLevel, WithIndoor, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel, WithIsBridge,
+ WithIsRamp, WithIsFord, WithIsOneway, WithIsArea, WithService, WithAccess, WithToll, WithUsage, WithPublicTransport,
+ WithManMade, WithBicycle, WithFoot, WithHorse, WithMtbScale, WithSacScale, WithSurface, WithExpressway, WithSource {
public OsmHighwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("highway"), source.getString("construction"), source.getString("ref"),
source.getString("network"), source.getWayZorder(), source.getLong("layer"), source.getLong("level"),
@@ -390,30 +345,27 @@ public class Tables {
matchAny("highway", "motorway", "motorway_link", "trunk", "trunk_link", "primary", "primary_link", "secondary",
"secondary_link", "tertiary", "tertiary_link", "unclassified", "residential", "living_street", "road",
"pedestrian", "path", "footway", "cycleway", "steps", "bridleway", "corridor", "service", "track", "raceway",
- "busway", "construction"), matchAny("public_transport", "platform"), matchAny("man_made", "pier"),
+ "busway", "construction"),
+ matchAny("public_transport", "platform"), matchAny("man_made", "pier"),
matchAny("service", "driveway", "parking_aisle")), matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmHighwayLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmHighwayLinestring}.
*/
public interface Handler {
-
void process(OsmHighwayLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_railway_linestring} table generated by imposm3. */
- public record OsmRailwayLinestring(
- @Override String railway, @Override String ref, @Override String network, @Override int zOrder,
- @Override long layer, @Override long level, @Override boolean indoor, @Override String name,
+ public record OsmRailwayLinestring(@Override String railway, @Override String ref, @Override String network,
+ @Override int zOrder, @Override long layer, @Override long level, @Override boolean indoor, @Override String name,
@Override String nameEn, @Override String nameDe, @Override String shortName, @Override boolean isTunnel,
@Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord, @Override int isOneway,
- @Override boolean isArea, @Override String service, @Override String usage, @Override SourceFeature source
- ) implements Row, WithRailway, WithRef, WithNetwork, WithZOrder, WithLayer, WithLevel, WithIndoor, WithName,
+ @Override boolean isArea, @Override String service, @Override String usage, @Override SourceFeature source)
+ implements Row, WithRailway, WithRef, WithNetwork, WithZOrder, WithLayer, WithLevel, WithIndoor, WithName,
WithNameEn, WithNameDe, WithShortName, WithIsTunnel, WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway, WithIsArea,
WithService, WithUsage, WithSource {
-
public OsmRailwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("railway"), source.getString("ref"), source.getString("network"), source.getWayZorder(),
source.getLong("layer"), source.getLong("level"), source.getBoolean("indoor"), source.getString("name"),
@@ -429,24 +381,21 @@ public class Tables {
matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmRailwayLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmRailwayLinestring}.
*/
public interface Handler {
-
void process(OsmRailwayLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_aerialway_linestring} table generated by imposm3. */
- public record OsmAerialwayLinestring(
- @Override String aerialway, @Override int zOrder, @Override long layer, @Override String name,
- @Override String nameEn, @Override String nameDe, @Override String shortName, @Override boolean isTunnel,
- @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord, @Override int isOneway,
- @Override boolean isArea, @Override String service, @Override String usage, @Override SourceFeature source
- ) implements Row, WithAerialway, WithZOrder, WithLayer, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel,
+ public record OsmAerialwayLinestring(@Override String aerialway, @Override int zOrder, @Override long layer,
+ @Override String name, @Override String nameEn, @Override String nameDe, @Override String shortName,
+ @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord,
+ @Override int isOneway, @Override boolean isArea, @Override String service, @Override String usage,
+ @Override SourceFeature source)
+ implements Row, WithAerialway, WithZOrder, WithLayer, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel,
WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway, WithIsArea, WithService, WithUsage, WithSource {
-
public OsmAerialwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("aerialway"), source.getWayZorder(), source.getLong("layer"), source.getString("name"),
source.getString("name:en"), source.getString("name:de"), source.getString("short_name"),
@@ -456,28 +405,25 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(matchAny("aerialway", "cable_car", "gondola"),
- matchType("linestring"));
+ public static final Expression MAPPING =
+ and(matchAny("aerialway", "cable_car", "gondola"), matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmAerialwayLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmAerialwayLinestring}.
*/
public interface Handler {
-
void process(OsmAerialwayLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_shipway_linestring} table generated by imposm3. */
- public record OsmShipwayLinestring(
- @Override String shipway, @Override int zOrder, @Override long layer, @Override String name,
- @Override String nameEn, @Override String nameDe, @Override String shortName, @Override boolean isTunnel,
- @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord, @Override int isOneway,
- @Override boolean isArea, @Override String service, @Override String usage, @Override SourceFeature source
- ) implements Row, WithShipway, WithZOrder, WithLayer, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel,
+ public record OsmShipwayLinestring(@Override String shipway, @Override int zOrder, @Override long layer,
+ @Override String name, @Override String nameEn, @Override String nameDe, @Override String shortName,
+ @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord,
+ @Override int isOneway, @Override boolean isArea, @Override String service, @Override String usage,
+ @Override SourceFeature source)
+ implements Row, WithShipway, WithZOrder, WithLayer, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel,
WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway, WithIsArea, WithService, WithUsage, WithSource {
-
public OsmShipwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("route"), source.getWayZorder(), source.getLong("layer"), source.getString("name"),
source.getString("name:en"), source.getString("name:de"), source.getString("short_name"),
@@ -490,23 +436,19 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("route", "ferry"), matchType("linestring"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmShipwayLinestring}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmShipwayLinestring}.
*/
public interface Handler {
-
void process(OsmShipwayLinestring element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_highway_polygon} table generated by imposm3. */
- public record OsmHighwayPolygon(
- @Override String highway, @Override int zOrder, @Override long layer, @Override long level,
- @Override boolean indoor, @Override boolean isArea, @Override String publicTransport, @Override String manMade,
- @Override String service, @Override SourceFeature source
- ) implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithIndoor, WithIsArea, WithPublicTransport,
+ public record OsmHighwayPolygon(@Override String highway, @Override int zOrder, @Override long layer,
+ @Override long level, @Override boolean indoor, @Override boolean isArea, @Override String publicTransport,
+ @Override String manMade, @Override String service, @Override SourceFeature source)
+ implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithIndoor, WithIsArea, WithPublicTransport,
WithManMade, WithService, WithSource {
-
public OsmHighwayPolygon(SourceFeature source, String mappingKey) {
this(source.getString("highway"), source.getWayZorder(), source.getLong("layer"), source.getLong("level"),
source.getBoolean("indoor"), source.getBoolean("area"), source.getString("public_transport"),
@@ -514,27 +456,23 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(
- or(matchAny("highway", "path", "cycleway", "bridleway", "footway", "corridor", "pedestrian", "steps"),
+ public static final Expression MAPPING =
+ and(or(matchAny("highway", "path", "cycleway", "bridleway", "footway", "corridor", "pedestrian", "steps"),
matchAny("public_transport", "platform"), matchAny("man_made", "bridge", "pier")), matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmHighwayPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmHighwayPolygon}.
*/
public interface Handler {
-
void process(OsmHighwayPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_highway_point} table generated by imposm3. */
- public record OsmHighwayPoint(
- @Override String highway, @Override int zOrder, @Override long layer, @Override long level, @Override String name,
- @Override String nameEn, @Override String nameDe, @Override String ref, @Override SourceFeature source
- ) implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithName, WithNameEn, WithNameDe, WithRef,
- WithSource {
-
+ public record OsmHighwayPoint(@Override String highway, @Override int zOrder, @Override long layer,
+ @Override long level, @Override String name, @Override String nameEn, @Override String nameDe, @Override String ref,
+ @Override SourceFeature source) implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithName, WithNameEn,
+ WithNameDe, WithRef, WithSource {
public OsmHighwayPoint(SourceFeature source, String mappingKey) {
this(source.getString("highway"), source.getWayZorder(), source.getLong("layer"), source.getLong("level"),
source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getString("ref"),
@@ -545,24 +483,20 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("highway", "motorway_junction"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmHighwayPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmHighwayPoint}.
*/
public interface Handler {
-
void process(OsmHighwayPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_building_polygon} table generated by imposm3. */
- public record OsmBuildingPolygon(
- @Override String material, @Override String colour, @Override String building, @Override String buildingpart,
- @Override String buildingheight, @Override String buildingminHeight, @Override String buildinglevels,
- @Override String buildingminLevel, @Override String height, @Override String minHeight, @Override String levels,
- @Override String minLevel, @Override SourceFeature source
- ) implements Row, WithMaterial, WithColour, WithBuilding, WithBuildingpart, WithBuildingheight, WithBuildingminHeight,
+ public record OsmBuildingPolygon(@Override String material, @Override String colour, @Override String building,
+ @Override String buildingpart, @Override String buildingheight, @Override String buildingminHeight,
+ @Override String buildinglevels, @Override String buildingminLevel, @Override String height,
+ @Override String minHeight, @Override String levels, @Override String minLevel, @Override SourceFeature source)
+ implements Row, WithMaterial, WithColour, WithBuilding, WithBuildingpart, WithBuildingheight, WithBuildingminHeight,
WithBuildinglevels, WithBuildingminLevel, WithHeight, WithMinHeight, WithLevels, WithMinLevel, WithSource {
-
public OsmBuildingPolygon(SourceFeature source, String mappingKey) {
this(source.getString("building:material"), source.getString("building:colour"), source.getString("building"),
source.getString("building:part"), source.getString("building:height"), source.getString("building:min_height"),
@@ -573,76 +507,63 @@ public class Tables {
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(
or(matchField("building:part"), matchField("building"), matchAny("aeroway", "terminal", "hangar"),
- matchAny("location", "underground")), not(matchAny("building", "no", "none", "No")),
- not(matchAny("building:part", "no", "none", "No")), not(matchAny("man_made", "bridge")),
- not(matchAny("location", "underground")), matchType("polygon"));
+ matchAny("location", "underground")),
+ not(matchAny("building", "no", "none", "No")), not(matchAny("building:part", "no", "none", "No")),
+ not(matchAny("man_made", "bridge")), not(matchAny("location", "underground")), matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmBuildingPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmBuildingPolygon}.
*/
public interface Handler {
-
void process(OsmBuildingPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_marine_point} table generated by imposm3. */
- public record OsmMarinePoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String place,
- @Override long rank, @Override boolean isIntermittent, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithRank, WithIsIntermittent, WithSource {
-
+ public record OsmMarinePoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String place, @Override long rank, @Override boolean isIntermittent, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithRank, WithIsIntermittent, WithSource {
public OsmMarinePoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("place"), source.getLong("rank"), source.getBoolean("intermittent"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(matchAny("place", "ocean", "sea"), matchField("name"),
- matchType("point"));
+ public static final Expression MAPPING =
+ and(matchAny("place", "ocean", "sea"), matchField("name"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmMarinePoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmMarinePoint}.
*/
public interface Handler {
-
void process(OsmMarinePoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_continent_point} table generated by imposm3. */
- public record OsmContinentPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithSource {
-
+ public record OsmContinentPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithSource {
public OsmContinentPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(matchAny("place", "continent"), matchField("name"),
- matchType("point"));
+ public static final Expression MAPPING =
+ and(matchAny("place", "continent"), matchField("name"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmContinentPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmContinentPoint}.
*/
public interface Handler {
-
void process(OsmContinentPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_country_point} table generated by imposm3. */
- public record OsmCountryPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override long rank,
- @Override String countryCodeIso31661Alpha2, @Override String iso31661Alpha2, @Override String iso31661,
- @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithCountryCodeIso31661Alpha2, WithIso31661Alpha2,
- WithIso31661, WithSource {
-
+ public record OsmCountryPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override long rank, @Override String countryCodeIso31661Alpha2, @Override String iso31661Alpha2,
+ @Override String iso31661, @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe,
+ WithRank, WithCountryCodeIso31661Alpha2, WithIso31661Alpha2, WithIso31661, WithSource {
public OsmCountryPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getLong("rank"),
source.getString("country_code_iso3166_1_alpha_2"), source.getString("ISO3166-1:alpha2"),
@@ -653,21 +574,17 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("place", "country"), matchField("name"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmCountryPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmCountryPoint}.
*/
public interface Handler {
-
void process(OsmCountryPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_island_polygon} table generated by imposm3. */
- public record OsmIslandPolygon(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override long rank,
- @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithSource {
-
+ public record OsmIslandPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override long rank, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithSource {
public OsmIslandPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getLong("rank"),
source);
@@ -677,21 +594,17 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("place", "island"), matchField("name"), matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmIslandPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmIslandPolygon}.
*/
public interface Handler {
-
void process(OsmIslandPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_island_point} table generated by imposm3. */
- public record OsmIslandPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override long rank,
- @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithSource {
-
+ public record OsmIslandPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override long rank, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithSource {
public OsmIslandPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getLong("rank"),
source);
@@ -701,23 +614,18 @@ public class Tables {
public static final Expression MAPPING = and(matchAny("place", "island"), matchField("name"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmIslandPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmIslandPoint}.
*/
public interface Handler {
-
void process(OsmIslandPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_state_point} table generated by imposm3. */
- public record OsmStatePoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String place,
- @Override String isInCountry, @Override String isInCountryCode, @Override String ref, @Override long rank,
- @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithIsInCountry, WithIsInCountryCode, WithRef,
- WithRank, WithSource {
-
+ public record OsmStatePoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String place, @Override String isInCountry, @Override String isInCountryCode, @Override String ref,
+ @Override long rank, @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithPlace,
+ WithIsInCountry, WithIsInCountryCode, WithRef, WithRank, WithSource {
public OsmStatePoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("place"), source.getString("is_in:country"), source.getString("is_in:country_code"),
@@ -725,25 +633,22 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
- public static final Expression MAPPING = and(matchAny("place", "state", "province"), matchField("name"),
- matchType("point"));
+ public static final Expression MAPPING =
+ and(matchAny("place", "state", "province"), matchField("name"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmStatePoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmStatePoint}.
*/
public interface Handler {
-
void process(OsmStatePoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_city_point} table generated by imposm3. */
- public record OsmCityPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String place,
- @Override long population, @Override String capital, @Override long rank, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithPopulation, WithCapital, WithRank, WithSource {
-
+ public record OsmCityPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String place, @Override long population, @Override String capital, @Override long rank,
+ @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithPopulation, WithCapital, WithRank, WithSource {
public OsmCityPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("place"), source.getLong("population"), source.getString("capital"), source.getLong("rank"),
@@ -756,19 +661,16 @@ public class Tables {
matchField("name"), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmCityPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmCityPoint}.
*/
public interface Handler {
-
void process(OsmCityPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_housenumber_point} table generated by imposm3. */
- public record OsmHousenumberPoint(@Override String housenumber, @Override SourceFeature source) implements Row,
- WithHousenumber, WithSource {
-
+ public record OsmHousenumberPoint(@Override String housenumber, @Override SourceFeature source)
+ implements Row, WithHousenumber, WithSource {
public OsmHousenumberPoint(SourceFeature source, String mappingKey) {
this(source.getString("addr:housenumber"), source);
}
@@ -778,24 +680,20 @@ public class Tables {
and(matchField("addr:housenumber"), matchType("polygon")));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmHousenumberPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmHousenumberPoint}.
*/
public interface Handler {
-
void process(OsmHousenumberPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_poi_point} table generated by imposm3. */
- public record OsmPoiPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String subclass,
- @Override String mappingKey, @Override String station, @Override String funicular, @Override String information,
- @Override String uicRef, @Override String religion, @Override long level, @Override boolean indoor,
- @Override long layer, @Override String sport, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithSubclass, WithMappingKey, WithStation, WithFunicular,
+ public record OsmPoiPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String subclass, @Override String mappingKey, @Override String station, @Override String funicular,
+ @Override String information, @Override String uicRef, @Override String religion, @Override long level,
+ @Override boolean indoor, @Override long layer, @Override String sport, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithSubclass, WithMappingKey, WithStation, WithFunicular,
WithInformation, WithUicRef, WithReligion, WithLevel, WithIndoor, WithLayer, WithSport, WithSource {
-
public OsmPoiPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString(mappingKey), mappingKey, source.getString("station"), source.getString("funicular"),
@@ -814,12 +712,14 @@ public class Tables {
"public_building", "recycling", "restaurant", "school", "shelter", "swimming_pool", "taxi", "telephone",
"theatre", "toilets", "townhall", "university", "veterinary", "waste_basket"),
matchAny("barrier", "bollard", "border_control", "cycle_barrier", "gate", "lift_gate", "sally_port", "stile",
- "toll_booth"), matchAny("building", "dormitory"), matchAny("highway", "bus_stop"),
+ "toll_booth"),
+ matchAny("building", "dormitory"), matchAny("highway", "bus_stop"),
matchAny("historic", "monument", "castle", "ruins"),
matchAny("landuse", "basin", "brownfield", "cemetery", "reservoir", "winter_sports"),
matchAny("leisure", "dog_park", "escape_game", "garden", "golf_course", "ice_rink", "hackerspace", "marina",
"miniature_golf", "park", "pitch", "playground", "sports_centre", "stadium", "swimming_area", "swimming_pool",
- "water_park"), matchAny("office", "diplomatic"),
+ "water_park"),
+ matchAny("office", "diplomatic"),
matchAny("railway", "halt", "station", "subway_entrance", "train_station_entrance", "tram_stop"),
matchAny("shop", "accessories", "alcohol", "antiques", "art", "bag", "bakery", "beauty", "bed", "beverages",
"bicycle", "books", "boutique", "butcher", "camera", "car", "car_repair", "car_parts", "carpet", "charity",
@@ -843,27 +743,24 @@ public class Tables {
"toboggan", "volleyball", "water_ski", "yoga"),
matchAny("tourism", "alpine_hut", "aquarium", "artwork", "attraction", "bed_and_breakfast", "camp_site",
"caravan_site", "chalet", "gallery", "guest_house", "hostel", "hotel", "information", "motel", "museum",
- "picnic_site", "theme_park", "viewpoint", "zoo"), matchAny("waterway", "dock")), matchType("point"));
+ "picnic_site", "theme_park", "viewpoint", "zoo"),
+ matchAny("waterway", "dock")), matchType("point"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmPoiPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmPoiPoint}.
*/
public interface Handler {
-
void process(OsmPoiPoint element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_poi_polygon} table generated by imposm3. */
- public record OsmPoiPolygon(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String subclass,
- @Override String mappingKey, @Override String station, @Override String funicular, @Override String information,
- @Override String uicRef, @Override String religion, @Override long level, @Override boolean indoor,
- @Override long layer, @Override String sport, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithSubclass, WithMappingKey, WithStation, WithFunicular,
+ public record OsmPoiPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String subclass, @Override String mappingKey, @Override String station, @Override String funicular,
+ @Override String information, @Override String uicRef, @Override String religion, @Override long level,
+ @Override boolean indoor, @Override long layer, @Override String sport, @Override SourceFeature source)
+ implements Row, WithName, WithNameEn, WithNameDe, WithSubclass, WithMappingKey, WithStation, WithFunicular,
WithInformation, WithUicRef, WithReligion, WithLevel, WithIndoor, WithLayer, WithSport, WithSource {
-
public OsmPoiPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString(mappingKey), mappingKey, source.getString("station"), source.getString("funicular"),
@@ -882,12 +779,14 @@ public class Tables {
"public_building", "recycling", "restaurant", "school", "shelter", "swimming_pool", "taxi", "telephone",
"theatre", "toilets", "townhall", "university", "veterinary", "waste_basket"),
matchAny("barrier", "bollard", "border_control", "cycle_barrier", "gate", "lift_gate", "sally_port", "stile",
- "toll_booth"), matchAny("building", "dormitory"), matchAny("highway", "bus_stop"),
+ "toll_booth"),
+ matchAny("building", "dormitory"), matchAny("highway", "bus_stop"),
matchAny("historic", "monument", "castle", "ruins"),
matchAny("landuse", "basin", "brownfield", "cemetery", "reservoir", "winter_sports"),
matchAny("leisure", "dog_park", "escape_game", "garden", "golf_course", "ice_rink", "hackerspace", "marina",
"miniature_golf", "park", "pitch", "playground", "sports_centre", "stadium", "swimming_area", "swimming_pool",
- "water_park"), matchAny("office", "diplomatic"),
+ "water_park"),
+ matchAny("office", "diplomatic"),
matchAny("railway", "halt", "station", "subway_entrance", "train_station_entrance", "tram_stop"),
matchAny("shop", "accessories", "alcohol", "antiques", "art", "bag", "bakery", "beauty", "bed", "beverages",
"bicycle", "books", "boutique", "butcher", "camera", "car", "car_repair", "car_parts", "carpet", "charity",
@@ -911,26 +810,22 @@ public class Tables {
"toboggan", "volleyball", "water_ski", "yoga"),
matchAny("tourism", "alpine_hut", "aquarium", "artwork", "attraction", "bed_and_breakfast", "camp_site",
"caravan_site", "chalet", "gallery", "guest_house", "hostel", "hotel", "information", "motel", "museum",
- "picnic_site", "theme_park", "viewpoint", "zoo"), matchAny("waterway", "dock")), matchType("polygon"));
+ "picnic_site", "theme_park", "viewpoint", "zoo"),
+ matchAny("waterway", "dock")), matchType("polygon"));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmPoiPolygon}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmPoiPolygon}.
*/
public interface Handler {
-
void process(OsmPoiPolygon element, FeatureCollector features);
}
}
-
/** An OSM element that would appear in the {@code osm_aerodrome_label_point} table generated by imposm3. */
- public record OsmAerodromeLabelPoint(
- @Override String name, @Override String nameEn, @Override String nameDe, @Override String aerodromeType,
- @Override String aerodrome, @Override String military, @Override String iata, @Override String icao,
- @Override String ele, @Override SourceFeature source
- ) implements Row, WithName, WithNameEn, WithNameDe, WithAerodromeType, WithAerodrome, WithMilitary, WithIata,
- WithIcao, WithEle, WithSource {
-
+ public record OsmAerodromeLabelPoint(@Override String name, @Override String nameEn, @Override String nameDe,
+ @Override String aerodromeType, @Override String aerodrome, @Override String military, @Override String iata,
+ @Override String icao, @Override String ele, @Override SourceFeature source) implements Row, WithName, WithNameEn,
+ WithNameDe, WithAerodromeType, WithAerodrome, WithMilitary, WithIata, WithIcao, WithEle, WithSource {
public OsmAerodromeLabelPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("aerodrome:type"), source.getString("aerodrome"), source.getString("military"),
@@ -942,576 +837,480 @@ public class Tables {
and(matchAny("aeroway", "aerodrome"), matchType("polygon")));
/**
- * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
- * OsmAerodromeLabelPoint}.
+ * Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
+ * {@link OsmAerodromeLabelPoint}.
*/
public interface Handler {
-
void process(OsmAerodromeLabelPoint element, FeatureCollector features);
}
}
-
/** Rows with a String access attribute. */
public interface WithAccess {
-
String access();
}
/** Rows with a long adminLevel attribute. */
public interface WithAdminLevel {
-
long adminLevel();
}
/** Rows with a String aerialway attribute. */
public interface WithAerialway {
-
String aerialway();
}
/** Rows with a String aerodrome attribute. */
public interface WithAerodrome {
-
String aerodrome();
}
/** Rows with a String aerodromeType attribute. */
public interface WithAerodromeType {
-
String aerodromeType();
}
/** Rows with a String aeroway attribute. */
public interface WithAeroway {
-
String aeroway();
}
/** Rows with a String amenity attribute. */
public interface WithAmenity {
-
String amenity();
}
/** Rows with a String bicycle attribute. */
public interface WithBicycle {
-
String bicycle();
}
/** Rows with a String boundary attribute. */
public interface WithBoundary {
-
String boundary();
}
/** Rows with a String building attribute. */
public interface WithBuilding {
-
String building();
}
/** Rows with a String buildingheight attribute. */
public interface WithBuildingheight {
-
String buildingheight();
}
/** Rows with a String buildinglevels attribute. */
public interface WithBuildinglevels {
-
String buildinglevels();
}
/** Rows with a String buildingminHeight attribute. */
public interface WithBuildingminHeight {
-
String buildingminHeight();
}
/** Rows with a String buildingminLevel attribute. */
public interface WithBuildingminLevel {
-
String buildingminLevel();
}
/** Rows with a String buildingpart attribute. */
public interface WithBuildingpart {
-
String buildingpart();
}
/** Rows with a String capital attribute. */
public interface WithCapital {
-
String capital();
}
/** Rows with a String claimedBy attribute. */
public interface WithClaimedBy {
-
String claimedBy();
}
/** Rows with a String colour attribute. */
public interface WithColour {
-
String colour();
}
/** Rows with a String construction attribute. */
public interface WithConstruction {
-
String construction();
}
/** Rows with a String countryCodeIso31661Alpha2 attribute. */
public interface WithCountryCodeIso31661Alpha2 {
-
String countryCodeIso31661Alpha2();
}
/** Rows with a String ele attribute. */
public interface WithEle {
-
String ele();
}
/** Rows with a boolean expressway attribute. */
public interface WithExpressway {
-
boolean expressway();
}
/** Rows with a String foot attribute. */
public interface WithFoot {
-
String foot();
}
/** Rows with a String funicular attribute. */
public interface WithFunicular {
-
String funicular();
}
/** Rows with a String height attribute. */
public interface WithHeight {
-
String height();
}
/** Rows with a String highway attribute. */
public interface WithHighway {
-
String highway();
}
/** Rows with a String horse attribute. */
public interface WithHorse {
-
String horse();
}
/** Rows with a String housenumber attribute. */
public interface WithHousenumber {
-
String housenumber();
}
/** Rows with a String iata attribute. */
public interface WithIata {
-
String iata();
}
/** Rows with a String icao attribute. */
public interface WithIcao {
-
String icao();
}
/** Rows with a boolean indoor attribute. */
public interface WithIndoor {
-
boolean indoor();
}
/** Rows with a String information attribute. */
public interface WithInformation {
-
String information();
}
/** Rows with a boolean isArea attribute. */
public interface WithIsArea {
-
boolean isArea();
}
/** Rows with a boolean isBridge attribute. */
public interface WithIsBridge {
-
boolean isBridge();
}
/** Rows with a boolean isFord attribute. */
public interface WithIsFord {
-
boolean isFord();
}
/** Rows with a String isInCountry attribute. */
public interface WithIsInCountry {
-
String isInCountry();
}
/** Rows with a String isInCountryCode attribute. */
public interface WithIsInCountryCode {
-
String isInCountryCode();
}
/** Rows with a boolean isIntermittent attribute. */
public interface WithIsIntermittent {
-
boolean isIntermittent();
}
/** Rows with a int isOneway attribute. */
public interface WithIsOneway {
-
int isOneway();
}
/** Rows with a boolean isRamp attribute. */
public interface WithIsRamp {
-
boolean isRamp();
}
/** Rows with a boolean isTunnel attribute. */
public interface WithIsTunnel {
-
boolean isTunnel();
}
/** Rows with a String iso31661 attribute. */
public interface WithIso31661 {
-
String iso31661();
}
/** Rows with a String iso31661Alpha2 attribute. */
public interface WithIso31661Alpha2 {
-
String iso31661Alpha2();
}
/** Rows with a String landuse attribute. */
public interface WithLanduse {
-
String landuse();
}
/** Rows with a long layer attribute. */
public interface WithLayer {
-
long layer();
}
/** Rows with a String leisure attribute. */
public interface WithLeisure {
-
String leisure();
}
/** Rows with a long level attribute. */
public interface WithLevel {
-
long level();
}
/** Rows with a String levels attribute. */
public interface WithLevels {
-
String levels();
}
/** Rows with a String manMade attribute. */
public interface WithManMade {
-
String manMade();
}
/** Rows with a String mappingKey attribute. */
public interface WithMappingKey {
-
String mappingKey();
}
/** Rows with a String material attribute. */
public interface WithMaterial {
-
String material();
}
/** Rows with a String military attribute. */
public interface WithMilitary {
-
String military();
}
/** Rows with a String minHeight attribute. */
public interface WithMinHeight {
-
String minHeight();
}
/** Rows with a String minLevel attribute. */
public interface WithMinLevel {
-
String minLevel();
}
/** Rows with a String mtbScale attribute. */
public interface WithMtbScale {
-
String mtbScale();
}
/** Rows with a String name attribute. */
public interface WithName {
-
String name();
}
/** Rows with a String nameDe attribute. */
public interface WithNameDe {
-
String nameDe();
}
/** Rows with a String nameEn attribute. */
public interface WithNameEn {
-
String nameEn();
}
/** Rows with a String natural attribute. */
public interface WithNatural {
-
String natural();
}
/** Rows with a String network attribute. */
public interface WithNetwork {
-
String network();
}
/** Rows with a String osmcSymbol attribute. */
public interface WithOsmcSymbol {
-
String osmcSymbol();
}
/** Rows with a String place attribute. */
public interface WithPlace {
-
String place();
}
/** Rows with a long population attribute. */
public interface WithPopulation {
-
long population();
}
/** Rows with a String protectionTitle attribute. */
public interface WithProtectionTitle {
-
String protectionTitle();
}
/** Rows with a String publicTransport attribute. */
public interface WithPublicTransport {
-
String publicTransport();
}
/** Rows with a String railway attribute. */
public interface WithRailway {
-
String railway();
}
/** Rows with a long rank attribute. */
public interface WithRank {
-
long rank();
}
/** Rows with a String ref attribute. */
public interface WithRef {
-
String ref();
}
/** Rows with a String relbuildingheight attribute. */
public interface WithRelbuildingheight {
-
String relbuildingheight();
}
/** Rows with a String relbuildinglevels attribute. */
public interface WithRelbuildinglevels {
-
String relbuildinglevels();
}
/** Rows with a String relbuildingminHeight attribute. */
public interface WithRelbuildingminHeight {
-
String relbuildingminHeight();
}
/** Rows with a String relbuildingminLevel attribute. */
public interface WithRelbuildingminLevel {
-
String relbuildingminLevel();
}
/** Rows with a String relheight attribute. */
public interface WithRelheight {
-
String relheight();
}
/** Rows with a String religion attribute. */
public interface WithReligion {
-
String religion();
}
/** Rows with a String rellevels attribute. */
public interface WithRellevels {
-
String rellevels();
}
/** Rows with a String relminHeight attribute. */
public interface WithRelminHeight {
-
String relminHeight();
}
/** Rows with a String relminLevel attribute. */
public interface WithRelminLevel {
-
String relminLevel();
}
/** Rows with a String sacScale attribute. */
public interface WithSacScale {
-
String sacScale();
}
/** Rows with a String service attribute. */
public interface WithService {
-
String service();
}
/** Rows with a String shipway attribute. */
public interface WithShipway {
-
String shipway();
}
/** Rows with a String shortName attribute. */
public interface WithShortName {
-
String shortName();
}
/** Rows with a SourceFeature source attribute. */
public interface WithSource {
-
SourceFeature source();
}
/** Rows with a String sport attribute. */
public interface WithSport {
-
String sport();
}
/** Rows with a String station attribute. */
public interface WithStation {
-
String station();
}
/** Rows with a String subclass attribute. */
public interface WithSubclass {
-
String subclass();
}
/** Rows with a String surface attribute. */
public interface WithSurface {
-
String surface();
}
/** Rows with a boolean toll attribute. */
public interface WithToll {
-
boolean toll();
}
/** Rows with a String tourism attribute. */
public interface WithTourism {
-
String tourism();
}
/** Rows with a String uicRef attribute. */
public interface WithUicRef {
-
String uicRef();
}
/** Rows with a String usage attribute. */
public interface WithUsage {
-
String usage();
}
/** Rows with a String water attribute. */
public interface WithWater {
-
String water();
}
/** Rows with a String waterway attribute. */
public interface WithWaterway {
-
String waterway();
}
/** Rows with a String wikipedia attribute. */
public interface WithWikipedia {
-
String wikipedia();
}
/** Rows with a int zOrder attribute. */
public interface WithZOrder {
-
int zOrder();
}
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java
index e5d4bcd8..09038b4a 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java
@@ -51,7 +51,8 @@ import com.onthegomap.planetiler.util.Translations;
/**
* Defines the logic for generating map elements in the {@code aerodrome_label} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
+ * This class is ported to Java from
+ * OpenMapTiles
* aerodrome_layer sql files.
*/
public class AerodromeLabel implements
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java
index 9e5201c1..230a965c 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java
@@ -45,8 +45,8 @@ import com.onthegomap.planetiler.util.Translations;
/**
* Defines the logic for generating map elements in the {@code aeroway} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * aeroway sql files.
+ * This class is ported to Java from
+ * OpenMapTiles aeroway sql files.
*/
public class Aeroway implements
OpenMapTilesSchema.Aeroway,
@@ -54,8 +54,7 @@ public class Aeroway implements
Tables.OsmAerowayPolygon.Handler,
Tables.OsmAerowayPoint.Handler {
- public Aeroway(Translations translations, PlanetilerConfig config, Stats stats) {
- }
+ public Aeroway(Translations translations, PlanetilerConfig config, Stats stats) {}
@Override
public void process(Tables.OsmAerowayPolygon element, FeatureCollector features) {
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java
index 77247ce7..310c019b 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java
@@ -86,8 +86,9 @@ import org.slf4j.LoggerFactory;
* Defines the logic for generating map elements for country, state, and town boundaries in the {@code boundary} layer
* from source features.
*
- * This class is ported to Java from OpenMapTiles
- * boundary sql files.
+ * This class is ported to Java from
+ * OpenMapTiles boundary sql
+ * files.
*/
public class Boundary implements
OpenMapTilesSchema.Boundary,
@@ -164,13 +165,13 @@ public class Boundary implements
BoundaryInfo info = switch (table) {
case "ne_110m_admin_0_boundary_lines_land" -> new BoundaryInfo(2, 0, 0);
case "ne_50m_admin_0_boundary_lines_land" -> new BoundaryInfo(2, 1, 3);
- case "ne_10m_admin_0_boundary_lines_land" -> feature.hasTag("featurecla", "Lease Limit") ? null
- : new BoundaryInfo(2, 4, 4);
+ case "ne_10m_admin_0_boundary_lines_land" -> feature.hasTag("featurecla", "Lease Limit") ? null :
+ new BoundaryInfo(2, 4, 4);
case "ne_10m_admin_1_states_provinces_lines" -> {
Double minZoom = Parse.parseDoubleOrNull(feature.getTag("min_zoom"));
yield minZoom != null && minZoom <= 7 ? new BoundaryInfo(4, 1, 4) :
minZoom != null && minZoom <= 7.7 ? new BoundaryInfo(4, 4, 4) :
- null;
+ null;
}
default -> null;
};
@@ -250,8 +251,8 @@ public class Boundary implements
int minzoom =
(maritime && minAdminLevel == 2) ? 4 :
minAdminLevel <= 4 ? 5 :
- minAdminLevel <= 6 ? 9 :
- minAdminLevel <= 8 ? 11 : 12;
+ minAdminLevel <= 6 ? 9 :
+ minAdminLevel <= 8 ? 11 : 12;
if (addCountryNames && !regionIds.isEmpty()) {
// save for later
try {
@@ -398,8 +399,7 @@ public class Boundary implements
try {
Geometry combined = polygonizer.getGeometry().union();
if (combined.isEmpty()) {
- LOGGER.warn("Unable to form closed polygon for OSM relation " + regionId
- + " (likely missing edges)");
+ LOGGER.warn("Unable to form closed polygon for OSM relation " + regionId + " (likely missing edges)");
} else {
countryBoundaries.put(regionId, PreparedGeometryFactory.prepare(combined));
}
@@ -429,8 +429,7 @@ public class Boundary implements
}
/**
- * Minimal set of information extracted from a boundary relation to be used when processing each way in that
- * relation.
+ * Minimal set of information extracted from a boundary relation to be used when processing each way in that relation.
*/
private record BoundaryRelation(
long id,
@@ -443,17 +442,15 @@ public class Boundary implements
@Override
public long estimateMemoryUsageBytes() {
- return CLASS_HEADER_BYTES
- + MemoryEstimator.estimateSizeLong(id)
- + MemoryEstimator.estimateSizeInt(adminLevel)
- + estimateSize(disputed)
- + POINTER_BYTES + estimateSize(name)
- + POINTER_BYTES + estimateSize(claimedBy)
- + POINTER_BYTES + estimateSize(iso3166alpha3);
+ return CLASS_HEADER_BYTES + MemoryEstimator.estimateSizeLong(id) + MemoryEstimator.estimateSizeInt(adminLevel) +
+ estimateSize(disputed) + POINTER_BYTES + estimateSize(name) + POINTER_BYTES + estimateSize(claimedBy) +
+ POINTER_BYTES + estimateSize(iso3166alpha3);
}
}
- /** Information to hold onto from processing a way in a boundary relation to determine the left/right region ID later. */
+ /**
+ * Information to hold onto from processing a way in a boundary relation to determine the left/right region ID later.
+ */
private record CountryBoundaryComponent(
int adminLevel,
boolean disputed,
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java
index dd2e61fe..ccab4f26 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java
@@ -60,8 +60,9 @@ import java.util.Map;
/**
* Defines the logic for generating map elements for buildings in the {@code building} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * building sql files.
+ * This class is ported to Java from
+ * OpenMapTiles building sql
+ * files.
*/
public class Building implements
OpenMapTilesSchema.Building,
@@ -154,10 +155,8 @@ public class Building implements
parseDoubleOrNull(element.buildingminLevel())
);
- int renderHeight = (int) Math.ceil(height != null ? height
- : levels != null ? (levels * 3.66) : 5);
- int renderMinHeight = (int) Math.floor(minHeight != null ? minHeight
- : minLevels != null ? (minLevels * 3.66) : 0);
+ int renderHeight = (int) Math.ceil(height != null ? height : levels != null ? (levels * 3.66) : 5);
+ int renderMinHeight = (int) Math.floor(minHeight != null ? minHeight : minLevels != null ? (minLevels * 3.66) : 0);
if (renderHeight < 3660 && renderMinHeight < 3660) {
var feature = features.polygon(LAYER_NAME).setBufferPixels(BUFFER_SIZE)
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java
index b25823bb..1526459c 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java
@@ -45,15 +45,15 @@ import com.onthegomap.planetiler.util.Translations;
/**
* Defines the logic for generating map elements in the {@code housenumber} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * housenumber sql files.
+ * This class is ported to Java from
+ * OpenMapTiles housenumber sql
+ * files.
*/
public class Housenumber implements
OpenMapTilesSchema.Housenumber,
Tables.OsmHousenumberPoint.Handler {
- public Housenumber(Translations translations, PlanetilerConfig config, Stats stats) {
- }
+ public Housenumber(Translations translations, PlanetilerConfig config, Stats stats) {}
@Override
public void process(Tables.OsmHousenumberPoint element, FeatureCollector features) {
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java
index e01068e6..04a5746a 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java
@@ -57,8 +57,9 @@ import java.util.Set;
* Defines the logic for generating map elements for natural land cover polygons like ice, sand, and forest in the
* {@code landcover} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * landcover sql files.
+ * This class is ported to Java from
+ * OpenMapTiles landcover sql
+ * files.
*/
public class Landcover implements
OpenMapTilesSchema.Landcover,
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java
index f69722a1..54505839 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java
@@ -55,8 +55,8 @@ import java.util.Set;
* Defines the logic for generating map elements for man-made land use polygons like cemeteries, zoos, and hospitals in
* the {@code landuse} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * landuse sql files.
+ * This class is ported to Java from
+ * OpenMapTiles landuse sql files.
*/
public class Landuse implements
OpenMapTilesSchema.Landuse,
@@ -75,8 +75,7 @@ public class Landuse implements
FieldValues.CLASS_NEIGHBOURHOOD
);
- public Landuse(Translations translations, PlanetilerConfig config, Stats stats) {
- }
+ public Landuse(Translations translations, PlanetilerConfig config, Stats stats) {}
@Override
public void processNaturalEarth(String table, SourceFeature feature, FeatureCollector features) {
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java
index d5114a1f..dc19f4ed 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java
@@ -65,8 +65,9 @@ import org.slf4j.LoggerFactory;
* Defines the logic for generating map elements for mountain peak label points in the {@code mountain_peak} layer from
* source features.
*
- * This class is ported to Java from OpenMapTiles
- * mountain_peak sql files.
+ * This class is ported to Java from
+ * OpenMapTiles mountain_peak
+ * sql files.
*/
public class MountainPeak implements
BasemapProfile.NaturalEarthProcessor,
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java
index 9db6831f..4d39424a 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java
@@ -62,8 +62,8 @@ import java.util.Locale;
* Defines the logic for generating map elements for designated parks polygons and their label points in the {@code
* park} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * park sql files.
+ * This class is ported to Java from
+ * OpenMapTiles park sql files.
*/
public class Park implements
OpenMapTilesSchema.Park,
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java
index be38d5b1..50dfc2ad 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java
@@ -76,8 +76,8 @@ import org.locationtech.jts.geom.Point;
* Defines the logic for generating label points for populated places like continents, countries, cities, and towns in
* the {@code place} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * place sql files.
+ * This class is ported to Java from
+ * OpenMapTiles place sql files.
*/
public class Place implements
OpenMapTilesSchema.Place,
@@ -142,11 +142,11 @@ public class Place implements
// ORDER BY "rank" ASC NULLS LAST,
.orderByInt(rank == null ? 15 : rank, 0, 15) // 4 bits
// place ASC NULLS LAST,
- .thenByInt(place == null ? 15 : place.ordinal(), 0, 15) // 4 bits
+ .thenByInt(place == null ? 15 : place.ordinal(), 0, 15) // 4 bits
// population DESC NULLS LAST,
.thenByLog(population, MAX_CITY_POPULATION, 1, 1 << (SORT_KEY_BITS - 13) - 1)
// length(name) ASC
- .thenByInt(name == null ? 0 : name.length(), 0, 31) // 5 bits
+ .thenByInt(name == null ? 0 : name.length(), 0, 31) // 5 bits
.get();
}
@@ -340,9 +340,9 @@ public class Place implements
int minzoom = rank != null && rank == 1 ? 2 :
rank != null && rank <= 8 ? Math.max(3, rank - 1) :
- placeType.ordinal() <= PlaceType.TOWN.ordinal() ? 7 :
- placeType.ordinal() <= PlaceType.VILLAGE.ordinal() ? 8 :
- placeType.ordinal() <= PlaceType.SUBURB.ordinal() ? 11 : 14;
+ placeType.ordinal() <= PlaceType.TOWN.ordinal() ? 7 :
+ placeType.ordinal() <= PlaceType.VILLAGE.ordinal() ? 8 :
+ placeType.ordinal() <= PlaceType.SUBURB.ordinal() ? 11 : 14;
var feature = features.point(LAYER_NAME).setBufferPixels(BUFFER_SIZE)
.putAttrs(LanguageUtils.getNames(element.source().tags(), translations))
@@ -420,9 +420,7 @@ public class Place implements
}
/**
- * Information extracted from a natural earth place label that will be inspected when joining with OpenStreetMap
- * data.
+ * Information extracted from a natural earth place label that will be inspected when joining with OpenStreetMap data.
*/
private record NaturalEarthPoint(String name, String wikidata, int scaleRank, Set names) {}
}
-
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java
index 49b7a4bb..546deb02 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java
@@ -61,8 +61,8 @@ import java.util.Map;
* Defines the logic for generating map elements for things like shops, parks, and schools in the {@code poi} layer from
* source features.
*
- * This class is ported to Java from OpenMapTiles
- * poi sql files.
+ * This class is ported to Java from
+ * OpenMapTiles poi sql files.
*/
public class Poi implements
OpenMapTilesSchema.Poi,
@@ -136,19 +136,8 @@ public class Poi implements
setupPoiFeature(element, features.centroidIfConvex(LAYER_NAME));
}
- private
- void setupPoiFeature(T element, FeatureCollector.Feature output) {
+ private void setupPoiFeature(
+ T element, FeatureCollector.Feature output) {
String rawSubclass = element.subclass();
if ("station".equals(rawSubclass) && "subway".equals(element.station())) {
rawSubclass = "subway";
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java
index 2648b71b..dacc80c4 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java
@@ -80,8 +80,9 @@ import org.slf4j.LoggerFactory;
* Defines the logic for generating map elements for roads, shipways, railroads, and paths in the {@code transportation}
* layer from source features.
*
- * This class is ported to Java from OpenMapTiles
- * transportation sql files.
+ * This class is ported to Java from
+ * OpenMapTiles transportation
+ * sql files.
*/
public class Transportation implements
OpenMapTilesSchema.Transportation,
@@ -214,7 +215,7 @@ public class Transportation implements
private static String railwayClass(String value) {
return value == null ? null :
RAILWAY_RAIL_VALUES.contains(value) ? "rail" :
- RAILWAY_TRANSIT_VALUES.contains(value) ? "transit" : null;
+ RAILWAY_TRANSIT_VALUES.contains(value) ? "transit" : null;
}
static String highwayClass(String highway, String publicTransport, String construction, String manMade) {
@@ -320,8 +321,8 @@ public class Transportation implements
Geometry wayGeometry = element.source().worldGeometry();
if (greatBritain.intersects(wayGeometry)) {
Transportation.RouteNetwork networkType =
- "motorway".equals(element.highway()) ? Transportation.RouteNetwork.GB_MOTORWAY
- : Transportation.RouteNetwork.GB_TRUNK;
+ "motorway".equals(element.highway()) ? Transportation.RouteNetwork.GB_MOTORWAY :
+ Transportation.RouteNetwork.GB_TRUNK;
String network = "motorway".equals(element.highway()) ? "omt-gb-motorway" : "omt-gb-trunk";
result.add(new RouteRelation(refMatcher.group(), network, networkType, (byte) -1,
0));
@@ -434,7 +435,7 @@ public class Transportation implements
private boolean isPierPolygon(Tables.OsmHighwayLinestring element) {
if ("pier".equals(element.manMade())) {
try {
- if (element.source().worldGeometry() instanceof LineString lineString && lineString.isClosed()) {
+ if (element.source().worldGeometry()instanceof LineString lineString && lineString.isClosed()) {
// ignore this because it's a polygon
return true;
}
diff --git a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java
index 05c2a7c6..efe4493a 100644
--- a/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java
+++ b/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java
@@ -67,7 +67,8 @@ import java.util.function.Function;
* Defines the logic for generating map elements for road, shipway, rail, and path names in the {@code
* transportation_name} layer from source features.
*
- * This class is ported to Java from OpenMapTiles
+ * This class is ported to Java from
+ * OpenMapTiles
* transportation_name sql files.
*/
public class TransportationName implements
@@ -222,7 +223,7 @@ public class TransportationName implements
int minzoom = FieldValues.CLASS_TRUNK.equals(baseClass) ? 8 :
FieldValues.CLASS_MOTORWAY.equals(baseClass) ? 6 :
- isLink ? 13 : 12; // fallback - get from line minzoom, but floor at 12
+ isLink ? 13 : 12; // fallback - get from line minzoom, but floor at 12
// inherit min zoom threshold from visible road, and ensure we never show a label on a road that's not visible yet.
minzoom = Math.max(minzoom, transportation.getMinzoom(element, highwayClass));
@@ -235,8 +236,8 @@ public class TransportationName implements
.setAttr(Fields.REF, ref)
.setAttr(Fields.REF_LENGTH, ref != null ? ref.length() : null)
.setAttr(Fields.NETWORK,
- (relation != null && relation.networkType() != null) ? relation.networkType().name
- : !nullOrEmpty(ref) ? "road" : null)
+ (relation != null && relation.networkType() != null) ? relation.networkType().name :
+ !nullOrEmpty(ref) ? "road" : null)
.setAttr(Fields.CLASS, highwayClass)
.setAttr(Fields.SUBCLASS, highwaySubclass(highwayClass, null, highway))
.setMinPixelSize(0)
@@ -314,7 +315,7 @@ public class TransportationName implements
Function