Upgrade planetiler-basemap to be compatible with OpenMapTiles 3.13 (#49)

Applying changes to layers from [OpenMapTiles 3.13 release](https://github.com/openmaptiles/openmaptiles/releases/tag/v3.13) (https://github.com/openmaptiles/openmaptiles/compare/v3.12.2...v3.13), minus transportation network connectivity improvements - those will be a separate change.
This commit is contained in:
Michael Barry
2022-01-19 05:36:44 -05:00
committed by GitHub
parent 8e49c0831c
commit 0baaf8d886
37 changed files with 1690 additions and 464 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors.
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
All rights reserved.
Code license: BSD 3-Clause License
@@ -52,16 +52,15 @@ import java.util.Set;
/**
* All vector tile layer definitions, attributes, and allowed values generated from the
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/openmaptiles.yaml">OpenMapTiles vector tile
* schema
* v3.12.2</a>.
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/openmaptiles.yaml">OpenMapTiles vector tile schema
* v3.13</a>.
*/
@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.12.1";
public static final String VERSION = "3.13.0";
public static final String ATTRIBUTION = "<a href=\"https://www.openmaptiles.org/\" target=\"_blank\">&copy; OpenMapTiles</a> <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">&copy; OpenStreetMap contributors</a>";
public static final List<String> 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",
@@ -99,7 +98,7 @@ public class OpenMapTilesSchema {
* 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.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/water/water.yaml">water.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/water/water.yaml">water.yaml</a>
*/
public interface Water extends Layer {
@@ -116,14 +115,16 @@ public class OpenMapTilesSchema {
/**
* All water polygons from <a href="http://osmdata.openstreetmap.de/">OpenStreetMapData</a> have the class
* <code>ocean</code>. Water bodies are classified as <code>lake</code> or <code>river</code> for water bodies
* with the <a href="http://wiki.openstreetmap.org/wiki/Key:waterway"><code>waterway</code></a> tag.
* <code>ocean</code>. Water bodies with the <a href="http://wiki.openstreetmap.org/wiki/Tag:waterway=riverbank"><code>waterway=riverbank</code></a>
* or <a href="http://wiki.openstreetmap.org/wiki/Tag:water=river"><code>water=river</code></a> tag are classified
* as river. Wet and dry docks tagged <a href="http://wiki.openstreetmap.org/wiki/Tag:waterway=dock"><code>waterway=dock</code></a>
* are classified as a <code>dock</code>. All other water bodies are classified as <code>lake</code>.
* <p>
* allowed values:
* <ul>
* <li>lake
* <li>dock
* <li>river
* <li>lake
* <li>ocean
* </ul>
*/
@@ -156,11 +157,11 @@ public class OpenMapTilesSchema {
/** Attribute values for map elements in the water layer. */
final class FieldValues {
public static final String CLASS_LAKE = "lake";
public static final String CLASS_DOCK = "dock";
public static final String CLASS_RIVER = "river";
public static final String CLASS_LAKE = "lake";
public static final String CLASS_OCEAN = "ocean";
public static final Set<String> CLASS_VALUES = Set.of("lake", "dock", "river", "ocean");
public static final Set<String> CLASS_VALUES = Set.of("dock", "river", "lake", "ocean");
public static final String BRUNNEL_BRIDGE = "bridge";
public static final String BRUNNEL_TUNNEL = "tunnel";
public static final Set<String> BRUNNEL_VALUES = Set.of("bridge", "tunnel");
@@ -170,9 +171,9 @@ public class OpenMapTilesSchema {
final class FieldMappings {
public static final MultiExpression<String> Class = MultiExpression.of(
List.of(MultiExpression.entry("lake", matchAny("waterway", "", "lake")),
MultiExpression.entry("dock", matchAny("waterway", "dock")), MultiExpression.entry("river", FALSE),
MultiExpression.entry("ocean", FALSE)));
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)));
}
}
@@ -183,7 +184,7 @@ public class OpenMapTilesSchema {
* there is also <code>canal</code> generated, starting z13 there is no generalization according to <code>class</code>
* field applied. Waterways do not have a <code>subclass</code> field.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/waterway/waterway.yaml">waterway.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/waterway/waterway.yaml">waterway.yaml</a>
*/
public interface Waterway extends Layer {
@@ -273,7 +274,7 @@ public class OpenMapTilesSchema {
* href="http://wiki.openstreetmap.org/wiki/Landcover">implied by OSM tags</a>. The most common use case for this
* layer is to style wood (<code>class=wood</code>) and grass (<code>class=grass</code>) areas.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/landcover/landcover.yaml">landcover.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/landcover/landcover.yaml">landcover.yaml</a>
*/
public interface Landcover extends Layer {
@@ -428,7 +429,7 @@ public class OpenMapTilesSchema {
* 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 <code>landuse</code> tags.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/landuse/landuse.yaml">landuse.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/landuse/landuse.yaml">landuse.yaml</a>
*/
public interface Landuse extends Layer {
@@ -527,7 +528,7 @@ public class OpenMapTilesSchema {
/**
* <a href="http://wiki.openstreetmap.org/wiki/Tag:natural%3Dpeak">Natural peaks</a>
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/mountain_peak/mountain_peak.yaml">mountain_peak.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/mountain_peak/mountain_peak.yaml">mountain_peak.yaml</a>
*/
public interface MountainPeak extends Layer {
@@ -556,13 +557,27 @@ public class OpenMapTilesSchema {
* <ul>
* <li>"peak"
* <li>"volcano"
* <li>"ridge"
* <li>"cliff"
* <li>"arete"
* </ul>
*/
public static final String CLASS = "class";
/** Elevation (<code>ele</code>) in meters. */
public static final String ELE = "ele";
/** Elevation (<code>ele</code>) in feets. */
/** Elevation (<code>ele</code>) in feet. */
public static final String ELE_FT = "ele_ft";
/**
* Value 1 for peaks in location where feet is used as customary unit (USA).
* <p>
* allowed values:
* <ul>
* <li>1
* <li>null
* </ul>
*/
public static final String CUSTOMARY_FT = "customary_ft";
/** Rank of the peak within one tile (starting at 1 that is the most important peak). */
public static final String RANK = "rank";
}
@@ -572,7 +587,10 @@ public class OpenMapTilesSchema {
public static final String CLASS_PEAK = "peak";
public static final String CLASS_VOLCANO = "volcano";
public static final Set<String> CLASS_VALUES = Set.of("peak", "volcano");
public static final String CLASS_RIDGE = "ridge";
public static final String CLASS_CLIFF = "cliff";
public static final String CLASS_ARETE = "arete";
public static final Set<String> CLASS_VALUES = Set.of("peak", "volcano", "ridge", "cliff", "arete");
}
/** Complex mappings to generate attribute values from OSM element tags in the mountain_peak layer. */
@@ -586,7 +604,7 @@ public class OpenMapTilesSchema {
* <a href="http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dprotected_area"><code>boundary=protected_area</code></a>,
* or <a href="http://wiki.openstreetmap.org/wiki/Tag:leisure%3Dnature_reserve"><code>leisure=nature_reserve</code></a>.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/park/park.yaml">park.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/park/park.yaml">park.yaml</a>
*/
public interface Park extends Layer {
@@ -645,7 +663,7 @@ public class OpenMapTilesSchema {
* contains several <a href="http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level"><code>admin_level</code></a>
* but for most styles it makes sense to just style <code>admin_level=2</code> and <code>admin_level=4</code>.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/boundary/boundary.yaml">boundary.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/boundary/boundary.yaml">boundary.yaml</a>
*/
public interface Boundary extends Layer {
@@ -751,7 +769,7 @@ public class OpenMapTilesSchema {
* buildings are contained in the <strong>building</strong> layer but all other airport related polygons can be found
* in the <strong>aeroway</strong> layer.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/aeroway/aeroway.yaml">aeroway.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/aeroway/aeroway.yaml">aeroway.yaml</a>
*/
public interface Aeroway extends Layer {
@@ -814,7 +832,7 @@ public class OpenMapTilesSchema {
* roads is the most essential part of the map. The <code>transportation</code> layer also contains polygons for
* features like plazas.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/transportation/transportation.yaml">transportation.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/transportation/transportation.yaml">transportation.yaml</a>
*/
public interface Transportation extends Layer {
@@ -836,7 +854,7 @@ public class OpenMapTilesSchema {
* href="http://wiki.openstreetmap.org/wiki/Key:railway"><code>railway</code></a>, <a
* href="http://wiki.openstreetmap.org/wiki/Key:aerialway"><code>aerialway</code></a>, <a
* href="http://wiki.openstreetmap.org/wiki/Key:route"><code>route</code></a> tag (for shipping ways), or <a
* href="http://wiki.openstreetmap.org/wiki/Key:route"><code>man_made</code></a>.
* href="http://wiki.openstreetmap.org/wiki/Key:man_made"><code>man_made</code></a>.
* <p>
* allowed values:
* <ul>
@@ -850,6 +868,7 @@ public class OpenMapTilesSchema {
* <li>service
* <li>track
* <li>raceway
* <li>busway
* <li>motorway_construction
* <li>trunk_construction
* <li>primary_construction
@@ -892,6 +911,13 @@ public class OpenMapTilesSchema {
* </ul>
*/
public static final String SUBCLASS = "subclass";
/**
* The network type derived mainly from <a href="http://wiki.openstreetmap.org/wiki/Key:network"><code>network</code></a>
* tag of the road. See more info about <a href="http://wiki.openstreetmap.org/wiki/Road_signs_in_the_United_States"><code>us-
* </code></a>, <a href="https://en.wikipedia.org/wiki/Trans-Canada_Highway"><code>ca-transcanada</code></a>, or
* <a href="http://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines#UK_roads"><code>gb- </code></a>.
*/
public static final String NETWORK = "network";
/**
* Mark whether way is a tunnel or bridge.
@@ -944,6 +970,40 @@ public class OpenMapTilesSchema {
* </ul>
*/
public static final String SERVICE = "service";
/**
* Access restrictions on this road. Supported values of the <a href="http://wiki.openstreetmap.org/wiki/Key:access"><code>access</code></a>
* tag are <code>no</code> and <code>private</code>, which resolve to <code>no</code>.
* <p>
* allowed values:
* <ul>
* <li>false
* </ul>
*/
public static final String ACCESS = "access";
/**
* Whether this is a toll road, based on the <a href="http://wiki.openstreetmap.org/wiki/Key:toll"><code>toll</code></a>
* tag.
* <p>
* allowed values:
* <ul>
* <li>0
* <li>1
* </ul>
*/
public static final String TOLL = "toll";
/**
* Whether this is an expressway, based on the <a href="http://wiki.openstreetmap.org/wiki/Key:expressway"><code>expressway</code></a>
* tag.
* <p>
* allowed values:
* <ul>
* <li>1
* </ul>
*/
public static final String EXPRESSWAY = "expressway";
/** Original value of the <a href="http://wiki.openstreetmap.org/wiki/Key:layer"><code>layer</code></a> tag. */
public static final String LAYER = "layer";
/**
@@ -1012,6 +1072,7 @@ public class OpenMapTilesSchema {
public static final String CLASS_SERVICE = "service";
public static final String CLASS_TRACK = "track";
public static final String CLASS_RACEWAY = "raceway";
public static final String CLASS_BUSWAY = "busway";
public static final String CLASS_MOTORWAY_CONSTRUCTION = "motorway_construction";
public static final String CLASS_TRUNK_CONSTRUCTION = "trunk_construction";
public static final String CLASS_PRIMARY_CONSTRUCTION = "primary_construction";
@@ -1023,7 +1084,7 @@ public class OpenMapTilesSchema {
public static final String CLASS_TRACK_CONSTRUCTION = "track_construction";
public static final String CLASS_RACEWAY_CONSTRUCTION = "raceway_construction";
public static final Set<String> CLASS_VALUES = Set.of("motorway", "trunk", "primary", "secondary", "tertiary",
"minor", "path", "service", "track", "raceway", "motorway_construction", "trunk_construction",
"minor", "path", "service", "track", "raceway", "busway", "motorway_construction", "trunk_construction",
"primary_construction", "secondary_construction", "tertiary_construction", "minor_construction",
"path_construction", "service_construction", "track_construction", "raceway_construction");
public static final String SUBCLASS_RAIL = "rail";
@@ -1079,7 +1140,7 @@ public class OpenMapTilesSchema {
MultiExpression.entry("service", matchAny("highway", "service")),
MultiExpression.entry("track", matchAny("highway", "track")),
MultiExpression.entry("raceway", matchAny("highway", "raceway")),
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"))),
@@ -1107,7 +1168,7 @@ public class OpenMapTilesSchema {
* href="http://wiki.openstreetmap.org/wiki/Key:building"><code>building= </code></a>). The buildings are not yet
* ready for 3D rendering support and any help to improve this is welcomed.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/building/building.yaml">building.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/building/building.yaml">building.yaml</a>
*/
public interface Building extends Layer {
@@ -1157,7 +1218,7 @@ public class OpenMapTilesSchema {
* Lake center lines for labelling lake bodies. This is based of the <a href="https://github.com/lukasmartinelli/osm-lakelines">osm-lakelines</a>
* project which derives nice centerlines from OSM water bodies. Only the most important lakes contain labels.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/water_name/water_name.yaml">water_name.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/water_name/water_name.yaml">water_name.yaml</a>
*/
public interface WaterName extends Layer {
@@ -1221,7 +1282,7 @@ public class OpenMapTilesSchema {
* placement than having many small linestrings. For motorways you should use the <code>ref</code> field to label them
* while for other roads you should use <code>name</code>.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/transportation_name/transportation_name.yaml">transportation_name.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/transportation_name/transportation_name.yaml">transportation_name.yaml</a>
*/
public interface TransportationName extends Layer {
@@ -1299,13 +1360,15 @@ public class OpenMapTilesSchema {
* <li>"raceway_construction"
* <li>"rail"
* <li>"transit"
* <li>"motorway_junction"
* </ul>
*/
public static final String CLASS = "class";
/**
* Distinguish more specific classes of path: Subclass is value of the <a href="http://wiki.openstreetmap.org/wiki/Key:highway"><code>highway</code></a>
* (for paths).
* (for paths), and &quot;junction&quot; for <a href="http://wiki.openstreetmap.org/wiki/Tag:highway=motorway_junction"><code>motorway
* junctions</code></a>.
* <p>
* allowed values:
* <ul>
@@ -1317,6 +1380,7 @@ public class OpenMapTilesSchema {
* <li>"bridleway"
* <li>"corridor"
* <li>"platform"
* <li>"junction"
* </ul>
*/
public static final String SUBCLASS = "subclass";
@@ -1353,6 +1417,18 @@ public class OpenMapTilesSchema {
* </ul>
*/
public static final String INDOOR = "indoor";
/** 1st route concurrency. */
public static final String ROUTE_1 = "route_1";
/** 2nd route concurrency. */
public static final String ROUTE_2 = "route_2";
/** 3rd route concurrency. */
public static final String ROUTE_3 = "route_3";
/** 4th route concurrency. */
public static final String ROUTE_4 = "route_4";
/** 5th route concurrency. */
public static final String ROUTE_5 = "route_5";
/** 6th route concurrency. */
public static final String ROUTE_6 = "route_6";
}
/** Attribute values for map elements in the transportation_name layer. */
@@ -1389,10 +1465,12 @@ public class OpenMapTilesSchema {
public static final String CLASS_RACEWAY_CONSTRUCTION = "raceway_construction";
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<String> 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");
"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";
@@ -1401,8 +1479,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 String SUBCLASS_JUNCTION = "junction";
public static final Set<String> SUBCLASS_VALUES = Set.of("pedestrian", "path", "footway", "cycleway", "steps",
"bridleway", "corridor", "platform");
"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";
@@ -1422,7 +1501,7 @@ public class OpenMapTilesSchema {
* important layers to create a beautiful map. We suggest you use different font styles and sizes to create a text
* hierarchy.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/place/place.yaml">place.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/place/place.yaml">place.yaml</a>
*/
public interface Place extends Layer {
@@ -1467,6 +1546,7 @@ public class OpenMapTilesSchema {
* <li>"continent"
* <li>"country"
* <li>"state"
* <li>"province"
* <li>"city"
* <li>"town"
* <li>"village"
@@ -1505,6 +1585,7 @@ public class OpenMapTilesSchema {
public static final String CLASS_CONTINENT = "continent";
public static final String CLASS_COUNTRY = "country";
public static final String CLASS_STATE = "state";
public static final String CLASS_PROVINCE = "province";
public static final String CLASS_CITY = "city";
public static final String CLASS_TOWN = "town";
public static final String CLASS_VILLAGE = "village";
@@ -1513,8 +1594,8 @@ public class OpenMapTilesSchema {
public static final String CLASS_QUARTER = "quarter";
public static final String CLASS_NEIGHBOURHOOD = "neighbourhood";
public static final String CLASS_ISOLATED_DWELLING = "isolated_dwelling";
public static final Set<String> CLASS_VALUES = Set.of("continent", "country", "state", "city", "town", "village",
"hamlet", "suburb", "quarter", "neighbourhood", "isolated_dwelling");
public static final Set<String> 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. */
@@ -1528,7 +1609,7 @@ public class OpenMapTilesSchema {
* a map. This adds significant size to <em>z14</em>. For buildings the centroid of the building is used as
* housenumber.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/housenumber/housenumber.yaml">housenumber.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/housenumber/housenumber.yaml">housenumber.yaml</a>
*/
public interface Housenumber extends Layer {
@@ -1562,7 +1643,7 @@ public class OpenMapTilesSchema {
* <a href="http://wiki.openstreetmap.org/wiki/Points_of_interest">Points of interests</a> containing a of a variety
* of OpenStreetMap tags. Mostly contains amenities, sport, shop and tourist POIs.
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/poi/poi.yaml">poi.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/poi/poi.yaml">poi.yaml</a>
*/
public interface Poi extends Layer {
@@ -1732,10 +1813,11 @@ public class OpenMapTilesSchema {
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",
"gift", "hardware", "hearing_aids", "hifi", "ice_cream", "interior_decoration", "jewelry", "kiosk", "lamps",
"mall", "massage", "motorcycle", "mobile_phone", "newsagent", "optician", "outdoor", "perfumery", "perfume",
"pet", "photo", "second_hand", "shoes", "sports", "stationery", "tailor", "tattoo", "ticket", "tobacco",
"toys", "travel_agency", "watches", "weapons", "wholesale")), MultiExpression.entry("town_hall",
"gift", "hardware", "hearing_aids", "hifi", "ice_cream", "interior_decoration", "jewelry", "kiosk",
"locksmith", "lamps", "mall", "massage", "motorcycle", "mobile_phone", "newsagent", "optician", "outdoor",
"perfumery", "perfume", "pet", "photo", "second_hand", "shoes", "sports", "stationery", "tailor", "tattoo",
"ticket", "tobacco", "toys", "travel_agency", "watches", "weapons", "wholesale")),
MultiExpression.entry("town_hall",
matchAny("subclass", "townhall", "public_building", "courthouse", "community_centre")),
MultiExpression.entry("golf", matchAny("subclass", "golf", "golf_course", "miniature_golf")),
MultiExpression.entry("fast_food", matchAny("subclass", "fast_food", "food_court")),
@@ -1777,7 +1859,7 @@ public class OpenMapTilesSchema {
/**
* <a href="http://wiki.openstreetmap.org/wiki/Tag:aeroway%3Daerodrome">Aerodrome labels</a>
* <p>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/layers/aerodrome_label/aerodrome_label.yaml">aerodrome_label.yaml</a>
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/layers/aerodrome_label/aerodrome_label.yaml">aerodrome_label.yaml</a>
*/
public interface AerodromeLabel extends Layer {

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors.
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
All rights reserved.
Code license: BSD 3-Clause License
@@ -50,7 +50,7 @@ import java.util.Map;
/**
* OSM element parsers generated from the <a href="https://github.com/omniscale/imposm3">imposm3</a> table definitions
* in the <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.12.2/openmaptiles.yaml">OpenMapTiles vector tile
* in the <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.13/openmaptiles.yaml">OpenMapTiles vector tile
* schema</a>.
* <p>
* These filter and parse the raw OSM key/value attribute pairs on tags into records with fields that match the columns
@@ -75,7 +75,7 @@ public class Tables {
}
/** The {@code rowClass} of an imposm3 table row and its constructor coerced to a {@link Constructor}. */
public static record RowClassAndConstructor(
public record RowClassAndConstructor(
Class<? extends Row> rowClass,
Constructor create
) {}
@@ -89,31 +89,31 @@ public class Tables {
}
/** The {@code handlerClass} of a layer handler and it's {@code process} method coerced to a {@link RowHandler}. */
public static record RowHandlerAndClass<T extends Row>(
public record RowHandlerAndClass<T extends Row>(
Class<?> handlerClass,
RowHandler<T> handler
) {}
/** An OSM element that would appear in the {@code osm_water_polygon} table generated by imposm3. */
public static record OsmWaterPolygon(
public record OsmWaterPolygon(
@Override String name, @Override String nameEn, @Override String nameDe, @Override String natural,
@Override String landuse, @Override String waterway, @Override boolean isIntermittent, @Override boolean isTunnel,
@Override boolean isBridge, @Override SourceFeature source
) implements Row, WithName, WithNameEn, WithNameDe, WithNatural, WithLanduse, WithWaterway, WithIsIntermittent,
WithIsTunnel, WithIsBridge, WithSource {
@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"),
source.getBoolean("intermittent"), source.getBoolean("tunnel"), source.getBoolean("bridge"), source);
source.getString("water"), source.getBoolean("intermittent"), source.getBoolean("tunnel"),
source.getBoolean("bridge"), source);
}
/** 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"),
matchAny("natural", "water", "bay"),
matchAny("waterway", "river", "riverbank", "stream", "canal", "drain", "ditch", "dock")),
not(matchAny("covered", "yes")), matchType("polygon"));
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
@@ -126,7 +126,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_waterway_linestring} table generated by imposm3. */
public static record OsmWaterwayLinestring(
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
@@ -154,7 +154,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_landcover_polygon} table generated by imposm3. */
public static record OsmLandcoverPolygon(
public record OsmLandcoverPolygon(
@Override String subclass, @Override String mappingKey, @Override SourceFeature source
) implements Row, WithSubclass, WithMappingKey, WithSource {
@@ -165,7 +165,7 @@ public class Tables {
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(or(
matchAny("landuse", "allotments", "farm", "farmland", "orchard", "plant_nursery", "vineyard", "grass",
"grassland", "meadow", "forest", "village_green", "recreation_ground", "park"),
"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",
@@ -182,7 +182,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_landuse_polygon} table generated by imposm3. */
public static record OsmLandusePolygon(
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 {
@@ -196,9 +196,10 @@ public class Tables {
public static final Expression MAPPING = and(or(
matchAny("landuse", "railway", "cemetery", "military", "residential", "commercial", "industrial", "garages",
"retail"),
matchAny("amenity", "bus_station", "school", "university", "kindergarten", "college", "library", "hospital"),
matchAny("leisure", "stadium", "pitch", "playground", "track"), matchAny("tourism", "theme_park", "zoo"),
matchAny("place", "suburb", "quarter", "neighbourhood"), matchAny("waterway", "dam")), matchType("polygon"));
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"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
@@ -211,7 +212,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_peak_point} table generated by imposm3. */
public static record OsmPeakPoint(
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 {
@@ -222,7 +223,7 @@ public class Tables {
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("natural", "peak", "volcano"), matchType("point"));
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
@@ -234,8 +235,33 @@ public class Tables {
}
}
/** 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 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"));
/**
* 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 static record OsmParkPolygon(
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
@@ -264,7 +290,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_aeroway_polygon} table generated by imposm3. */
public static record OsmAerowayPolygon(
public record OsmAerowayPolygon(
@Override String ref, @Override String aeroway, @Override SourceFeature source
) implements Row, WithRef, WithAeroway, WithSource {
@@ -289,7 +315,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_aeroway_linestring} table generated by imposm3. */
public static record OsmAerowayLinestring(
public record OsmAerowayLinestring(
@Override String ref, @Override String aeroway, @Override SourceFeature source
) implements Row, WithRef, WithAeroway, WithSource {
@@ -311,7 +337,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_aeroway_point} table generated by imposm3. */
public static record OsmAerowayPoint(
public record OsmAerowayPoint(
@Override String ref, @Override String aeroway, @Override SourceFeature source
) implements Row, WithRef, WithAeroway, WithSource {
@@ -333,18 +359,19 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_highway_linestring} table generated by imposm3. */
public static record OsmHighwayLinestring(
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 usage, @Override String publicTransport,
@Override String manMade, @Override String bicycle, @Override String foot, @Override String horse,
@Override String mtbScale, @Override String surface, @Override SourceFeature source
@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, WithUsage, WithPublicTransport, WithManMade, WithBicycle, WithFoot, WithHorse,
WithMtbScale, WithSurface, WithSource {
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"),
@@ -352,18 +379,19 @@ public class Tables {
source.getBoolean("indoor"), source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("short_name"), source.getBoolean("tunnel"), source.getBoolean("bridge"),
source.getBoolean("ramp"), source.getBoolean("ford"), source.getDirection("oneway"), source.getBoolean("area"),
source.getString("service"), source.getString("usage"), source.getString("public_transport"),
source.getString("man_made"), source.getString("bicycle"), source.getString("foot"), source.getString("horse"),
source.getString("mtb:scale"), source.getString("surface"), source);
source.getString("service"), source.getString("access"), source.getBoolean("toll"), source.getString("usage"),
source.getString("public_transport"), source.getString("man_made"), source.getString("bicycle"),
source.getString("foot"), source.getString("horse"), source.getString("mtb:scale"),
source.getString("sac_scale"), source.getString("surface"), source.getBoolean("expressway"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(or(
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",
"construction"), matchAny("public_transport", "platform"), matchAny("man_made", "pier")),
matchType("linestring"));
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"),
matchAny("service", "driveway", "parking_aisle")), matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
@@ -376,7 +404,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_railway_linestring} table generated by imposm3. */
public static record OsmRailwayLinestring(
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,
@@ -411,7 +439,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_aerialway_linestring} table generated by imposm3. */
public static record OsmAerialwayLinestring(
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,
@@ -442,7 +470,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_shipway_linestring} table generated by imposm3. */
public static record OsmShipwayLinestring(
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,
@@ -472,17 +500,17 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_highway_polygon} table generated by imposm3. */
public static record OsmHighwayPolygon(
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 SourceFeature source
@Override String service, @Override SourceFeature source
) implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithIndoor, WithIsArea, WithPublicTransport,
WithManMade, WithSource {
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"),
source.getString("man_made"), source);
source.getString("man_made"), source.getString("service"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
@@ -500,8 +528,34 @@ public class Tables {
}
}
/** 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 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"),
source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
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}.
*/
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 static record OsmBuildingPolygon(
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,
@@ -518,9 +572,10 @@ 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")),
not(matchAny("building", "no", "none", "No")), not(matchAny("building:part", "no", "none", "No")),
not(matchAny("man_made", "bridge")), matchType("polygon"));
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"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as {@link
@@ -533,7 +588,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_marine_point} table generated by imposm3. */
public static record OsmMarinePoint(
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 {
@@ -558,7 +613,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_continent_point} table generated by imposm3. */
public static record OsmContinentPoint(
public record OsmContinentPoint(
@Override String name, @Override String nameEn, @Override String nameDe, @Override SourceFeature source
) implements Row, WithName, WithNameEn, WithNameDe, WithSource {
@@ -581,7 +636,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_country_point} table generated by imposm3. */
public static record OsmCountryPoint(
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
@@ -608,7 +663,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_island_polygon} table generated by imposm3. */
public static record OsmIslandPolygon(
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 {
@@ -632,7 +687,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_island_point} table generated by imposm3. */
public static record OsmIslandPoint(
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 {
@@ -656,20 +711,22 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_state_point} table generated by imposm3. */
public static record OsmStatePoint(
@Override String name, @Override String nameEn, @Override String nameDe, @Override String isInCountry,
@Override String isInCountryCode, @Override String ref, @Override long rank, @Override SourceFeature source
) implements Row, WithName, WithNameEn, WithNameDe, 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("is_in:country"), source.getString("is_in:country_code"), source.getString("ref"),
source.getLong("rank"), source);
source.getString("place"), source.getString("is_in:country"), source.getString("is_in:country_code"),
source.getString("ref"), source.getLong("rank"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("place", "state"), 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
@@ -682,7 +739,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_city_point} table generated by imposm3. */
public static record OsmCityPoint(
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 {
@@ -709,7 +766,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_housenumber_point} table generated by imposm3. */
public static record OsmHousenumberPoint(@Override String housenumber, @Override SourceFeature source) implements Row,
public record OsmHousenumberPoint(@Override String housenumber, @Override SourceFeature source) implements Row,
WithHousenumber, WithSource {
public OsmHousenumberPoint(SourceFeature source, String mappingKey) {
@@ -731,7 +788,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_poi_point} table generated by imposm3. */
public static record OsmPoiPoint(
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,
@@ -751,9 +808,9 @@ public class Tables {
public static final Expression MAPPING = and(or(matchAny("aerialway", "station"),
matchAny("amenity", "arts_centre", "bank", "bar", "bbq", "bicycle_parking", "bicycle_rental", "biergarten",
"bus_station", "cafe", "cinema", "clinic", "college", "community_centre", "courthouse", "dentist", "doctors",
"drinking_water", "embassy", "fast_food", "ferry_terminal", "fire_station", "food_court", "fuel", "grave_yard",
"hospital", "ice_cream", "kindergarten", "library", "marketplace", "motorcycle_parking", "nightclub",
"nursing_home", "parking", "pharmacy", "place_of_worship", "police", "post_box", "post_office", "prison", "pub",
"drinking_water", "fast_food", "ferry_terminal", "fire_station", "food_court", "fuel", "grave_yard", "hospital",
"ice_cream", "kindergarten", "library", "marketplace", "motorcycle_parking", "nightclub", "nursing_home",
"parking", "pharmacy", "place_of_worship", "police", "post_box", "post_office", "prison", "pub",
"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",
@@ -762,17 +819,18 @@ public class Tables {
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("railway", "halt", "station", "subway_entrance", "train_station_entrance", "tram_stop"),
"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",
"chemist", "chocolate", "clothes", "coffee", "computer", "confectionery", "convenience", "copyshop",
"cosmetics", "deli", "delicatessen", "department_store", "doityourself", "dry_cleaning", "electronics",
"erotic", "fabric", "florist", "frozen_food", "furniture", "garden_centre", "general", "gift", "greengrocer",
"hairdresser", "hardware", "hearing_aids", "hifi", "ice_cream", "interior_decoration", "jewelry", "kiosk",
"lamps", "laundry", "mall", "massage", "mobile_phone", "motorcycle", "music", "musical_instrument", "newsagent",
"optician", "outdoor", "perfume", "perfumery", "pet", "photo", "second_hand", "shoes", "sports", "stationery",
"supermarket", "tailor", "tattoo", "ticket", "tobacco", "toys", "travel_agency", "video", "video_games",
"watches", "weapons", "wholesale", "wine"),
"lamps", "laundry", "locksmith", "mall", "massage", "mobile_phone", "motorcycle", "music", "musical_instrument",
"newsagent", "optician", "outdoor", "perfume", "perfumery", "pet", "photo", "second_hand", "shoes", "sports",
"stationery", "supermarket", "tailor", "tattoo", "ticket", "tobacco", "toys", "travel_agency", "video",
"video_games", "watches", "weapons", "wholesale", "wine"),
matchAny("sport", "american_football", "archery", "athletics", "australian_football", "badminton", "baseball",
"basketball", "beachvolleyball", "billiards", "bmx", "boules", "bowls", "boxing", "canadian_football", "canoe",
"chess", "climbing", "climbing_adventure", "cricket", "cricket_nets", "croquet", "curling", "cycling",
@@ -798,7 +856,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_poi_polygon} table generated by imposm3. */
public static record OsmPoiPolygon(
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,
@@ -818,9 +876,9 @@ public class Tables {
public static final Expression MAPPING = and(or(matchAny("aerialway", "station"),
matchAny("amenity", "arts_centre", "bank", "bar", "bbq", "bicycle_parking", "bicycle_rental", "biergarten",
"bus_station", "cafe", "cinema", "clinic", "college", "community_centre", "courthouse", "dentist", "doctors",
"drinking_water", "embassy", "fast_food", "ferry_terminal", "fire_station", "food_court", "fuel", "grave_yard",
"hospital", "ice_cream", "kindergarten", "library", "marketplace", "motorcycle_parking", "nightclub",
"nursing_home", "parking", "pharmacy", "place_of_worship", "police", "post_box", "post_office", "prison", "pub",
"drinking_water", "fast_food", "ferry_terminal", "fire_station", "food_court", "fuel", "grave_yard", "hospital",
"ice_cream", "kindergarten", "library", "marketplace", "motorcycle_parking", "nightclub", "nursing_home",
"parking", "pharmacy", "place_of_worship", "police", "post_box", "post_office", "prison", "pub",
"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",
@@ -829,17 +887,18 @@ public class Tables {
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("railway", "halt", "station", "subway_entrance", "train_station_entrance", "tram_stop"),
"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",
"chemist", "chocolate", "clothes", "coffee", "computer", "confectionery", "convenience", "copyshop",
"cosmetics", "deli", "delicatessen", "department_store", "doityourself", "dry_cleaning", "electronics",
"erotic", "fabric", "florist", "frozen_food", "furniture", "garden_centre", "general", "gift", "greengrocer",
"hairdresser", "hardware", "hearing_aids", "hifi", "ice_cream", "interior_decoration", "jewelry", "kiosk",
"lamps", "laundry", "mall", "massage", "mobile_phone", "motorcycle", "music", "musical_instrument", "newsagent",
"optician", "outdoor", "perfume", "perfumery", "pet", "photo", "second_hand", "shoes", "sports", "stationery",
"supermarket", "tailor", "tattoo", "ticket", "tobacco", "toys", "travel_agency", "video", "video_games",
"watches", "weapons", "wholesale", "wine"),
"lamps", "laundry", "locksmith", "mall", "massage", "mobile_phone", "motorcycle", "music", "musical_instrument",
"newsagent", "optician", "outdoor", "perfume", "perfumery", "pet", "photo", "second_hand", "shoes", "sports",
"stationery", "supermarket", "tailor", "tattoo", "ticket", "tobacco", "toys", "travel_agency", "video",
"video_games", "watches", "weapons", "wholesale", "wine"),
matchAny("sport", "american_football", "archery", "athletics", "australian_football", "badminton", "baseball",
"basketball", "beachvolleyball", "billiards", "bmx", "boules", "bowls", "boxing", "canadian_football", "canoe",
"chess", "climbing", "climbing_adventure", "cricket", "cricket_nets", "croquet", "curling", "cycling",
@@ -865,7 +924,7 @@ public class Tables {
}
/** An OSM element that would appear in the {@code osm_aerodrome_label_point} table generated by imposm3. */
public static record OsmAerodromeLabelPoint(
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
@@ -892,6 +951,12 @@ public class Tables {
}
}
/** Rows with a String access attribute. */
public interface WithAccess {
String access();
}
/** Rows with a long adminLevel attribute. */
public interface WithAdminLevel {
@@ -1006,18 +1071,18 @@ public class Tables {
String countryCodeIso31661Alpha2();
}
/** Rows with a String disputedBy attribute. */
public interface WithDisputedBy {
String disputedBy();
}
/** 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 {
@@ -1246,6 +1311,12 @@ public class Tables {
String network();
}
/** Rows with a String osmcSymbol attribute. */
public interface WithOsmcSymbol {
String osmcSymbol();
}
/** Rows with a String place attribute. */
public interface WithPlace {
@@ -1342,6 +1413,12 @@ public class Tables {
String relminLevel();
}
/** Rows with a String sacScale attribute. */
public interface WithSacScale {
String sacScale();
}
/** Rows with a String service attribute. */
public interface WithService {
@@ -1390,6 +1467,12 @@ public class Tables {
String surface();
}
/** Rows with a boolean toll attribute. */
public interface WithToll {
boolean toll();
}
/** Rows with a String tourism attribute. */
public interface WithTourism {
@@ -1408,6 +1491,12 @@ public class Tables {
String usage();
}
/** Rows with a String water attribute. */
public interface WithWater {
String water();
}
/** Rows with a String waterway attribute. */
public interface WithWaterway {
@@ -1437,6 +1526,8 @@ public class Tables {
MultiExpression.entry(new RowClassAndConstructor(OsmLandusePolygon.class, OsmLandusePolygon::new),
OsmLandusePolygon.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmPeakPoint.class, OsmPeakPoint::new), OsmPeakPoint.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmMountainLinestring.class, OsmMountainLinestring::new),
OsmMountainLinestring.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmParkPolygon.class, OsmParkPolygon::new),
OsmParkPolygon.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmAerowayPolygon.class, OsmAerowayPolygon::new),
@@ -1455,6 +1546,8 @@ public class Tables {
OsmShipwayLinestring.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmHighwayPolygon.class, OsmHighwayPolygon::new),
OsmHighwayPolygon.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmHighwayPoint.class, OsmHighwayPoint::new),
OsmHighwayPoint.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmBuildingPolygon.class, OsmBuildingPolygon::new),
OsmBuildingPolygon.MAPPING),
MultiExpression.entry(new RowClassAndConstructor(OsmMarinePoint.class, OsmMarinePoint::new),
@@ -1504,6 +1597,10 @@ public class Tables {
result.computeIfAbsent(OsmPeakPoint.class, cls -> new ArrayList<>())
.add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
}
if (handler instanceof OsmMountainLinestring.Handler typedHandler) {
result.computeIfAbsent(OsmMountainLinestring.class, cls -> new ArrayList<>())
.add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
}
if (handler instanceof OsmParkPolygon.Handler typedHandler) {
result.computeIfAbsent(OsmParkPolygon.class, cls -> new ArrayList<>())
.add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
@@ -1540,6 +1637,10 @@ public class Tables {
result.computeIfAbsent(OsmHighwayPolygon.class, cls -> new ArrayList<>())
.add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
}
if (handler instanceof OsmHighwayPoint.Handler typedHandler) {
result.computeIfAbsent(OsmHighwayPoint.class, cls -> new ArrayList<>())
.add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));
}
if (handler instanceof OsmBuildingPolygon.Handler typedHandler) {
result.computeIfAbsent(OsmBuildingPolygon.class, cls -> new ArrayList<>())
.add(new RowHandlerAndClass<>(typedHandler.getClass(), typedHandler::process));