Skip to content

Commit f17cffe

Browse files
OpenMapTiles 3.15.0 SNAPSHOT (3) (#160)
* clean-up: mvn spotless:apply * Long ferries (as per OMT PR 1486) * regenerate-openmaptiles.sh b3d67ed5b327c9059aeea0b3304772c6b4c8c7e9 (to match content of OMT PR 1489) * Add aboriginal lands (as per OMT PR 1489) * handle duplicate route relations (to match OMT PR 1501) * regenerate-openmaptiles.sh master, to match several OMT PRs which adjusted only YML * URLs in comments adjusted to match OMT PR 1560 * Convert separated addresses to dashed addresses * add brunnel (and layer) attributes only for certain zoomlevels, depending on feature size (matching OMT PR 1579) * unit test testInterstateMotorway(): brunnel tag for test line no longer available at Z8 * unit test testInterstateMotorway() clean-up: Z13 was tested twice * minor clean-up: fixed unit test naming * partial fix for differences in transportation_name layer The difference is between OpenMapTiles/master (OMT) and planetiler-openmaptiles/omt_3_15_0 (PT-OMT) (e.g. development versions). The point is, that while PT-OMT was using limit of "8km" for Z9-Z11, OMT is using limit "ST_Length(geometry) > 8000 / POWER(2, zoom_level - 9) AND zoom_level BETWEEN 9 AND 11". Some further differences still visible, hence further commits expected. * further adjustments to better match what is done with ferries in OMT ... (as per OMT PR 1486) But FERRY_MIN_PIXEL_SIZE is "too much" in the contexct of Planetiler, since it is applied within tiles, hence causes gaps in lines if a line "strikes a little" certain tile. Hence we will need to divert a little. * ferry minLength tweak + clean-up * mvn spotless:apply * fixed minor typo * minor reformatting * ferry line length filter replaced with min. zoom calculation hence the results are much closer to what OMT is doing for Z4-Z9 * testFerry() adjusted to match previous commit ferry test polygon with area 1 now qualifies for min. zoom 5 * clea-up of unused stuff + mvn spotless:apply * mvn spotless:apply * added TODO node for follow-up pull-request/simplification * clean-up: common getMinZoom() code moved to Utils * minzoom clipping for brunnel was adjusted do Z9-Z12 -> test adjusted too * clean-up * use same tolerance for all transportation items, like OSM does * clean-up, since ferry and non-ferry procesing is now same * we need regenerate to work with master branch for now * first sub-class search for agg_stop simplified a little * contains() used instead of indexOf() for better readability * numbers as list, not array, so that getFirst() and getLast() can be used * better trimming and filtring of housenumbers * adjusted handling of large house numbers * several unit tests collapsed to one with @ParameterizedTest + @CsvSource * AGG_STOP_SUBCLASS_ORDER simplified from Map to List * fixed major omission from previous commit * clamp() used to replace min()&max() combo * agg_stop now implemented * fixed typo in the error message * prepare IE and GB boundary geometry outside of synchronized{} * fixed typo in the error message * mvn spotless:apply * switch statements for IE and GB route networks simplified * avoid RouteNetwork->String mapping, not needed for anyMatch() * fix: attr. brunnel optional based on size on Z4-Z11, attr. layer optional between Z9-Z11 * tolerance change in transportation reverted, added note to README as per why * fix: monzoom for sea&co. is Z0-Z14 based on area, for the rest it is Z3-Z14 again based on area * clean-up: avoid doing area->side->area, do just area * regenerate-openmaptiles.sh 6c31841f4674f15e15afde346a060cf7c22e6cdd (to match content of OMT PR 1591) * relevant process() functions adjusted to match changes in transportation/mapping.yaml * regenerate-openmaptiles.sh master, instead of 6c31841f4674f15e15afde346a060cf7c22e6cdd (to match content of OMT PR 1591, in a cleaner way) * introduce duplicate housenumber filtering (matching OMT PR 1391) * (less related) clean-up: use isEmpty() instead if size check * testContainsHousenumber UT adjusted, since duplicate housenumber filtering is reducing amount of house numbers * use combination of uic_ref, name, network and operator as key for agg_stop sets If we rely on only on `uic_ref` we group together also stations which are too far apart (even different cities). With this combo results seem OK, e.g. all grouped stations are within around 950m (1000 pixels at Z14) of each other (1000 being used in `PARTITION BY LabelGrid(...` in `layers/poi/poi.sql` in OpenMapTiles). * agg_stop comparison made more explicit, since we want to match same exact one * mvn spotless:apply * name now important for agg_stop processing, hence name:es (ab)used for unit tests * agg_stop: simplified processing of nearest station Results still same, only ordering is different: - previously: agg_stop=1 first - now: FIFO * agg_stop: forther code simplification * fixed major typo introduced in previous merge * setMinPixelSize() + setMinZoom() used instead of areaToMinZoom() * clean-up: unused stuff removed * mvn spotless:apply * setAttrWithMinSize() used instead of getBrunnelMinzoom() getFerryMinzoom() kept since we'd like to replicate `sql_filter: ST_Length(...` from OMT * getMinZoomForLength() no longer used, hence removed * MIN_LENGTH value halved, to partially counter the effect of Planetiler applying the limit before merging * clean-up: LOG2 not used, hence removed * Revert "MIN_LENGTH value halved, to partially counter the effect of Planetiler applying the limit before merging" This reverts commit 8fb6707. * use 256px as buffer pixel override instead of MIN_LENGTH Make sure we have enough room (=whole next tile) when checking MIN_LENGTH, to avoid pieces of otherwise "long enough" lines to be excluded (thus creating "holes" or missing ends) in some tiles just because length in that particular tile is bellow limit. Given that MIN_LENGTH values translated to pixels are quite big (compared to {@code BUFFER_SIZE}), such missing pieces would be quite noticeable. This improves items mainly in Z12-Z13. * added BY_TEMP_HAS_NAME comparator to avoid its repeated construction during run-time * duplicate houcenumber processing simplified further * clean-up: get(0) replaced with getFirst() * clean-up: CPU-intensive prepare() moved out of synchronized block * regenerate-openmaptiles.sh 3cf77e2a542d8a369bb08bf2538cdde0b3effb2b (to match content of OMT PR 1423) * unit test adjusted for POI office class changes * regenerate-openmaptiles.sh master (to match content of OMT PR 1544) * added charging_station implementation matching OMT PR 1544 * use setMinPixelSizeBelowZoom() instead of uniAreaToMinZoom() * use setMinPixelSizeBelowZoom() instead of getFerryMinzoom() * fixed unit test, to match recent tweaks * regenerate-openmaptiles.sh master (to match content of OMT PR 1605) * Fix university office/amenity collision (to match OSM PR 1607) * Remove expressway from ramps * OsmMarinePoint+ne_10m_geography_marine_polys join via name limited to 50km distance * regenerate-openmaptiles.sh master (to match content of OMT PR 1604) * Revert "Add aboriginal lands (as per OMT PR 1489)" This reverts commit 899a0c5. * added handling of aboriginal_lands/OsmBoundaryPolygon into Boundary and Place layers * big islands can now get rank lower than 3 * Add e-road and a-road for transportation z4 * testPolishHighwayIssue165() adjusted: e-road now takes precendence * regenerate-openmaptiles.sh master (to match content of OMT PR 1627) * regenerate-openmaptiles.sh fff7110aeb61882abfafe22d1618fbe6181d96cb (to match content of OMT PR 1620) * Expanded road route attributes (to match OMT PR 1620) * unrelated clean-up: use getFirst() * adjusted handling or null and empty ref * regenerate-openmaptiles.sh master (to match content of OMT PR 1620) * pointOnSurface() used instead of centroid() to make sure the point is within the boundary * adjusted deduplication of route_<n>_<something> attributes * clean-up of some previous adjustments of importantMarinePoints * clean-up: removed unused imports * mvn spotless:apply * OsmWaterPolygon minzoom calculation reverted to v3.14 and then adjusted for new 1/4 threshold * part of process(Tables.OsmWaterPolygon, ...) moved to setupOsmWaterPolygonFeature() * if feature with centerline has minzoom bellow Z9, use also a label point between minzoom and Z8 * bay point vs. centerline difference mentioned in the README * testWaterNameBay for small bay adjusted, testWaterNameBay for big bay added * testWaterNameLakeline and testWaterNameMultipleLakelines tweaked to use smaller test areas * mvn spotless:apply * added unit test which checks minzoom for admin_level=2 disputed border (derived from way) * fixed missing admin_level=2 disputed borders at Z3 * landuse fix for Z5: include all features from ne_50m_urban_areas * minDist and buffer tweaked for residential areas for Z6-Z8 to better match OpenMapTiles * landuse fix for Z5: unit test updated * bumped copyright statements * added/adjusted acknowledgments * fixed handling of Baikonur border in Kazachstan * fixed handling of Baikonur border in Kazachstan (2) * OSM boundaries only for Z5+, non-disputed for Z4+ * OSM boundaries only for Z5+, non-disputed for Z4+ - unit test adjusted * OSM Lake IDs at low zooms * testLakeZoomLevels(): NE lakes removed, checked now in testLakeNaturalEarth*() * Use ne_10m_admin_0_boundary_lines_land_disputed to fix missing South Sudan boundary * testNaturalEarthCountryBoundaries() extended to cover adjusted handling of ne_10m_admin_0_boundary_lines_land * OSM lake area limit increased 2x to match smallest NE lake * OSM lake area limit increased 2x even further to match smallest observed during Planet processing * clean-up: SMALLEST_OSM_LAKE_AREA renamed to OSM_ID_MATCH_AREA_LIMIT to better match what it is * mvn spotless:apply * properly handle center line vs. point also for lakes * clean-up: min() dropped since nothing sets minzoomCL to value higher than MINZOOM_BAY * Revert e-road and a-road. * Revert e-road and a-road. (follow-up) * added unit test to cover: More roads for z4. * improved handling of disputed KE:SS border: will work even if left/right reversed * new PolygonIndex.getIntersecting() used for OSM lake ID matching + increased unit test coverage * neLakeIndexes simplified into neLakeIndex * test several NE lakes also in testLakeNaturalEarthByName() * clean-up: synchronized NOT needed for PolygonIndex.put() * neLakeNameMaps will stay as is, otherwise same names from several NE tables will clash * neAllLakeInfos stays, since neLakeNameMaps contains only some and hard(er) to get all from neLakeIndex * added test for NE lake ame collision: bigger one gets to be matched * simplified NE->OSM lake matching: ignore small OSM lakes right away * minor speed-up: compare intersection area instead of intersction area ratio * fixed minor typo * minor clean-up * minor clean-up after previous changes * adjusted handling of TopologyException to match previous tweaks * mvn spotless:apply * tweaked error message, to better mach cases when TopologyException occurs * adjusted trunks: Z6+ by default, some from Z5, some even from Z4 * adjusted motorways: only some at Z4 * adjusted transportation: clip also construction links to Z9+ * unit tests adjusted to the recent changes * use merge() to avoid problems with concurrent updates * synchronized mergeId() added to avoid problems with concurrent updates * clean-up after cc797f9 * mvn spotless:apply * label point in water_name refactored using setMinPixelSizeBelowZoom() * clean-up: LOG2 removed since no longer used * refactored handling of TopologyException for easier troubleshooting of problematic polygons * fix invalid NE lake geometries + further TopologyException handling tweaks * TopologyException handling removed, since no longer needed after adding NE geometry fixing * clean-up after previous changes * OpenMapTiles 3.15 was released so we can use proper tag now * regenerate-openmaptiles.sh v3.15 to match official OpenMapTiles release * Revert "clean-up after previous changes" This reverts commit ee70382. * Revert "TopologyException handling removed, since no longer needed after adding NE geometry fixing" This reverts commit d4fe59c. * minor clean-up * handle TopologyException also from intersects() * further tweaks for TopologyException handling * warnings demoted to debugs since we're going to re-try * bumped copyright statements * bumped copyright statements * print errors+stack-traces only after retries with fixed polygons since we are not able to raise issues with JTS if we do stuff with invalid/unfixed polygons * message about fixing NE lake geometry demoted: warn -> debug * omt_water message adjusted to make it more clear what it relates to * do NOT store fixed geom in separate variable to avoid 2nd fixing in fillOsmIdIntoNeLake() * one more error message rephrased for clearer context * Revert "print errors+stack-traces only after retries with fixed polygons" This reverts commit 7440973. * strip stack-trace from TopologyException debug messages * fix OSM element geometry if not valid before trying to match NE lake This is same trick as done for NE lakes before. Thanks to that we then do not need to handle TopologyExceptions and do retries. * clean-up * clean-up: mvn spotless:apply
1 parent d6b2371 commit f17cffe

24 files changed

+878
-161
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022, MapTiler.com & OpenMapTiles contributors.
1+
Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
22
All rights reserved.
33

44
The vector tile schema has been developed by Klokan Technologies GmbH and

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ available options.
3030
lines, to revert this behavior set `--transportation-name-brunnel=true`
3131
- `rank` field on `mountain_peak` linestrings only has 3 levels (1: has wikipedia page and name, 2: has name, 3: no name
3232
or wikipedia page or name)
33-
- some line and polygon tolerances are different, can be tweaked with `--simplify-tolerance` parameter
33+
- Some line and polygon tolerances are different, can be tweaked with `--simplify-tolerance` parameter
34+
- For bigger bays whose label points show above Z9, centerline is used for Z9+
3435

3536
## Customizing
3637

@@ -149,24 +150,24 @@ script with the
149150
OpenMapTiles release tag:
150151

151152
```bash
152-
./scripts/regenerate-openmaptiles.sh v3.14
153+
./scripts/regenerate-openmaptiles.sh v3.15
153154
```
154155

155156
Then follow the instructions it prints for reformatting generated code.
156157

157158
If you want to regenerate from a different repository than the default openmaptiles, you can specify the url like this:
158159

159160
```bash
160-
./scripts/regenerate-openmaptiles.sh v3.14 https://raw.githubusercontent.com/openmaptiles/openmaptiles/
161+
./scripts/regenerate-openmaptiles.sh v3.15 https://raw.githubusercontent.com/openmaptiles/openmaptiles/
161162
```
162163

163164
## License
164165

165166
All code in this repository is under the [BSD license](./LICENSE.md) and the cartography decisions encoded in the schema
166167
and SQL are licensed under [CC-BY](./LICENSE.md).
167168

168-
Products or services using maps derived from OpenMapTiles schema need to visibly credit "OpenMapTiles.org" or
169-
reference "OpenMapTiles" with a link to https://openmaptiles.org/. Exceptions to attribution requirement can be granted
169+
Products or services using maps derived from OpenMapTiles schema need to **visibly credit "OpenMapTiles.org"** or
170+
**reference "OpenMapTiles"** with a link to https://openmaptiles.org/. Exceptions to attribution requirement can be granted
170171
on request.
171172

172173
For a browsable electronic map based on OpenMapTiles and OpenStreetMap data, the

scripts/regenerate-openmaptiles.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ set -o errexit
44
set -o pipefail
55
set -o nounset
66

7-
# TODO: change to "v3.15" once that is released
8-
TAG="${1:-"master"}"
7+
TAG="${1:-"v3.15"}"
98
echo "tag=${TAG}"
109

1110
BASE_URL="${2:-"https://raw.githubusercontent.com/openmaptiles/openmaptiles/"}"

src/main/java/org/openmaptiles/Generate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class Generate {
6161
private static final String LINE_SEPARATOR = System.lineSeparator();
6262
private static final String GENERATED_FILE_HEADER = """
6363
/*
64-
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
64+
Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
6565
All rights reserved.
6666
6767
Code license: BSD 3-Clause License
@@ -133,7 +133,7 @@ static JsonNode parseYaml(String string) {
133133
public static void main(String[] args) throws IOException {
134134
Arguments arguments = Arguments.fromArgsOrConfigFile(args);
135135
PlanetilerConfig planetilerConfig = PlanetilerConfig.from(arguments);
136-
String tag = arguments.getString("tag", "openmaptiles tag to use", "v3.14.0");
136+
String tag = arguments.getString("tag", "openmaptiles tag to use", "v3.15.0");
137137
String baseUrl = arguments.getString("base-url", "the url used to download the openmaptiles.yml",
138138
"https://raw.githubusercontent.com/openmaptiles/openmaptiles/");
139139
String base = baseUrl + tag + "/";

src/main/java/org/openmaptiles/OpenMapTilesMain.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
import com.onthegomap.planetiler.config.Arguments;
55
import java.nio.file.Path;
66
import org.openmaptiles.generated.OpenMapTilesSchema;
7+
import org.slf4j.Logger;
8+
import org.slf4j.LoggerFactory;
79

810
/**
911
* Main entrypoint for generating a map using the OpenMapTiles schema.
1012
*/
1113
public class OpenMapTilesMain {
1214

15+
private static final Logger LOGGER = LoggerFactory.getLogger(OpenMapTilesMain.class);
16+
1317
public static void main(String[] args) throws Exception {
1418
run(Arguments.fromArgsOrConfigFile(args));
1519
}
@@ -52,5 +56,15 @@ static void run(Arguments arguments) throws Exception {
5256
// override with --mbtiles=... argument or MBTILES=... env var or mbtiles=... in a config file
5357
.setOutput("mbtiles", dataDir.resolve("output.mbtiles"))
5458
.run();
59+
60+
LOGGER.info("""
61+
Acknowledgments
62+
Generated vector tiles are produced work of OpenStreetMap data.
63+
Such tiles are reusable under CC-BY license granted by OpenMapTiles team:
64+
- https://github.com/openmaptiles/openmaptiles/#license
65+
Maps made with these vector tiles must display a visible credit:
66+
- © OpenMapTiles © OpenStreetMap contributors
67+
Thanks to all free, open source software developers and Open Data Contributors!
68+
""");
5569
}
5670
}

src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
2+
Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
33
All rights reserved.
44
55
Code license: BSD 3-Clause License
@@ -49,14 +49,14 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4949

5050
/**
5151
* All vector tile layer definitions, attributes, and allowed values generated from the
52-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/openmaptiles.yaml">OpenMapTiles vector tile schema
53-
* master</a>.
52+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/openmaptiles.yaml">OpenMapTiles vector tile schema
53+
* v3.15</a>.
5454
*/
5555
@SuppressWarnings("unused")
5656
public class OpenMapTilesSchema {
5757
public static final String NAME = "OpenMapTiles";
5858
public static final String DESCRIPTION = "A tileset showcasing all layers in OpenMapTiles. https://openmaptiles.org";
59-
public static final String VERSION = "3.14.0";
59+
public static final String VERSION = "3.15.0";
6060
public static final String ATTRIBUTION =
6161
"<a href=\"https://www.openmaptiles.org/\" target=\"_blank\">&copy; OpenMapTiles</a> <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">&copy; OpenStreetMap contributors</a>";
6262
public static final List<String> LANGUAGES = List.of("am", "ar", "az", "be", "bg", "bn", "br", "bs", "ca", "co", "cs",
@@ -96,7 +96,7 @@ public static List<Layer> createInstances(Translations translations, PlanetilerC
9696
* boundaries show up. So you might not be able to use border styling for ocean water features.
9797
*
9898
* Generated from
99-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/water/water.yaml">water.yaml</a>
99+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/water/water.yaml">water.yaml</a>
100100
*/
101101
public interface Water extends Layer {
102102
double BUFFER_SIZE = 4.0;
@@ -182,7 +182,7 @@ final class FieldMappings {
182182
public static final MultiExpression<String> Class =
183183
MultiExpression.of(List.of(MultiExpression.entry("dock", matchAny("waterway", "dock")),
184184
MultiExpression.entry("river", matchAny("water", "river", "stream", "canal", "ditch", "drain")),
185-
MultiExpression.entry("pond", matchAny("water", "pond", "basin", "wastewater")),
185+
MultiExpression.entry("pond", matchAny("water", "pond", "basin", "wastewater", "salt_pond")),
186186
MultiExpression.entry("lake", FALSE), MultiExpression.entry("ocean", FALSE),
187187
MultiExpression.entry("swimming_pool", matchAny("leisure", "swimming_pool"))));
188188
}
@@ -195,7 +195,7 @@ final class FieldMappings {
195195
* field applied. Waterways do not have a <code>subclass</code> field.
196196
*
197197
* Generated from
198-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/waterway/waterway.yaml">waterway.yaml</a>
198+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/waterway/waterway.yaml">waterway.yaml</a>
199199
*/
200200
public interface Waterway extends Layer {
201201
double BUFFER_SIZE = 4.0;
@@ -287,7 +287,7 @@ final class FieldMappings {
287287
* layer is to style wood (<code>class=wood</code>) and grass (<code>class=grass</code>) areas.
288288
*
289289
* Generated from <a href=
290-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/landcover/landcover.yaml">landcover.yaml</a>
290+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/landcover/landcover.yaml">landcover.yaml</a>
291291
*/
292292
public interface Landcover extends Layer {
293293
double BUFFER_SIZE = 4.0;
@@ -444,7 +444,7 @@ final class FieldMappings {
444444
* residential (urban) areas and at higher zoom levels mostly OSM <code>landuse</code> tags.
445445
*
446446
* Generated from
447-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/landuse/landuse.yaml">landuse.yaml</a>
447+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/landuse/landuse.yaml">landuse.yaml</a>
448448
*/
449449
public interface Landuse extends Layer {
450450
double BUFFER_SIZE = 4.0;
@@ -540,7 +540,7 @@ final class FieldMappings {
540540
* <a href="http://wiki.openstreetmap.org/wiki/Tag:natural%3Dpeak">Natural peaks</a>
541541
*
542542
* Generated from <a href=
543-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/mountain_peak/mountain_peak.yaml">mountain_peak.yaml</a>
543+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/mountain_peak/mountain_peak.yaml">mountain_peak.yaml</a>
544544
*/
545545
public interface MountainPeak extends Layer {
546546
double BUFFER_SIZE = 64.0;
@@ -563,7 +563,10 @@ final class Fields {
563563
* removed in a future release in favor of <code>name:en</code>.
564564
*/
565565
public static final String NAME_EN = "name_en";
566-
/** German name <code>name:de</code> if available, otherwise <code>name</code> or <code>name:en</code>. */
566+
/**
567+
* German name <code>name:de</code> if available, otherwise <code>name</code> or <code>name:en</code>. This is
568+
* deprecated and will be removed in a future release in favor of <code>name:de</code>.
569+
*/
567570
public static final String NAME_DE = "name_de";
568571

569572
/**
@@ -621,7 +624,7 @@ final class FieldMappings {
621624
* <a href="https://wiki.openstreetmap.org/wiki/Tag:leisure%3Dnature_reserve"><code>leisure=nature_reserve</code></a>.
622625
*
623626
* Generated from
624-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/park/park.yaml">park.yaml</a>
627+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/park/park.yaml">park.yaml</a>
625628
*/
626629
public interface Park extends Layer {
627630
double BUFFER_SIZE = 4.0;
@@ -684,7 +687,7 @@ final class FieldMappings {
684687
* but for most styles it makes sense to just style <code>admin_level=2</code> and <code>admin_level=4</code>.
685688
*
686689
* Generated from
687-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/boundary/boundary.yaml">boundary.yaml</a>
690+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/boundary/boundary.yaml">boundary.yaml</a>
688691
*/
689692
public interface Boundary extends Layer {
690693
double BUFFER_SIZE = 4.0;
@@ -794,7 +797,7 @@ final class FieldMappings {
794797
* in the <strong>aeroway</strong> layer.
795798
*
796799
* Generated from
797-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/aeroway/aeroway.yaml">aeroway.yaml</a>
800+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/aeroway/aeroway.yaml">aeroway.yaml</a>
798801
*/
799802
public interface Aeroway extends Layer {
800803
double BUFFER_SIZE = 4.0;
@@ -854,7 +857,7 @@ final class FieldMappings {
854857
* features like plazas.
855858
*
856859
* Generated from <a href=
857-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/transportation/transportation.yaml">transportation.yaml</a>
860+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/transportation/transportation.yaml">transportation.yaml</a>
858861
*/
859862
public interface Transportation extends Layer {
860863
double BUFFER_SIZE = 4.0;
@@ -1199,7 +1202,7 @@ final class FieldMappings {
11991202
* location:underground are excluded.
12001203
*
12011204
* Generated from
1202-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/building/building.yaml">building.yaml</a>
1205+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/building/building.yaml">building.yaml</a>
12031206
*/
12041207
public interface Building extends Layer {
12051208
double BUFFER_SIZE = 4.0;
@@ -1241,7 +1244,7 @@ final class FieldMappings {
12411244
* from OSM water bodies. Only the most important lakes contain labels.
12421245
*
12431246
* Generated from <a href=
1244-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/water_name/water_name.yaml">water_name.yaml</a>
1247+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/water_name/water_name.yaml">water_name.yaml</a>
12451248
*/
12461249
public interface WaterName extends Layer {
12471250
double BUFFER_SIZE = 256.0;
@@ -1318,7 +1321,7 @@ final class FieldMappings {
13181321
* while for other roads you should use <code>name</code>.
13191322
*
13201323
* Generated from <a href=
1321-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/transportation_name/transportation_name.yaml">transportation_name.yaml</a>
1324+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/transportation_name/transportation_name.yaml">transportation_name.yaml</a>
13221325
*/
13231326
public interface TransportationName extends Layer {
13241327
double BUFFER_SIZE = 8.0;
@@ -1590,7 +1593,7 @@ final class FieldMappings {
15901593
* create a text hierarchy.
15911594
*
15921595
* Generated from
1593-
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/place/place.yaml">place.yaml</a>
1596+
* <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/place/place.yaml">place.yaml</a>
15941597
*/
15951598
public interface Place extends Layer {
15961599
double BUFFER_SIZE = 256.0;
@@ -1714,7 +1717,7 @@ final class FieldMappings {
17141717
* tag are prioritized for preservation).
17151718
*
17161719
* Generated from <a href=
1717-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/housenumber/housenumber.yaml">housenumber.yaml</a>
1720+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/housenumber/housenumber.yaml">housenumber.yaml</a>
17181721
*/
17191722
public interface Housenumber extends Layer {
17201723
double BUFFER_SIZE = 8.0;
@@ -1746,7 +1749,7 @@ final class FieldMappings {
17461749
* <a href="http://wiki.openstreetmap.org/wiki/Points_of_interest">Points of interests</a> containing a of a variety
17471750
* of OpenStreetMap tags. Mostly contains amenities, sport, shop and tourist POIs.
17481751
*
1749-
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/poi/poi.yaml">poi.yaml</a>
1752+
* Generated from <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/poi/poi.yaml">poi.yaml</a>
17501753
*/
17511754
public interface Poi extends Layer {
17521755
double BUFFER_SIZE = 64.0;
@@ -1990,7 +1993,7 @@ final class FieldMappings {
19901993
* <a href="http://wiki.openstreetmap.org/wiki/Tag:aeroway%3Daerodrome">Aerodrome labels</a>
19911994
*
19921995
* Generated from <a href=
1993-
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/aerodrome_label/aerodrome_label.yaml">aerodrome_label.yaml</a>
1996+
* "https://github.com/openmaptiles/openmaptiles/blob/v3.15/layers/aerodrome_label/aerodrome_label.yaml">aerodrome_label.yaml</a>
19941997
*/
19951998
public interface AerodromeLabel extends Layer {
19961999
double BUFFER_SIZE = 64.0;

src/main/java/org/openmaptiles/generated/Tables.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
2+
Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
33
All rights reserved.
44
55
Code license: BSD 3-Clause License
@@ -50,7 +50,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5050

5151
/**
5252
* OSM element parsers generated from the <a href="https://github.com/omniscale/imposm3">imposm3</a> table definitions
53-
* in the <a href="https://github.com/openmaptiles/openmaptiles/blob/master/openmaptiles.yaml">OpenMapTiles vector tile
53+
* in the <a href="https://github.com/openmaptiles/openmaptiles/blob/v3.15/openmaptiles.yaml">OpenMapTiles vector tile
5454
* schema</a>.
5555
*
5656
* These filter and parse the raw OSM key/value attribute pairs on tags into records with fields that match the columns

src/main/java/org/openmaptiles/layers/Boundary.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
2+
Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
33
All rights reserved.
44
55
Code license: BSD 3-Clause License
@@ -121,6 +121,8 @@ public class Boundary implements
121121

122122
private static final Logger LOGGER = LoggerFactory.getLogger(Boundary.class);
123123
private static final double COUNTRY_TEST_OFFSET = GeoUtils.metersToPixelAtEquator(0, 10) / 256d;
124+
private static final String COUNTRY_KE = "Kenya";
125+
private static final String COUNTRY_SS = "South Sudan";
124126
private final Stats stats;
125127
private final boolean addCountryNames;
126128
private final boolean onlyOsmBoundaries;
@@ -179,8 +181,21 @@ record BoundaryInfo(int adminLevel, int minzoom, int maxzoom) {}
179181
BoundaryInfo info = switch (table) {
180182
case "ne_110m_admin_0_boundary_lines_land" -> new BoundaryInfo(2, 0, 0);
181183
case "ne_50m_admin_0_boundary_lines_land" -> new BoundaryInfo(2, 1, 3);
182-
case "ne_10m_admin_0_boundary_lines_land" -> feature.hasTag("featurecla", "Lease Limit") ? null :
183-
new BoundaryInfo(2, 4, 4);
184+
case "ne_10m_admin_0_boundary_lines_land" -> {
185+
boolean isDisputedSouthSudanAndKenya = false;
186+
if (disputed) {
187+
String left = feature.getString("adm0_left");
188+
String right = feature.getString("adm0_right");
189+
if (COUNTRY_SS.equals(left)) {
190+
isDisputedSouthSudanAndKenya = COUNTRY_KE.equals(right);
191+
} else if (COUNTRY_KE.equals(left)) {
192+
isDisputedSouthSudanAndKenya = COUNTRY_SS.equals(right);
193+
}
194+
}
195+
yield isDisputedSouthSudanAndKenya ? new BoundaryInfo(2, 1, 4) :
196+
feature.hasTag("featurecla", "Lease limit") ? null :
197+
new BoundaryInfo(2, 4, 4);
198+
}
184199
case "ne_10m_admin_1_states_provinces_lines" -> {
185200
Double minZoom = Parse.parseDoubleOrNull(feature.getTag("min_zoom"));
186201
yield minZoom != null && minZoom <= 7 ? new BoundaryInfo(4, 1, 4) :

src/main/java/org/openmaptiles/layers/Building.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
2+
Copyright (c) 2023, MapTiler.com & OpenMapTiles contributors.
33
All rights reserved.
44
55
Code license: BSD 3-Clause License

src/main/java/org/openmaptiles/layers/Housenumber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
2+
Copyright (c) 2024, MapTiler.com & OpenMapTiles contributors.
33
All rights reserved.
44
55
Code license: BSD 3-Clause License

0 commit comments

Comments
 (0)