forked from openmaptiles/planetiler-openmaptiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenMapTilesSchema.java
1973 lines (1877 loc) · 91.7 KB
/
OpenMapTilesSchema.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Copyright (c) 2021, MapTiler.com & OpenMapTiles contributors.
All rights reserved.
Code license: BSD 3-Clause License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Design license: CC-BY 4.0
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
*/
// AUTOGENERATED BY Generate.java -- DO NOT MODIFY
package org.openmaptiles.generated;
import static com.onthegomap.planetiler.expression.Expression.*;
import com.onthegomap.planetiler.config.PlanetilerConfig;
import com.onthegomap.planetiler.expression.MultiExpression;
import com.onthegomap.planetiler.stats.Stats;
import com.onthegomap.planetiler.util.Translations;
import java.util.List;
import java.util.Set;
import org.openmaptiles.Layer;
/**
* All vector tile layer definitions, attributes, and allowed values generated from the
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/openmaptiles.yaml">OpenMapTiles vector tile schema
* master</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.14.0";
public static final String ATTRIBUTION =
"<a href=\"https://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">© OpenStreetMap contributors</a>";
public static final List<String> LANGUAGES = List.of("am", "ar", "az", "be", "bg", "bn", "br", "bs", "ca", "co", "cs",
"cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fr", "fy", "ga", "gd", "he", "hi", "hr", "hu",
"hy", "id", "is", "it", "ja", "ja_kana", "ja_rm", "ja-Latn", "ja-Hira", "ka", "kk", "kn", "ko", "ko-Latn", "ku",
"la", "lb", "lt", "lv", "mk", "mt", "ml", "nl", "no", "oc", "pa", "pnb", "pl", "pt", "rm", "ro", "ru", "sk", "sl",
"sq", "sr", "sr-Latn", "sv", "ta", "te", "th", "tr", "uk", "ur", "vi", "zh", "zh-Hant", "zh-Hans");
/** Returns a list of expected layer implementation instances from the {@code layers} package. */
public static List<Layer> createInstances(Translations translations, PlanetilerConfig config, Stats stats) {
return List.of(
new org.openmaptiles.layers.Water(translations, config, stats),
new org.openmaptiles.layers.Waterway(translations, config, stats),
new org.openmaptiles.layers.Landcover(translations, config, stats),
new org.openmaptiles.layers.Landuse(translations, config, stats),
new org.openmaptiles.layers.MountainPeak(translations, config, stats),
new org.openmaptiles.layers.Park(translations, config, stats),
new org.openmaptiles.layers.Boundary(translations, config, stats),
new org.openmaptiles.layers.Aeroway(translations, config, stats),
new org.openmaptiles.layers.Transportation(translations, config, stats),
new org.openmaptiles.layers.Building(translations, config, stats),
new org.openmaptiles.layers.WaterName(translations, config, stats),
new org.openmaptiles.layers.TransportationName(translations, config, stats),
new org.openmaptiles.layers.Place(translations, config, stats),
new org.openmaptiles.layers.Housenumber(translations, config, stats),
new org.openmaptiles.layers.Poi(translations, config, stats),
new org.openmaptiles.layers.AerodromeLabel(translations, config, stats)
);
}
/**
* Water polygons representing oceans and lakes. Covered watered areas are excluded (<code>covered=yes</code>). On low
* zoom levels all water originates from Natural Earth. To get a more correct display of the south pole you should
* also style the covering ice shelves over the water. On higher zoom levels water polygons from
* <a href="http://osmdata.openstreetmap.de/">OpenStreetMapData</a> are used. The polygons are split into many smaller
* polygons to improve rendering performance. This however can lead to less rendering options in clients since these
* boundaries show up. So you might not be able to use border styling for ocean water features.
*
* Generated from
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/water/water.yaml">water.yaml</a>
*/
public interface Water extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "water";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the water layer. */
final class Fields {
/**
* From zoom 6 are taken OSM IDs. Up to zoom 5 there are used Natural Earth lakes, where are propagated the OSM
* IDs insted of Natural Earth IDs. For smaller area then planet, NE lakes keep their Natural Earth IDs.
*/
public static final String ID = "id";
/**
* All water polygons from <a href="http://osmdata.openstreetmap.de/">OpenStreetMapData</a> have the class
* <code>ocean</code>. The water-covered areas of flowing water bodies with the
* <a href="http://wiki.openstreetmap.org/wiki/Tag:water=river"><code>water=river</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Tag:water=canal"><code>water=canal</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Tag:water=stream"><code>water=stream</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Tag:water=ditch"><code>water=ditch</code></a>, or
* <a href="http://wiki.openstreetmap.org/wiki/Tag:water=drain"><code>water=drain</code></a> tags 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>. Various minor waterbodies are classified as a <code>pond</code>. Swimming pools tagged
* <a href="https://wiki.openstreetmap.org/wiki/Tag:leisure=swimming_pool"><code>leisure=swimming_pool</code></a>
* are classified as a <code>swimming_pool</code> All other water bodies are classified as <code>lake</code>.
* <p>
* allowed values:
* <ul>
* <li>dock
* <li>river
* <li>pond
* <li>lake
* <li>ocean
* <li>swimming_pool
* </ul>
*/
public static final String CLASS = "class";
/**
* Mark with <code>1</code> if it is an
* <a href="http://wiki.openstreetmap.org/wiki/Key:intermittent">intermittent</a> water polygon.
* <p>
* allowed values:
* <ul>
* <li>0
* <li>1
* </ul>
*/
public static final String INTERMITTENT = "intermittent";
/**
* Identifies the type of crossing as either a bridge or a tunnel.
* <p>
* allowed values:
* <ul>
* <li>"bridge"
* <li>"tunnel"
* </ul>
*/
public static final String BRUNNEL = "brunnel";
}
/** Attribute values for map elements in the water layer. */
final class FieldValues {
public static final String CLASS_DOCK = "dock";
public static final String CLASS_RIVER = "river";
public static final String CLASS_POND = "pond";
public static final String CLASS_LAKE = "lake";
public static final String CLASS_OCEAN = "ocean";
public static final String CLASS_SWIMMING_POOL = "swimming_pool";
public static final Set<String> CLASS_VALUES = Set.of("dock", "river", "pond", "lake", "ocean", "swimming_pool");
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");
}
/** Complex mappings to generate attribute values from OSM element tags in the water layer. */
final class FieldMappings {
public static final MultiExpression<String> Class =
MultiExpression.of(List.of(MultiExpression.entry("dock", matchAny("waterway", "dock")),
MultiExpression.entry("river", matchAny("water", "river", "stream", "canal", "ditch", "drain")),
MultiExpression.entry("pond", matchAny("water", "pond", "basin", "wastewater")),
MultiExpression.entry("lake", FALSE), MultiExpression.entry("ocean", FALSE),
MultiExpression.entry("swimming_pool", matchAny("leisure", "swimming_pool"))));
}
}
/**
* OpenStreetMap <a href="https://wiki.openstreetmap.org/wiki/Waterways">waterways</a> for higher zoom levels (z9 and
* more) and Natural Earth rivers and lake centerlines for low zoom levels (z3 - z8). Linestrings without a name or
* which are too short are filtered out at low zoom levels. Till z11 there is <code>river</code> class only, in z12
* 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.
*
* Generated from
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/waterway/waterway.yaml">waterway.yaml</a>
*/
public interface Waterway extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "waterway";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the waterway layer. */
final class Fields {
/**
* The OSM <a href="http://wiki.openstreetmap.org/wiki/Key:name"><code>name</code></a> value of the waterway. The
* <code>name</code> field may be empty for NaturalEarth data or at lower zoom levels.
*/
public static final String NAME = "name";
/** English name <code>name:en</code> if available, otherwise <code>name</code>. */
public static final String NAME_EN = "name_en";
/** German name <code>name:de</code> if available, otherwise <code>name</code> or <code>name:en</code>. */
public static final String NAME_DE = "name_de";
/**
* The original value of the <a href="http://wiki.openstreetmap.org/wiki/Key:waterway"><code>waterway</code></a>
* tag.
* <p>
* allowed values:
* <ul>
* <li>"stream"
* <li>"river"
* <li>"canal"
* <li>"drain"
* <li>"ditch"
* </ul>
*/
public static final String CLASS = "class";
/**
* Mark whether way is a tunnel or bridge.
* <p>
* allowed values:
* <ul>
* <li>"bridge"
* <li>"tunnel"
* </ul>
*/
public static final String BRUNNEL = "brunnel";
/**
* Mark with <code>1</code> if it is an
* <a href="http://wiki.openstreetmap.org/wiki/Key:intermittent">intermittent</a> waterway.
* <p>
* allowed values:
* <ul>
* <li>0
* <li>1
* </ul>
*/
public static final String INTERMITTENT = "intermittent";
}
/** Attribute values for map elements in the waterway layer. */
final class FieldValues {
public static final String CLASS_STREAM = "stream";
public static final String CLASS_RIVER = "river";
public static final String CLASS_CANAL = "canal";
public static final String CLASS_DRAIN = "drain";
public static final String CLASS_DITCH = "ditch";
public static final Set<String> CLASS_VALUES = Set.of("stream", "river", "canal", "drain", "ditch");
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");
}
/** Complex mappings to generate attribute values from OSM element tags in the waterway layer. */
final class FieldMappings {
}
}
/**
* Landcover is used to describe the physical material at the surface of the earth. At lower zoom levels this is from
* Natural Earth data for glaciers and ice shelves and at higher zoom levels the landcover is
* <a 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.
*
* Generated from <a href=
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/landcover/landcover.yaml">landcover.yaml</a>
*/
public interface Landcover extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "landcover";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the landcover layer. */
final class Fields {
/**
* Use the <strong>class</strong> to assign natural colors for <strong>landcover</strong>.
* <p>
* allowed values:
* <ul>
* <li>farmland
* <li>ice
* <li>wood
* <li>rock
* <li>grass
* <li>wetland
* <li>sand
* </ul>
*/
public static final String CLASS = "class";
/**
* Use <strong>subclass</strong> to do more precise styling. Original value of either the
* <a href="http://wiki.openstreetmap.org/wiki/Key:natural"><code>natural</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:landuse"><code>landuse</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:leisure"><code>leisure</code></a>, or
* <a href="http://wiki.openstreetmap.org/wiki/Key:wetland"><code>wetland</code></a> tag.
* <p>
* allowed values:
* <ul>
* <li>"allotments"
* <li>"bare_rock"
* <li>"beach"
* <li>"bog"
* <li>"dune"
* <li>"scrub"
* <li>"shrubbery"
* <li>"farm"
* <li>"farmland"
* <li>"fell"
* <li>"forest"
* <li>"garden"
* <li>"glacier"
* <li>"grass"
* <li>"grassland"
* <li>"golf_course"
* <li>"heath"
* <li>"mangrove"
* <li>"marsh"
* <li>"meadow"
* <li>"orchard"
* <li>"park"
* <li>"plant_nursery"
* <li>"recreation_ground"
* <li>"reedbed"
* <li>"saltern"
* <li>"saltmarsh"
* <li>"sand"
* <li>"scree"
* <li>"swamp"
* <li>"tidalflat"
* <li>"tundra"
* <li>"village_green"
* <li>"vineyard"
* <li>"wet_meadow"
* <li>"wetland"
* <li>"wood"
* </ul>
*/
public static final String SUBCLASS = "subclass";
}
/** Attribute values for map elements in the landcover layer. */
final class FieldValues {
public static final String CLASS_FARMLAND = "farmland";
public static final String CLASS_ICE = "ice";
public static final String CLASS_WOOD = "wood";
public static final String CLASS_ROCK = "rock";
public static final String CLASS_GRASS = "grass";
public static final String CLASS_WETLAND = "wetland";
public static final String CLASS_SAND = "sand";
public static final Set<String> CLASS_VALUES =
Set.of("farmland", "ice", "wood", "rock", "grass", "wetland", "sand");
public static final String SUBCLASS_ALLOTMENTS = "allotments";
public static final String SUBCLASS_BARE_ROCK = "bare_rock";
public static final String SUBCLASS_BEACH = "beach";
public static final String SUBCLASS_BOG = "bog";
public static final String SUBCLASS_DUNE = "dune";
public static final String SUBCLASS_SCRUB = "scrub";
public static final String SUBCLASS_SHRUBBERY = "shrubbery";
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_FOREST = "forest";
public static final String SUBCLASS_GARDEN = "garden";
public static final String SUBCLASS_GLACIER = "glacier";
public static final String SUBCLASS_GRASS = "grass";
public static final String SUBCLASS_GRASSLAND = "grassland";
public static final String SUBCLASS_GOLF_COURSE = "golf_course";
public static final String SUBCLASS_HEATH = "heath";
public static final String SUBCLASS_MANGROVE = "mangrove";
public static final String SUBCLASS_MARSH = "marsh";
public static final String SUBCLASS_MEADOW = "meadow";
public static final String SUBCLASS_ORCHARD = "orchard";
public static final String SUBCLASS_PARK = "park";
public static final String SUBCLASS_PLANT_NURSERY = "plant_nursery";
public static final String SUBCLASS_RECREATION_GROUND = "recreation_ground";
public static final String SUBCLASS_REEDBED = "reedbed";
public static final String SUBCLASS_SALTERN = "saltern";
public static final String SUBCLASS_SALTMARSH = "saltmarsh";
public static final String SUBCLASS_SAND = "sand";
public static final String SUBCLASS_SCREE = "scree";
public static final String SUBCLASS_SWAMP = "swamp";
public static final String SUBCLASS_TIDALFLAT = "tidalflat";
public static final String SUBCLASS_TUNDRA = "tundra";
public static final String SUBCLASS_VILLAGE_GREEN = "village_green";
public static final String SUBCLASS_VINEYARD = "vineyard";
public static final String SUBCLASS_WET_MEADOW = "wet_meadow";
public static final String SUBCLASS_WETLAND = "wetland";
public static final String SUBCLASS_WOOD = "wood";
public static final Set<String> 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");
}
/** Complex mappings to generate attribute values from OSM element tags in the landcover layer. */
final class FieldMappings {
public static final MultiExpression<String> Class =
MultiExpression
.of(List.of(
MultiExpression.entry("farmland",
matchAny("subclass", "farmland", "farm", "orchard", "vineyard", "plant_nursery")),
MultiExpression.entry("ice", matchAny("subclass", "glacier", "ice_shelf")),
MultiExpression.entry("wood", matchAny("subclass", "wood", "forest")),
MultiExpression.entry("rock", matchAny("subclass", "bare_rock", "scree")),
MultiExpression.entry("grass",
matchAny("subclass", "fell", "grassland", "heath", "scrub", "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")),
MultiExpression.entry("sand", matchAny("subclass", "beach", "sand", "dune"))));
}
}
/**
* Landuse is used to describe use of land by humans. At lower zoom levels this is from Natural Earth data for
* residential (urban) areas and at higher zoom levels mostly OSM <code>landuse</code> tags.
*
* Generated from
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/landuse/landuse.yaml">landuse.yaml</a>
*/
public interface Landuse extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "landuse";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the landuse layer. */
final class Fields {
/**
* Use the <strong>class</strong> to assign special colors to areas. Original value of either the
* <a href="http://wiki.openstreetmap.org/wiki/Key:landuse"><code>landuse</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:amenity"><code>amenity</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:leisure"><code>leisure</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:tourism"><code>tourism</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:place"><code>place</code></a> or
* <a href="http://wiki.openstreetmap.org/wiki/Key:waterway"><code>waterway</code></a> tag.
* <p>
* allowed values:
* <ul>
* <li>"railway"
* <li>"cemetery"
* <li>"military"
* <li>"residential"
* <li>"commercial"
* <li>"industrial"
* <li>"garages"
* <li>"retail"
* <li>"bus_station"
* <li>"school"
* <li>"university"
* <li>"kindergarten"
* <li>"college"
* <li>"library"
* <li>"hospital"
* <li>"stadium"
* <li>"pitch"
* <li>"playground"
* <li>"track"
* <li>"theme_park"
* <li>"zoo"
* <li>"suburb"
* <li>"quarter"
* <li>"neighbourhood"
* <li>"dam"
* <li>"quarry"
* </ul>
*/
public static final String CLASS = "class";
}
/** Attribute values for map elements in the landuse layer. */
final class FieldValues {
public static final String CLASS_RAILWAY = "railway";
public static final String CLASS_CEMETERY = "cemetery";
public static final String CLASS_MILITARY = "military";
public static final String CLASS_RESIDENTIAL = "residential";
public static final String CLASS_COMMERCIAL = "commercial";
public static final String CLASS_INDUSTRIAL = "industrial";
public static final String CLASS_GARAGES = "garages";
public static final String CLASS_RETAIL = "retail";
public static final String CLASS_BUS_STATION = "bus_station";
public static final String CLASS_SCHOOL = "school";
public static final String CLASS_UNIVERSITY = "university";
public static final String CLASS_KINDERGARTEN = "kindergarten";
public static final String CLASS_COLLEGE = "college";
public static final String CLASS_LIBRARY = "library";
public static final String CLASS_HOSPITAL = "hospital";
public static final String CLASS_STADIUM = "stadium";
public static final String CLASS_PITCH = "pitch";
public static final String CLASS_PLAYGROUND = "playground";
public static final String CLASS_TRACK = "track";
public static final String CLASS_THEME_PARK = "theme_park";
public static final String CLASS_ZOO = "zoo";
public static final String CLASS_SUBURB = "suburb";
public static final String CLASS_QUARTER = "quarter";
public static final String CLASS_NEIGHBOURHOOD = "neighbourhood";
public static final String CLASS_DAM = "dam";
public static final String CLASS_QUARRY = "quarry";
public static final Set<String> CLASS_VALUES =
Set.of("railway", "cemetery", "military", "residential", "commercial", "industrial", "garages", "retail",
"bus_station", "school", "university", "kindergarten", "college", "library", "hospital", "stadium", "pitch",
"playground", "track", "theme_park", "zoo", "suburb", "quarter", "neighbourhood", "dam", "quarry");
}
/** Complex mappings to generate attribute values from OSM element tags in the landuse layer. */
final class FieldMappings {
}
}
/**
* <a href="http://wiki.openstreetmap.org/wiki/Tag:natural%3Dpeak">Natural peaks</a>
*
* Generated from <a href=
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/mountain_peak/mountain_peak.yaml">mountain_peak.yaml</a>
*/
public interface MountainPeak extends Layer {
double BUFFER_SIZE = 64.0;
String LAYER_NAME = "mountain_peak";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the mountain_peak layer. */
final class Fields {
/** The OSM <a href="http://wiki.openstreetmap.org/wiki/Key:name"><code>name</code></a> value of the peak. */
public static final String NAME = "name";
/** English name <code>name:en</code> if available, otherwise <code>name</code>. */
public static final String NAME_EN = "name_en";
/** German name <code>name:de</code> if available, otherwise <code>name</code> or <code>name:en</code>. */
public static final String NAME_DE = "name_de";
/**
* Use the <strong>class</strong> to differentiate between natural objects.
* <p>
* allowed values:
* <ul>
* <li>"peak"
* <li>"volcano"
* <li>"saddle"
* <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 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";
}
/** Attribute values for map elements in the mountain_peak layer. */
final class FieldValues {
public static final String CLASS_PEAK = "peak";
public static final String CLASS_VOLCANO = "volcano";
public static final String CLASS_SADDLE = "saddle";
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", "saddle", "ridge", "cliff", "arete");
}
/** Complex mappings to generate attribute values from OSM element tags in the mountain_peak layer. */
final class FieldMappings {
}
}
/**
* The park layer in OpenMapTiles contains natural and protected areas from OpenStreetMap, such as parks tagged with
* <a href="https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dnational_park"><code>boundary=national_park</code></a>,
* <a href=
* "https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dprotected_area"><code>boundary=protected_area</code></a>, or
* <a href="https://wiki.openstreetmap.org/wiki/Tag:leisure%3Dnature_reserve"><code>leisure=nature_reserve</code></a>.
* This layer also includes boundaries for indigenous lands tagged with <a href=
* "https://wiki.openstreetmap.org/wiki/Tag:boundary%3Daboriginal_lands"><code>boundary=aboriginal_lands</code></a>.
* Indigenous boundaries are not parks, but they are included in this layer for technical reasons related to data
* processing. These boundaries represent areas with special legal and administrative status for indigenous peoples.
*
* Generated from
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/park/park.yaml">park.yaml</a>
*/
public interface Park extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "park";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the park layer. */
final class Fields {
/**
* Use the <strong>class</strong> to differentiate between different kinds of features in the <code>parks</code>
* layer, for example between parks and non-parks. The class for <code>boundary=protected_area</code> parks is the
* lower-case of the
* <a href="http://wiki.openstreetmap.org/wiki/key:protection_title"><code>protection_title</code></a> value with
* blanks replaced by <code>_</code>. <code>national_park</code> is the class of
* <code>protection_title=National Park</code> and <code>boundary=national_park</code>.
* <code>nature_reserve</code> is the class of <code>protection_title=Nature Reserve</code> and
* <code>leisure=nature_reserve</code>. The class for other
* <a href="http://wiki.openstreetmap.org/wiki/key:protection_title"><code>protection_title</code></a> values is
* similarly assigned. The class for <code>boundary=aboriginal_lands</code> is <code>aboriginal_lands</code>.
*/
public static final String CLASS = "class";
/**
* The OSM <a href="http://wiki.openstreetmap.org/wiki/Key:name"><code>name</code></a> value of the park (point
* features only).
*/
public static final String NAME = "name";
/** English name <code>name:en</code> if available, otherwise <code>name</code> (point features only). */
public static final String NAME_EN = "name_en";
/**
* German name <code>name:de</code> if available, otherwise <code>name</code> or <code>name:en</code> (point
* features only).
*/
public static final String NAME_DE = "name_de";
/** Rank of the park within one tile, starting at 1 that is the most important park (point features only). */
public static final String RANK = "rank";
}
/** Attribute values for map elements in the park layer. */
final class FieldValues {
}
/** Complex mappings to generate attribute values from OSM element tags in the park layer. */
final class FieldMappings {
}
}
/**
* Contains administrative boundaries as linestrings. Until z4
* <a href="http://www.naturalearthdata.com/downloads/">Natural Earth data</a> is used after which OSM boundaries
* (<a href=
* "http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative"><code>boundary=administrative</code></a>) are
* present from z5 to z14 (also for maritime boundaries with <code>admin_level <= 2</code> at z4). OSM data
* 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>.
*
* Generated from
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/boundary/boundary.yaml">boundary.yaml</a>
*/
public interface Boundary extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "boundary";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the boundary layer. */
final class Fields {
/**
* OSM <a href="http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level">admin_level</a>
* indicating the level of importance of this boundary. The <code>admin_level</code> corresponds to the lowest
* <code>admin_level</code> the line participates in. At low zoom levels the Natural Earth boundaries are mapped
* to the equivalent admin levels.
*/
public static final String ADMIN_LEVEL = "admin_level";
/** State name on the left of the border. For country boundaries only (<code>admin_level = 2</code>). */
public static final String ADM0_L = "adm0_l";
/** State name on the right of the border. For country boundaries only (<code>admin_level = 2</code>). */
public static final String ADM0_R = "adm0_r";
/**
* Mark with <code>1</code> if the border is disputed.
* <p>
* allowed values:
* <ul>
* <li>0
* <li>1
* </ul>
*/
public static final String DISPUTED = "disputed";
/**
* Field containing name of the disputed area (extracted from border relation in OSM, without spaces). For country
* boundaries only (<code>admin_level = 2</code>). Value examples from Asian OSM pbf extract
* <p>
* allowed values:
* <ul>
* <li>"AbuMusaIsland"
* <li>"BaraHotiiValleys"
* <li>"ChineseClaim"
* <li>"Crimea"
* <li>"Demchok"
* <li>"Dokdo"
* <li>"IndianClaim-North"
* <li>"IndianClaimwesternKashmir"
* <li>"PakistaniClaim"
* <li>"SamduValleys"
* <li>"TirpaniValleys"
* </ul>
*/
public static final String DISPUTED_NAME = "disputed_name";
/**
* ISO2 code of country, which wants to see the boundary line. For country boundaries only
* (<code>admin_level = 2</code>).
*/
public static final String CLAIMED_BY = "claimed_by";
/**
* Mark with <code>1</code> if it is a maritime border.
* <p>
* allowed values:
* <ul>
* <li>0
* <li>1
* </ul>
*/
public static final String MARITIME = "maritime";
}
/** Attribute values for map elements in the boundary layer. */
final class FieldValues {
public static final String DISPUTED_NAME_ABUMUSAISLAND = "AbuMusaIsland";
public static final String DISPUTED_NAME_BARAHOTIIVALLEYS = "BaraHotiiValleys";
public static final String DISPUTED_NAME_CHINESECLAIM = "ChineseClaim";
public static final String DISPUTED_NAME_CRIMEA = "Crimea";
public static final String DISPUTED_NAME_DEMCHOK = "Demchok";
public static final String DISPUTED_NAME_DOKDO = "Dokdo";
public static final String DISPUTED_NAME_INDIANCLAIM_NORTH = "IndianClaim-North";
public static final String DISPUTED_NAME_INDIANCLAIMWESTERNKASHMIR = "IndianClaimwesternKashmir";
public static final String DISPUTED_NAME_PAKISTANICLAIM = "PakistaniClaim";
public static final String DISPUTED_NAME_SAMDUVALLEYS = "SamduValleys";
public static final String DISPUTED_NAME_TIRPANIVALLEYS = "TirpaniValleys";
public static final Set<String> DISPUTED_NAME_VALUES =
Set.of("AbuMusaIsland", "BaraHotiiValleys", "ChineseClaim", "Crimea", "Demchok", "Dokdo", "IndianClaim-North",
"IndianClaimwesternKashmir", "PakistaniClaim", "SamduValleys", "TirpaniValleys");
}
/** Complex mappings to generate attribute values from OSM element tags in the boundary layer. */
final class FieldMappings {
}
}
/**
* Aeroway polygons based of OpenStreetMap <a href="http://wiki.openstreetmap.org/wiki/Aeroways">aeroways</a>. Airport
* buildings are contained in the <strong>building</strong> layer but all other airport related polygons can be found
* in the <strong>aeroway</strong> layer.
*
* Generated from
* <a href="https://github.com/openmaptiles/openmaptiles/blob/master/layers/aeroway/aeroway.yaml">aeroway.yaml</a>
*/
public interface Aeroway extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "aeroway";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the aeroway layer. */
final class Fields {
/**
* The OSM <a href="http://wiki.openstreetmap.org/wiki/Key:ref"><code>ref</code></a> tag of the runway/taxiway.
*/
public static final String REF = "ref";
/**
* The original value of <a href="http://wiki.openstreetmap.org/wiki/Key:aeroway"><code>aeroway</code></a> or
* <code>area:aeroway</code> tag.
* <p>
* allowed values:
* <ul>
* <li>"aerodrome"
* <li>"heliport"
* <li>"runway"
* <li>"helipad"
* <li>"taxiway"
* <li>"apron"
* <li>"gate"
* </ul>
*/
public static final String CLASS = "class";
}
/** Attribute values for map elements in the aeroway layer. */
final class FieldValues {
public static final String CLASS_AERODROME = "aerodrome";
public static final String CLASS_HELIPORT = "heliport";
public static final String CLASS_RUNWAY = "runway";
public static final String CLASS_HELIPAD = "helipad";
public static final String CLASS_TAXIWAY = "taxiway";
public static final String CLASS_APRON = "apron";
public static final String CLASS_GATE = "gate";
public static final Set<String> CLASS_VALUES =
Set.of("aerodrome", "heliport", "runway", "helipad", "taxiway", "apron", "gate");
}
/** Complex mappings to generate attribute values from OSM element tags in the aeroway layer. */
final class FieldMappings {
}
}
/**
* <strong>transportation</strong> contains roads, railways, aerial ways, and shipping lines. This layer is directly
* derived from the OSM road hierarchy. At lower zoom levels major highways from Natural Earth are used. It contains
* all roads from motorways to primary, secondary and tertiary roads to residential roads and foot paths. Styling the
* roads is the most essential part of the map. The <code>transportation</code> layer also contains polygons for
* features like plazas.
*
* Generated from <a href=
* "https://github.com/openmaptiles/openmaptiles/blob/master/layers/transportation/transportation.yaml">transportation.yaml</a>
*/
public interface Transportation extends Layer {
double BUFFER_SIZE = 4.0;
String LAYER_NAME = "transportation";
@Override
default String name() {
return LAYER_NAME;
}
/** Attribute names for map elements in the transportation layer. */
final class Fields {
/**
* Distinguish between more and less important roads or railways and roads under construction. Class is derived
* from the value of the <a href="http://wiki.openstreetmap.org/wiki/Key:highway"><code>highway</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:construction"><code>construction</code></a>,
* <a 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),
* <a href="https://wiki.openstreetmap.org/wiki/Key:busway"><code>busway</code></a>, or
* <a href="http://wiki.openstreetmap.org/wiki/Key:man_made"><code>man_made</code></a>.
* <p>
* allowed values:
* <ul>
* <li>motorway
* <li>trunk
* <li>primary
* <li>secondary
* <li>tertiary
* <li>minor
* <li>path
* <li>service
* <li>track
* <li>raceway
* <li>busway
* <li>bus_guideway
* <li>ferry
* <li>motorway_construction
* <li>trunk_construction
* <li>primary_construction
* <li>secondary_construction
* <li>tertiary_construction
* <li>minor_construction
* <li>path_construction
* <li>service_construction
* <li>track_construction
* <li>raceway_construction
* </ul>
*/
public static final String CLASS = "class";
/**
* Distinguish more specific classes of railway and path: Subclass is value of the
* <a href="http://wiki.openstreetmap.org/wiki/Key:railway"><code>railway</code></a>,
* <a href="http://wiki.openstreetmap.org/wiki/Key:highway"><code>highway</code></a> (for paths), or
* <a href="http://wiki.openstreetmap.org/wiki/Key:public_transport"><code>public_transport</code></a> (for
* platforms) tag.
* <p>
* allowed values:
* <ul>
* <li>"rail"
* <li>"narrow_gauge"
* <li>"preserved"
* <li>"funicular"
* <li>"subway"
* <li>"light_rail"
* <li>"monorail"
* <li>"tram"
* <li>"pedestrian"
* <li>"path"
* <li>"footway"
* <li>"cycleway"
* <li>"steps"
* <li>"bridleway"
* <li>"corridor"
* <li>"platform"
* <li>"ferry (DEPRECATED - use class)"
* </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>,
* <a href="http://wiki.openstreetmap.org/wiki/United_Kingdom_Tagging_Guidelines#UK_roads"><code>gb- </code></a>,
* or <a href="http://wiki.openstreetmap.org/wiki/Ireland/Roads"><code>ie- </code></a>.
*/
public static final String NETWORK = "network";
/**
* Mark whether way is a tunnel or bridge.
* <p>
* allowed values:
* <ul>
* <li>"bridge"
* <li>"tunnel"
* <li>"ford"
* </ul>
*/
public static final String BRUNNEL = "brunnel";
/**
* Mark with <code>1</code> whether way is a oneway in the direction of the way, with <code>-1</code> whether way
* is a oneway in the opposite direction of the way or not a oneway with <code>0</code>.
* <p>
* allowed values:
* <ul>
* <li>1
* <li>-1
* </ul>
*/
public static final String ONEWAY = "oneway";
/**
* Mark with <code>1</code> whether way is a ramp (link or steps) or not with <code>0</code>.
* <p>
* allowed values:
* <ul>
* <li>1
* </ul>
*/
public static final String RAMP = "ramp";
/**
* Original value of the <a href="http://wiki.openstreetmap.org/wiki/Key:service"><code>service</code></a> tag.
* <p>
* allowed values:
* <ul>
* <li>"spur"
* <li>"yard"
* <li>"siding"
* <li>"crossover"
* <li>"driveway"
* <li>"alley"
* <li>"parking_aisle"
* </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";