From 63eeb6bd3263d5b0e3ece6e19d2e4986e666430e Mon Sep 17 00:00:00 2001 From: Peter Hanecak <115141505+phanecak-maptiler@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:57:29 +0200 Subject: [PATCH] Landuse flowerbed to landcover (#198) * we are now past 3.15 so we're going to follow master * regenerate-openmaptiles.sh b3d67ed5b327c9059aeea0b3304772c6b4c8c7e9 (to match content of OMT PR 1661) --- scripts/regenerate-openmaptiles.sh | 3 +- .../generated/OpenMapTilesSchema.java | 48 ++++++++++--------- .../org/openmaptiles/generated/Tables.java | 6 +-- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/scripts/regenerate-openmaptiles.sh b/scripts/regenerate-openmaptiles.sh index a598d3b..862d766 100755 --- a/scripts/regenerate-openmaptiles.sh +++ b/scripts/regenerate-openmaptiles.sh @@ -4,7 +4,8 @@ set -o errexit set -o pipefail set -o nounset -TAG="${1:-"v3.15"}" +# TODO: change to "v3.16" once that is released +TAG="${1:-"master"}" echo "tag=${TAG}" BASE_URL="${2:-"https://raw.githubusercontent.com/openmaptiles/openmaptiles/"}" diff --git a/src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java b/src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java index a8f2e4d..6114368 100644 --- a/src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java +++ b/src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java @@ -49,8 +49,8 @@ import org.openmaptiles.Layer; /** * All vector tile layer definitions, attributes, and allowed values generated from the - * OpenMapTiles vector tile schema - * v3.15. + * OpenMapTiles vector tile schema + * master. */ @SuppressWarnings("unused") public class OpenMapTilesSchema { @@ -96,7 +96,7 @@ public class OpenMapTilesSchema { * boundaries show up. So you might not be able to use border styling for ocean water features. * * Generated from - * water.yaml + * water.yaml */ public interface Water extends Layer { double BUFFER_SIZE = 4.0; @@ -195,7 +195,7 @@ public class OpenMapTilesSchema { * field applied. Waterways do not have a subclass field. * * Generated from - * waterway.yaml + * waterway.yaml */ public interface Waterway extends Layer { double BUFFER_SIZE = 4.0; @@ -287,7 +287,7 @@ public class OpenMapTilesSchema { * layer is to style wood (class=wood) and grass (class=grass) areas. * * Generated from landcover.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/landcover/landcover.yaml">landcover.yaml */ public interface Landcover extends Layer { double BUFFER_SIZE = 4.0; @@ -335,6 +335,7 @@ public class OpenMapTilesSchema { *
  • "farm" *
  • "farmland" *
  • "fell" + *
  • "flowerbed" *
  • "forest" *
  • "garden" *
  • "glacier" @@ -387,6 +388,7 @@ public class OpenMapTilesSchema { public static final String SUBCLASS_FARM = "farm"; public static final String SUBCLASS_FARMLAND = "farmland"; public static final String SUBCLASS_FELL = "fell"; + public static final String SUBCLASS_FLOWERBED = "flowerbed"; public static final String SUBCLASS_FOREST = "forest"; public static final String SUBCLASS_GARDEN = "garden"; public static final String SUBCLASS_GLACIER = "glacier"; @@ -416,9 +418,9 @@ public class OpenMapTilesSchema { public static final String SUBCLASS_WOOD = "wood"; public static final Set SUBCLASS_VALUES = Set.of("allotments", "bare_rock", "beach", "bog", "dune", "scrub", "shrubbery", "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"); + "flowerbed", "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 { @@ -431,8 +433,8 @@ public class OpenMapTilesSchema { MultiExpression.entry("wood", matchAny("subclass", "wood", "forest")), MultiExpression.entry("rock", matchAny("subclass", "bare_rock", "scree")), MultiExpression.entry("grass", - matchAny("subclass", "fell", "grassland", "heath", "scrub", "shrubbery", "tundra", "grass", "meadow", - "allotments", "park", "village_green", "recreation_ground", "garden", "golf_course")), + matchAny("subclass", "fell", "flowerbed", "grassland", "heath", "scrub", "shrubbery", "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")), @@ -444,7 +446,7 @@ public class OpenMapTilesSchema { * residential (urban) areas and at higher zoom levels mostly OSM landuse tags. * * Generated from - * landuse.yaml + * landuse.yaml */ public interface Landuse extends Layer { double BUFFER_SIZE = 4.0; @@ -540,7 +542,7 @@ public class OpenMapTilesSchema { * Natural peaks * * Generated from mountain_peak.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/mountain_peak/mountain_peak.yaml">mountain_peak.yaml */ public interface MountainPeak extends Layer { double BUFFER_SIZE = 64.0; @@ -624,7 +626,7 @@ public class OpenMapTilesSchema { * leisure=nature_reserve. * * Generated from - * park.yaml + * park.yaml */ public interface Park extends Layer { double BUFFER_SIZE = 4.0; @@ -687,7 +689,7 @@ public class OpenMapTilesSchema { * but for most styles it makes sense to just style admin_level=2 and admin_level=4. * * Generated from - * boundary.yaml + * boundary.yaml */ public interface Boundary extends Layer { double BUFFER_SIZE = 4.0; @@ -797,7 +799,7 @@ public class OpenMapTilesSchema { * in the aeroway layer. * * Generated from - * aeroway.yaml + * aeroway.yaml */ public interface Aeroway extends Layer { double BUFFER_SIZE = 4.0; @@ -857,7 +859,7 @@ public class OpenMapTilesSchema { * features like plazas. * * Generated from transportation.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/transportation/transportation.yaml">transportation.yaml */ public interface Transportation extends Layer { double BUFFER_SIZE = 4.0; @@ -1202,7 +1204,7 @@ public class OpenMapTilesSchema { * location:underground are excluded. * * Generated from - * building.yaml + * building.yaml */ public interface Building extends Layer { double BUFFER_SIZE = 4.0; @@ -1244,7 +1246,7 @@ public class OpenMapTilesSchema { * from OSM water bodies. Only the most important lakes contain labels. * * Generated from water_name.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/water_name/water_name.yaml">water_name.yaml */ public interface WaterName extends Layer { double BUFFER_SIZE = 256.0; @@ -1321,7 +1323,7 @@ public class OpenMapTilesSchema { * while for other roads you should use name. * * Generated from transportation_name.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/transportation_name/transportation_name.yaml">transportation_name.yaml */ public interface TransportationName extends Layer { double BUFFER_SIZE = 8.0; @@ -1593,7 +1595,7 @@ public class OpenMapTilesSchema { * create a text hierarchy. * * Generated from - * place.yaml + * place.yaml */ public interface Place extends Layer { double BUFFER_SIZE = 256.0; @@ -1717,7 +1719,7 @@ public class OpenMapTilesSchema { * tag are prioritized for preservation). * * Generated from housenumber.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/housenumber/housenumber.yaml">housenumber.yaml */ public interface Housenumber extends Layer { double BUFFER_SIZE = 8.0; @@ -1749,7 +1751,7 @@ public class OpenMapTilesSchema { * Points of interests containing a of a variety * of OpenStreetMap tags. Mostly contains amenities, sport, shop and tourist POIs. * - * Generated from poi.yaml + * Generated from poi.yaml */ public interface Poi extends Layer { double BUFFER_SIZE = 64.0; @@ -1993,7 +1995,7 @@ public class OpenMapTilesSchema { * Aerodrome labels * * Generated from aerodrome_label.yaml + * "https://github.com/openmaptiles/openmaptiles/blob/master/layers/aerodrome_label/aerodrome_label.yaml">aerodrome_label.yaml */ public interface AerodromeLabel extends Layer { double BUFFER_SIZE = 64.0; diff --git a/src/main/java/org/openmaptiles/generated/Tables.java b/src/main/java/org/openmaptiles/generated/Tables.java index 7c87d28..bcf433b 100644 --- a/src/main/java/org/openmaptiles/generated/Tables.java +++ b/src/main/java/org/openmaptiles/generated/Tables.java @@ -50,7 +50,7 @@ import java.util.Map; /** * OSM element parsers generated from the imposm3 table definitions - * in the OpenMapTiles vector tile + * 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 @@ -153,8 +153,8 @@ 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"), + matchAny("landuse", "allotments", "farm", "farmland", "orchard", "flowerbed", "plant_nursery", "vineyard", + "grass", "grassland", "meadow", "forest", "village_green", "recreation_ground"), matchAny("natural", "wood", "wetland", "fell", "grassland", "heath", "scrub", "shrubbery", "tundra", "glacier", "bare_rock", "scree", "beach", "sand", "dune"), matchAny("leisure", "park", "garden", "golf_course"), matchAny("wetland", "bog", "swamp", "wet_meadow", "marsh",