forked from openmaptiles/planetiler-openmaptiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tables.java
1455 lines (1294 loc) · 72.7 KB
/
Tables.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.FeatureCollector;
import com.onthegomap.planetiler.expression.Expression;
import com.onthegomap.planetiler.expression.MultiExpression;
import com.onthegomap.planetiler.reader.SourceFeature;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
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.14/openmaptiles.yaml">OpenMapTiles vector tile
* schema</a>.
*
* These filter and parse the raw OSM key/value attribute pairs on tags into records with fields that match the columns
* in the tables that imposm3 would generate. Layer implementations can "subscribe" to elements from each "table" but
* implementing the table's {@code Handler} interface and use the element's typed API to access attributes.
*/
@SuppressWarnings("unused")
public class Tables {
/** A parsed OSM element that would appear in a "row" of the imposm3 table. */
public interface Row {
/** Returns the original OSM element. */
SourceFeature source();
}
/** A functional interface that the constructor of a new table row can be coerced to. */
@FunctionalInterface
public interface Constructor {
Row create(SourceFeature source, String mappingKey);
}
/** The {@code rowClass} of an imposm3 table row and its constructor coerced to a {@link Constructor}. */
public record RowClassAndConstructor(
Class<? extends Row> rowClass,
Constructor create
) {}
/** A functional interface that the typed handler method that a layer implementation can be coerced to. */
@FunctionalInterface
public interface RowHandler<T extends Row> {
/** Process a typed element according to the profile. */
void process(T element, FeatureCollector features);
}
/** The {@code handlerClass} of a layer handler and it's {@code process} method coerced to a {@link RowHandler}. */
public record RowHandlerAndClass<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 record OsmWaterPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String natural, @Override String landuse, @Override String waterway, @Override String leisure,
@Override String water, @Override boolean isIntermittent, @Override boolean isTunnel, @Override boolean isBridge,
@Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithNatural, WithLanduse,
WithWaterway, WithLeisure, 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.getString("leisure"), 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", "spring"), matchAny("waterway", "dock"), matchAny("water", "river")),
not(matchAny("covered", "yes")), matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmWaterPolygon}.
*/
public interface Handler {
void process(OsmWaterPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_waterway_linestring} table generated by imposm3. */
public record OsmWaterwayLinestring(@Override String waterway, @Override String name, @Override String nameEn,
@Override String nameDe, @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isIntermittent,
@Override SourceFeature source) implements Row, WithWaterway, WithName, WithNameEn, WithNameDe, WithIsTunnel,
WithIsBridge, WithIsIntermittent, WithSource {
public OsmWaterwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("waterway"), source.getString("name"), source.getString("name:en"),
source.getString("name:de"), source.getBoolean("tunnel"), source.getBoolean("bridge"),
source.getBoolean("intermittent"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING =
and(matchAny("waterway", "stream", "river", "canal", "drain", "ditch"), matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmWaterwayLinestring}.
*/
public interface Handler {
void process(OsmWaterwayLinestring element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_landcover_polygon} table generated by imposm3. */
public record OsmLandcoverPolygon(@Override String subclass, @Override String mappingKey,
@Override SourceFeature source) implements Row, WithSubclass, WithMappingKey, WithSource {
public OsmLandcoverPolygon(SourceFeature source, String mappingKey) {
this(source.getString(mappingKey), mappingKey, source);
}
/** 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("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",
"reedbed", "saltern", "tidalflat", "saltmarsh", "mangrove")),
matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmLandcoverPolygon}.
*/
public interface Handler {
void process(OsmLandcoverPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_landuse_polygon} table generated by imposm3. */
public record OsmLandusePolygon(@Override String landuse, @Override String amenity, @Override String leisure,
@Override String tourism, @Override String place, @Override String waterway, @Override SourceFeature source)
implements Row, WithLanduse, WithAmenity, WithLeisure, WithTourism, WithPlace, WithWaterway, WithSource {
public OsmLandusePolygon(SourceFeature source, String mappingKey) {
this(source.getString("landuse"), source.getString("amenity"), source.getString("leisure"),
source.getString("tourism"), source.getString("place"), source.getString("waterway"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(or(
matchAny("landuse", "railway", "cemetery", "military", "quarry", "residential", "commercial", "industrial",
"garages", "retail"),
matchAny("amenity", "bus_station", "school", "university", "kindergarten", "college", "library", "hospital",
"grave_yard"),
matchAny("leisure", "stadium", "pitch", "playground", "track"), matchAny("tourism", "theme_park", "zoo"),
matchAny("place", "suburb", "quarter", "neighbourhood"), matchAny("waterway", "dam")), matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmLandusePolygon}.
*/
public interface Handler {
void process(OsmLandusePolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_peak_point} table generated by imposm3. */
public record OsmPeakPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String ele, @Override String wikipedia, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithEle, WithWikipedia, WithSource {
public OsmPeakPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getString("ele"),
source.getString("wikipedia"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("natural", "peak", "volcano", "saddle"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmPeakPoint}.
*/
public interface Handler {
void process(OsmPeakPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_mountain_linestring} table generated by imposm3. */
public record OsmMountainLinestring(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String wikipedia, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithWikipedia, WithSource {
public 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 record OsmParkPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String landuse, @Override String leisure, @Override String boundary, @Override String protectionTitle,
@Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithLanduse, WithLeisure,
WithBoundary, WithProtectionTitle, WithSource {
public OsmParkPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("landuse"), source.getString("leisure"), source.getString("boundary"),
source.getString("protection_title"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING =
and(or(matchAny("leisure", "nature_reserve"), matchAny("boundary", "national_park", "protected_area")),
matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmParkPolygon}.
*/
public interface Handler {
void process(OsmParkPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_aeroway_polygon} table generated by imposm3. */
public record OsmAerowayPolygon(@Override String ref, @Override String aeroway, @Override SourceFeature source)
implements Row, WithRef, WithAeroway, WithSource {
public OsmAerowayPolygon(SourceFeature source, String mappingKey) {
this(source.getString("ref"), source.getString(mappingKey), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(
or(matchAny("aeroway", "aerodrome", "heliport", "runway", "helipad", "taxiway", "apron"),
matchAny("area:aeroway", "aerodrome", "heliport", "runway", "helipad", "taxiway", "apron")),
matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmAerowayPolygon}.
*/
public interface Handler {
void process(OsmAerowayPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_aeroway_linestring} table generated by imposm3. */
public record OsmAerowayLinestring(@Override String ref, @Override String aeroway, @Override SourceFeature source)
implements Row, WithRef, WithAeroway, WithSource {
public OsmAerowayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("ref"), source.getString("aeroway"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("aeroway", "runway", "taxiway"), matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmAerowayLinestring}.
*/
public interface Handler {
void process(OsmAerowayLinestring element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_aeroway_point} table generated by imposm3. */
public record OsmAerowayPoint(@Override String ref, @Override String aeroway, @Override SourceFeature source)
implements Row, WithRef, WithAeroway, WithSource {
public OsmAerowayPoint(SourceFeature source, String mappingKey) {
this(source.getString("ref"), source.getString("aeroway"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("aeroway", "gate"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmAerowayPoint}.
*/
public interface Handler {
void process(OsmAerowayPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_highway_linestring} table generated by imposm3. */
public record OsmHighwayLinestring(@Override String highway, @Override String construction, @Override String ref,
@Override String network, @Override int zOrder, @Override long layer, @Override long level,
@Override boolean indoor, @Override String name, @Override String nameEn, @Override String nameDe,
@Override String shortName, @Override boolean isTunnel, @Override boolean isBridge, @Override boolean isRamp,
@Override boolean isFord, @Override int isOneway, @Override boolean isArea, @Override String service,
@Override String access, @Override boolean toll, @Override String usage, @Override String publicTransport,
@Override String manMade, @Override String bicycle, @Override String foot, @Override String horse,
@Override String mtbScale, @Override String sacScale, @Override String surface, @Override boolean expressway,
@Override SourceFeature source) implements Row, WithHighway, WithConstruction, WithRef, WithNetwork, WithZOrder,
WithLayer, WithLevel, WithIndoor, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel, WithIsBridge,
WithIsRamp, WithIsFord, WithIsOneway, WithIsArea, WithService, WithAccess, WithToll, WithUsage, WithPublicTransport,
WithManMade, WithBicycle, WithFoot, WithHorse, WithMtbScale, WithSacScale, WithSurface, WithExpressway, WithSource {
public OsmHighwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("highway"), source.getString("construction"), source.getString("ref"),
source.getString("network"), source.getWayZorder(), source.getLong("layer"), source.getLong("level"),
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("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",
"busway", "bus_guideway", "construction"),
matchAny("public_transport", "platform"), matchAny("man_made", "pier"),
matchAny("service", "driveway", "parking_aisle")), matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmHighwayLinestring}.
*/
public interface Handler {
void process(OsmHighwayLinestring element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_railway_linestring} table generated by imposm3. */
public record OsmRailwayLinestring(@Override String railway, @Override String ref, @Override String network,
@Override int zOrder, @Override long layer, @Override long level, @Override boolean indoor, @Override String name,
@Override String nameEn, @Override String nameDe, @Override String shortName, @Override boolean isTunnel,
@Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord, @Override int isOneway,
@Override boolean isArea, @Override String service, @Override String usage, @Override SourceFeature source)
implements Row, WithRailway, WithRef, WithNetwork, WithZOrder, WithLayer, WithLevel, WithIndoor, WithName,
WithNameEn, WithNameDe, WithShortName, WithIsTunnel, WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway, WithIsArea,
WithService, WithUsage, WithSource {
public OsmRailwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("railway"), source.getString("ref"), source.getString("network"), source.getWayZorder(),
source.getLong("layer"), source.getLong("level"), source.getBoolean("indoor"), source.getString("name"),
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);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(
matchAny("railway", "rail", "narrow_gauge", "preserved", "funicular", "subway", "light_rail", "monorail", "tram"),
matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmRailwayLinestring}.
*/
public interface Handler {
void process(OsmRailwayLinestring element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_aerialway_linestring} table generated by imposm3. */
public record OsmAerialwayLinestring(@Override String aerialway, @Override int zOrder, @Override long layer,
@Override String name, @Override String nameEn, @Override String nameDe, @Override String shortName,
@Override boolean isTunnel, @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord,
@Override int isOneway, @Override boolean isArea, @Override String service, @Override String usage,
@Override SourceFeature source)
implements Row, WithAerialway, WithZOrder, WithLayer, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel,
WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway, WithIsArea, WithService, WithUsage, WithSource {
public OsmAerialwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("aerialway"), source.getWayZorder(), source.getLong("layer"), source.getString("name"),
source.getString("name:en"), source.getString("name:de"), source.getString("short_name"),
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);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("aerialway", "chair_lift", "drag_lift", "platter", "t-bar",
"gondola", "cable_car", "j-bar", "mixed_lift"), matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmAerialwayLinestring}.
*/
public interface Handler {
void process(OsmAerialwayLinestring element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_shipway_linestring} table generated by imposm3. */
public record OsmShipwayLinestring(@Override String shipway, @Override int zOrder, @Override long layer,
@Override String name, @Override String nameEn, @Override String nameDe, @Override String shortName,
@Override boolean isTunnel, @Override boolean isBridge, @Override boolean isRamp, @Override boolean isFord,
@Override int isOneway, @Override boolean isArea, @Override String service, @Override String usage,
@Override SourceFeature source)
implements Row, WithShipway, WithZOrder, WithLayer, WithName, WithNameEn, WithNameDe, WithShortName, WithIsTunnel,
WithIsBridge, WithIsRamp, WithIsFord, WithIsOneway, WithIsArea, WithService, WithUsage, WithSource {
public OsmShipwayLinestring(SourceFeature source, String mappingKey) {
this(source.getString("route"), source.getWayZorder(), source.getLong("layer"), source.getString("name"),
source.getString("name:en"), source.getString("name:de"), source.getString("short_name"),
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);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("route", "ferry"), matchType("linestring"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmShipwayLinestring}.
*/
public interface Handler {
void process(OsmShipwayLinestring element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_highway_polygon} table generated by imposm3. */
public record OsmHighwayPolygon(@Override String highway, @Override int zOrder, @Override long layer,
@Override long level, @Override boolean indoor, @Override boolean isArea, @Override String publicTransport,
@Override String manMade, @Override String service, @Override SourceFeature source)
implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithIndoor, WithIsArea, WithPublicTransport,
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.getString("service"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING =
and(or(matchAny("highway", "path", "cycleway", "bridleway", "footway", "corridor", "pedestrian", "steps"),
matchAny("public_transport", "platform"), matchAny("man_made", "bridge", "pier")), matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmHighwayPolygon}.
*/
public interface Handler {
void process(OsmHighwayPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_highway_point} table generated by imposm3. */
public record OsmHighwayPoint(@Override String highway, @Override int zOrder, @Override long layer,
@Override long level, @Override String name, @Override String nameEn, @Override String nameDe, @Override String ref,
@Override SourceFeature source) implements Row, WithHighway, WithZOrder, WithLayer, WithLevel, WithName, WithNameEn,
WithNameDe, WithRef, WithSource {
public 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 record OsmBuildingPolygon(@Override String material, @Override String colour, @Override String building,
@Override String buildingpart, @Override String buildingheight, @Override String buildingminHeight,
@Override String buildinglevels, @Override String buildingminLevel, @Override String height,
@Override String minHeight, @Override String levels, @Override String minLevel, @Override SourceFeature source)
implements Row, WithMaterial, WithColour, WithBuilding, WithBuildingpart, WithBuildingheight, WithBuildingminHeight,
WithBuildinglevels, WithBuildingminLevel, WithHeight, WithMinHeight, WithLevels, WithMinLevel, WithSource {
public OsmBuildingPolygon(SourceFeature source, String mappingKey) {
this(source.getString("building:material"), source.getString("building:colour"), source.getString("building"),
source.getString("building:part"), source.getString("building:height"), source.getString("building:min_height"),
source.getString("building:levels"), source.getString("building:min_level"), source.getString("height"),
source.getString("min_height"), source.getString("levels"), source.getString("min_level"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(
or(matchField("building:part"), matchField("building"), matchAny("aeroway", "terminal", "hangar"),
matchAny("location", "underground")),
not(matchAny("building", "no", "none", "No")), not(matchAny("building:part", "no", "none", "No")),
not(matchAny("man_made", "bridge")), not(matchAny("location", "underground")), matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmBuildingPolygon}.
*/
public interface Handler {
void process(OsmBuildingPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_marine_point} table generated by imposm3. */
public record OsmMarinePoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String place, @Override long rank, @Override boolean isIntermittent, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithRank, WithIsIntermittent, WithSource {
public OsmMarinePoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("place"), source.getLong("rank"), source.getBoolean("intermittent"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING =
and(matchAny("place", "ocean", "sea"), matchField("name"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmMarinePoint}.
*/
public interface Handler {
void process(OsmMarinePoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_continent_point} table generated by imposm3. */
public record OsmContinentPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithSource {
public OsmContinentPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING =
and(matchAny("place", "continent"), matchField("name"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmContinentPoint}.
*/
public interface Handler {
void process(OsmContinentPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_country_point} table generated by imposm3. */
public record OsmCountryPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override long rank, @Override String countryCodeIso31661Alpha2, @Override String iso31661Alpha2,
@Override String iso31661, @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe,
WithRank, WithCountryCodeIso31661Alpha2, WithIso31661Alpha2, WithIso31661, WithSource {
public OsmCountryPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getLong("rank"),
source.getString("country_code_iso3166_1_alpha_2"), source.getString("ISO3166-1:alpha2"),
source.getString("ISO3166-1"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("place", "country"), matchField("name"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmCountryPoint}.
*/
public interface Handler {
void process(OsmCountryPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_island_polygon} table generated by imposm3. */
public record OsmIslandPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
@Override long rank, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithSource {
public OsmIslandPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getLong("rank"),
source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("place", "island"), matchField("name"), matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmIslandPolygon}.
*/
public interface Handler {
void process(OsmIslandPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_island_point} table generated by imposm3. */
public record OsmIslandPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override long rank, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithRank, WithSource {
public OsmIslandPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"), source.getLong("rank"),
source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(matchAny("place", "island"), matchField("name"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmIslandPoint}.
*/
public interface Handler {
void process(OsmIslandPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_state_point} table generated by imposm3. */
public record OsmStatePoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String place, @Override String isInCountry, @Override String isInCountryCode, @Override String ref,
@Override long rank, @Override SourceFeature source) implements Row, WithName, WithNameEn, WithNameDe, WithPlace,
WithIsInCountry, WithIsInCountryCode, WithRef, WithRank, WithSource {
public OsmStatePoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("place"), source.getString("is_in:country"), source.getString("is_in:country_code"),
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", "province"), matchField("name"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmStatePoint}.
*/
public interface Handler {
void process(OsmStatePoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_city_point} table generated by imposm3. */
public record OsmCityPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String place, @Override long population, @Override String capital, @Override long rank,
@Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithPopulation, WithCapital, WithRank, WithSource {
public OsmCityPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("place"), source.getLong("population"), source.getString("capital"), source.getLong("rank"),
source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(
matchAny("place", "city", "town", "village", "hamlet", "suburb", "quarter", "neighbourhood", "isolated_dwelling"),
matchField("name"), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmCityPoint}.
*/
public interface Handler {
void process(OsmCityPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_housenumber_point} table generated by imposm3. */
public record OsmHousenumberPoint(@Override String housenumber, @Override SourceFeature source)
implements Row, WithHousenumber, WithSource {
public OsmHousenumberPoint(SourceFeature source, String mappingKey) {
this(source.getString("addr:housenumber"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = or(and(matchField("addr:housenumber"), matchType("point")),
and(matchField("addr:housenumber"), matchType("polygon")));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmHousenumberPoint}.
*/
public interface Handler {
void process(OsmHousenumberPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_poi_point} table generated by imposm3. */
public record OsmPoiPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String subclass, @Override String mappingKey, @Override String station, @Override String funicular,
@Override String information, @Override String uicRef, @Override String ref, @Override String religion,
@Override long level, @Override boolean indoor, @Override long layer, @Override String sport,
@Override String operator, @Override String network, @Override String brand, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithSubclass, WithMappingKey, WithStation, WithFunicular,
WithInformation, WithUicRef, WithRef, WithReligion, WithLevel, WithIndoor, WithLayer, WithSport, WithOperator,
WithNetwork, WithBrand, WithSource {
public OsmPoiPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString(mappingKey), mappingKey, source.getString("station"), source.getString("funicular"),
source.getString("information"), source.getString("uic_ref"), source.getString("ref"),
source.getString("religion"), source.getLong("level"), source.getBoolean("indoor"), source.getLong("layer"),
source.getString("sport"), source.getString("operator"), source.getString("network"), source.getString("brand"),
source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(or(matchAny("aerialway", "station"),
matchAny("amenity", "arts_centre", "atm", "bank", "bar", "bbq", "bicycle_parking", "bicycle_rental", "biergarten",
"bus_station", "cafe", "cinema", "clinic", "college", "community_centre", "courthouse", "dentist", "doctors",
"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", "parcel_locker", "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",
"toll_booth"),
matchAny("building", "dormitory"), matchAny("highway", "bus_stop"),
matchAny("historic", "monument", "castle", "ruins"),
matchAny("landuse", "basin", "brownfield", "cemetery", "reservoir", "winter_sports"),
matchAny("leisure", "dog_park", "escape_game", "garden", "golf_course", "ice_rink", "hackerspace", "marina",
"miniature_golf", "park", "pitch", "playground", "sports_centre", "stadium", "swimming_area", "swimming_pool",
"water_park"),
matchAny("office", "diplomatic"),
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", "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",
"disc_golf", "diving", "dog_racing", "equestrian", "fatsal", "field_hockey", "free_flying", "gaelic_games",
"golf", "gymnastics", "handball", "hockey", "horse_racing", "horseshoes", "ice_hockey", "ice_stock", "judo",
"karting", "korfball", "long_jump", "model_aerodrome", "motocross", "motor", "multi", "netball", "orienteering",
"paddle_tennis", "paintball", "paragliding", "pelota", "racquet", "rc_car", "rowing", "rugby", "rugby_league",
"rugby_union", "running", "sailing", "scuba_diving", "shooting", "shooting_range", "skateboard", "skating",
"skiing", "soccer", "surfing", "swimming", "table_soccer", "table_tennis", "team_handball", "tennis",
"toboggan", "volleyball", "water_ski", "yoga"),
matchAny("tourism", "alpine_hut", "aquarium", "artwork", "attraction", "bed_and_breakfast", "camp_site",
"caravan_site", "chalet", "gallery", "guest_house", "hostel", "hotel", "information", "motel", "museum",
"picnic_site", "theme_park", "viewpoint", "zoo"),
matchAny("waterway", "dock")), matchType("point"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmPoiPoint}.
*/
public interface Handler {
void process(OsmPoiPoint element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_poi_polygon} table generated by imposm3. */
public record OsmPoiPolygon(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String subclass, @Override String mappingKey, @Override String station, @Override String funicular,
@Override String information, @Override String uicRef, @Override String ref, @Override String religion,
@Override long level, @Override boolean indoor, @Override long layer, @Override String sport,
@Override String operator, @Override String network, @Override String brand, @Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithSubclass, WithMappingKey, WithStation, WithFunicular,
WithInformation, WithUicRef, WithRef, WithReligion, WithLevel, WithIndoor, WithLayer, WithSport, WithOperator,
WithNetwork, WithBrand, WithSource {
public OsmPoiPolygon(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString(mappingKey), mappingKey, source.getString("station"), source.getString("funicular"),
source.getString("information"), source.getString("uic_ref"), source.getString("ref"),
source.getString("religion"), source.getLong("level"), source.getBoolean("indoor"), source.getLong("layer"),
source.getString("sport"), source.getString("operator"), source.getString("network"), source.getString("brand"),
source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = and(or(matchAny("aerialway", "station"),
matchAny("amenity", "arts_centre", "atm", "bank", "bar", "bbq", "bicycle_parking", "bicycle_rental", "biergarten",
"bus_station", "cafe", "cinema", "clinic", "college", "community_centre", "courthouse", "dentist", "doctors",
"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", "parcel_locker", "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",
"toll_booth"),
matchAny("building", "dormitory"), matchAny("highway", "bus_stop"),
matchAny("historic", "monument", "castle", "ruins"),
matchAny("landuse", "basin", "brownfield", "cemetery", "reservoir", "winter_sports"),
matchAny("leisure", "dog_park", "escape_game", "garden", "golf_course", "ice_rink", "hackerspace", "marina",
"miniature_golf", "park", "pitch", "playground", "sports_centre", "stadium", "swimming_area", "swimming_pool",
"water_park"),
matchAny("office", "diplomatic"),
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", "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",
"disc_golf", "diving", "dog_racing", "equestrian", "fatsal", "field_hockey", "free_flying", "gaelic_games",
"golf", "gymnastics", "handball", "hockey", "horse_racing", "horseshoes", "ice_hockey", "ice_stock", "judo",
"karting", "korfball", "long_jump", "model_aerodrome", "motocross", "motor", "multi", "netball", "orienteering",
"paddle_tennis", "paintball", "paragliding", "pelota", "racquet", "rc_car", "rowing", "rugby", "rugby_league",
"rugby_union", "running", "sailing", "scuba_diving", "shooting", "shooting_range", "skateboard", "skating",
"skiing", "soccer", "surfing", "swimming", "table_soccer", "table_tennis", "team_handball", "tennis",
"toboggan", "volleyball", "water_ski", "yoga"),
matchAny("tourism", "alpine_hut", "aquarium", "artwork", "attraction", "bed_and_breakfast", "camp_site",
"caravan_site", "chalet", "gallery", "guest_house", "hostel", "hotel", "information", "motel", "museum",
"picnic_site", "theme_park", "viewpoint", "zoo"),
matchAny("waterway", "dock")), matchType("polygon"));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmPoiPolygon}.
*/
public interface Handler {
void process(OsmPoiPolygon element, FeatureCollector features);
}
}
/** An OSM element that would appear in the {@code osm_aerodrome_label_point} table generated by imposm3. */
public record OsmAerodromeLabelPoint(@Override String name, @Override String nameEn, @Override String nameDe,
@Override String aerodromeType, @Override String aerodrome, @Override String military, @Override String iata,
@Override String icao, @Override String ele, @Override SourceFeature source) implements Row, WithName, WithNameEn,
WithNameDe, WithAerodromeType, WithAerodrome, WithMilitary, WithIata, WithIcao, WithEle, WithSource {
public OsmAerodromeLabelPoint(SourceFeature source, String mappingKey) {
this(source.getString("name"), source.getString("name:en"), source.getString("name:de"),
source.getString("aerodrome:type"), source.getString("aerodrome"), source.getString("military"),
source.getString("iata"), source.getString("icao"), source.getString("ele"), source);
}
/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
public static final Expression MAPPING = or(and(matchAny("aeroway", "aerodrome"), matchType("point")),
and(matchAny("aeroway", "aerodrome"), matchType("polygon")));
/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
* {@link OsmAerodromeLabelPoint}.
*/
public interface Handler {
void process(OsmAerodromeLabelPoint element, FeatureCollector features);
}
}
/** Rows with a String access attribute. */
public interface WithAccess {
String access();
}
/** Rows with a String aerialway attribute. */
public interface WithAerialway {
String aerialway();
}
/** Rows with a String aerodrome attribute. */
public interface WithAerodrome {
String aerodrome();
}
/** Rows with a String aerodromeType attribute. */
public interface WithAerodromeType {
String aerodromeType();
}
/** Rows with a String aeroway attribute. */
public interface WithAeroway {
String aeroway();
}
/** Rows with a String amenity attribute. */
public interface WithAmenity {
String amenity();
}
/** Rows with a String bicycle attribute. */
public interface WithBicycle {
String bicycle();
}
/** Rows with a String boundary attribute. */
public interface WithBoundary {
String boundary();
}
/** Rows with a String brand attribute. */
public interface WithBrand {
String brand();
}
/** Rows with a String building attribute. */
public interface WithBuilding {
String building();
}
/** Rows with a String buildingheight attribute. */
public interface WithBuildingheight {
String buildingheight();
}
/** Rows with a String buildinglevels attribute. */
public interface WithBuildinglevels {
String buildinglevels();
}
/** Rows with a String buildingminHeight attribute. */
public interface WithBuildingminHeight {
String buildingminHeight();
}
/** Rows with a String buildingminLevel attribute. */
public interface WithBuildingminLevel {
String buildingminLevel();
}
/** Rows with a String buildingpart attribute. */
public interface WithBuildingpart {
String buildingpart();
}
/** Rows with a String capital attribute. */
public interface WithCapital {
String capital();
}
/** Rows with a String colour attribute. */
public interface WithColour {
String colour();
}
/** Rows with a String construction attribute. */
public interface WithConstruction {
String construction();
}
/** Rows with a String countryCodeIso31661Alpha2 attribute. */
public interface WithCountryCodeIso31661Alpha2 {
String countryCodeIso31661Alpha2();
}
/** Rows with a String ele attribute. */
public interface WithEle {
String ele();
}
/** Rows with a boolean expressway attribute. */
public interface WithExpressway {
boolean expressway();
}
/** Rows with a String foot attribute. */
public interface WithFoot {
String foot();
}
/** Rows with a String funicular attribute. */
public interface WithFunicular {
String funicular();
}
/** Rows with a String height attribute. */
public interface WithHeight {
String height();
}
/** Rows with a String highway attribute. */
public interface WithHighway {
String highway();
}
/** Rows with a String horse attribute. */
public interface WithHorse {
String horse();
}
/** Rows with a String housenumber attribute. */
public interface WithHousenumber {
String housenumber();
}
/** Rows with a String iata attribute. */
public interface WithIata {
String iata();
}
/** Rows with a String icao attribute. */
public interface WithIcao {
String icao();
}
/** Rows with a boolean indoor attribute. */
public interface WithIndoor {
boolean indoor();