Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java code regenerated from latest OMT YML #120

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0bb61f7
version bumped from 3.14.0 to 3.15.0-SNAPSHOT
phanecak-maptiler Jul 5, 2023
d32501e
regenerate-openmaptiles.sh 07f243c5d9efa558fa539d7a31b2ae50507aaa9d (…
phanecak-maptiler Jul 5, 2023
862e50a
SQL -> Java re-implementation of OMT PR 1457
phanecak-maptiler Jul 6, 2023
8998ddd
version bumped from 3.14.0 to 3.15.0-SNAPSHOT
phanecak-maptiler Jul 5, 2023
14c204d
WaterName.areaToMinZoom(): improved handling of rounding and precissi…
phanecak-maptiler Jul 7, 2023
fcfe115
mvn spotless:apply
phanecak-maptiler Jul 7, 2023
91b1842
water label min. zoom calculation simplified
phanecak-maptiler Jul 9, 2023
05b91a7
comment adjusted to be hopefully more useful
phanecak-maptiler Jul 9, 2023
096b1a4
mvn spotless:apply
phanecak-maptiler Jul 10, 2023
fda198f
minzoom for CA_TRANSCANADA and US_INTERSTATE trunk now 4 (to match OM…
phanecak-maptiler Jul 10, 2023
74f655b
minzoom for some other Canada trunks now 4 (to match OMT PR 1446)
phanecak-maptiler Jul 10, 2023
cf92b5e
equals() simplified + clean-up of comments
phanecak-maptiler Jul 10, 2023
be4ac2d
Merge pull request #3 from phanecak-maptiler/zlw-water-area-size
phanecak-maptiler Jul 11, 2023
32c59d1
regenerate-openmaptiles.sh 5f7b2c11b3224759a21133381ca7d959a1f3cf51 (…
phanecak-maptiler Jul 14, 2023
4e3f0fd
GB road relations processing adjusted to match OMT PR 1465, e.g. hand…
phanecak-maptiler Jul 14, 2023
da044ca
regenerate-openmaptiles.sh edb42f2db3c2b0ec37045367720eed84d7bbd71f (…
phanecak-maptiler Jul 14, 2023
436e3b3
IE road relations processing adjusted to match OMT PR 1466, e.g. hand…
phanecak-maptiler Jul 14, 2023
6354264
fixed handling of networkType for secondary GB routes
phanecak-maptiler Jul 14, 2023
984b7f2
clean-up: case statements simplified
phanecak-maptiler Jul 14, 2023
4702e31
Merge branch 'omt3_15-gb_primary_secondary' into omt3_15-routes_of_ir…
phanecak-maptiler Jul 14, 2023
1e1b896
mvn spotless:apply
phanecak-maptiler Jul 14, 2023
8750c78
clazz calculation moved up so that minzoom can be set to 3 for only l…
phanecak-maptiler Jul 14, 2023
7418117
unit tests adjusted + extended to cover 'minzoom=3 fore lakes' change
phanecak-maptiler Jul 14, 2023
bfce42e
fixed minor typo from previous PR
phanecak-maptiler Jul 17, 2023
65f672f
Merge pull request #4 from phanecak-maptiler/omt3_15-trans_canada
phanecak-maptiler Jul 17, 2023
213dd14
render POIs for large universities at low zoom (to match OMT PR 1479)
phanecak-maptiler Jul 17, 2023
77e6aea
Merge pull request #5 from phanecak-maptiler/omt3_15-gb_primary_secon…
phanecak-maptiler Jul 18, 2023
1fa4181
Merge pull request #6 from phanecak-maptiler/omt3_15-routes_of_ireland
phanecak-maptiler Jul 18, 2023
03f2b04
clean-up, to make the diff/PR smaller
phanecak-maptiler Jul 18, 2023
7a718e6
Merge pull request #7 from phanecak-maptiler/omt3_15-big_lake_lake_lines
phanecak-maptiler Jul 19, 2023
a93cc9e
Merge pull request #8 from phanecak-maptiler/large_uni_poi_zoom
phanecak-maptiler Jul 19, 2023
17604dc
Merge branch 'upstream-main' into omt_3_15_0
phanecak-maptiler Aug 4, 2023
f06187a
Merge branch 'upstream-main' into omt_3_15_0
phanecak-maptiler Sep 6, 2023
5b6a46c
Merge branch 'upstream-main' into omt_3_15_0
phanecak-maptiler Sep 13, 2023
e46c44c
regenerate-openmaptiles.sh 5e9b7c475d53a5bd5ea394da361594d3f4ce2d66 (…
phanecak-maptiler Sep 25, 2023
258db80
handle 'grade1' and 'tracktype' as per OMT PR 1485
phanecak-maptiler Sep 25, 2023
62814fe
Merge pull request #9 from phanecak-maptiler/omt3_15-set_paved_attrib…
phanecak-maptiler Sep 26, 2023
d3429c4
added implementation of agg_stop
phanecak-maptiler Sep 26, 2023
7f96e66
Merge branch 'upstream-main' into omt_3_15_0
phanecak-maptiler Sep 26, 2023
137a89a
Merge branch 'omt_3_15_0' into omt3_15-agg_stop_fix
phanecak-maptiler Sep 26, 2023
0672adf
Merge pull request #10 from phanecak-maptiler/omt3_15-agg_stop_fix
phanecak-maptiler Sep 28, 2023
b597ecf
regenerate-openmaptiles.sh master, to match several OMT PRs which adj…
phanecak-maptiler Oct 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>org.openmaptiles</groupId>
<artifactId>planetiler-openmaptiles</artifactId>
<version>3.14.0</version>
<version>3.15.0-SNAPSHOT</version>

<name>OpenMapTiles Vector Tile Schema implementation for Planetiler tool</name>

Expand Down
131 changes: 84 additions & 47 deletions src/main/java/org/openmaptiles/generated/OpenMapTilesSchema.java

Large diffs are not rendered by default.

117 changes: 72 additions & 45 deletions src/main/java/org/openmaptiles/generated/Tables.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

/**
* 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
* in the <a href="https://github.com/openmaptiles/openmaptiles/blob/master/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
Expand Down Expand Up @@ -94,21 +94,23 @@ public record RowHandlerAndClass<T extends Row> (
) {}
/** 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 {
@Override String place, @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, WithPlace, 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);
source.getString("place"), 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")),
matchAny("natural", "water", "bay", "spring"), matchAny("waterway", "dock"),
matchAny("water", "river", "stream", "canal", "ditch", "drain", "pond", "basin", "wastewater")),
not(matchAny("covered", "yes")), matchType("polygon"));

/**
Expand Down Expand Up @@ -246,9 +248,8 @@ public OsmParkPolygon(SourceFeature source, String mappingKey) {
}

/** 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"));
public static final Expression MAPPING = and(or(matchAny("leisure", "nature_reserve"),
matchAny("boundary", "national_park", "protected_area", "aboriginal_lands")), matchType("polygon"));

/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
Expand Down Expand Up @@ -316,25 +317,27 @@ public interface Handler {
}
}
/** 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,
public record OsmHighwayLinestring(@Override String highway, @Override String construction,
@Override String tracktype, @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, WithTracktype, 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"),
this(source.getString("highway"), source.getString("construction"), source.getString("tracktype"),
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);
Expand Down Expand Up @@ -521,16 +524,19 @@ public interface Handler {
}
/** 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 {
@Override String place, @Override String natural, @Override long rank, @Override boolean isIntermittent,
@Override SourceFeature source)
implements Row, WithName, WithNameEn, WithNameDe, WithPlace, WithNatural, 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);
source.getString("place"), source.getString("natural"), 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"));
and(or(matchAny("place", "ocean", "sea"), matchAny("natural", "bay", "strait")), matchField("name"),
matchType("point"));

/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
Expand Down Expand Up @@ -656,9 +662,8 @@ public OsmCityPoint(SourceFeature source, String mappingKey) {
}

/** 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"));
public static final Expression MAPPING = and(matchAny("place", "city", "town", "village", "hamlet", "borough",
"suburb", "quarter", "neighbourhood", "isolated_dwelling"), matchField("name"), matchType("point"));

/**
* Interface for layer implementations to extend to subscribe to OSM elements filtered and parsed as
Expand All @@ -669,10 +674,12 @@ public interface Handler {
}
}
/** 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 record OsmHousenumberPoint(@Override String housenumber, @Override String street, @Override String blockNumber,
@Override String hasName, @Override SourceFeature source)
implements Row, WithHousenumber, WithStreet, WithBlockNumber, WithHasName, WithSource {
public OsmHousenumberPoint(SourceFeature source, String mappingKey) {
this(source.getString("addr:housenumber"), source);
this(source.getString("addr:housenumber"), source.getString("addr:street"), source.getString("addr:block_number"),
source.getString("name"), source);
}

/** Imposm3 "mapping" to filter OSM elements that should appear in this "table". */
Expand Down Expand Up @@ -731,9 +738,9 @@ public OsmPoiPoint(SourceFeature source, String mappingKey) {
"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"),
"newsagent", "optician", "outdoor", "paint", "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",
Expand Down Expand Up @@ -801,9 +808,9 @@ public OsmPoiPolygon(SourceFeature source, String mappingKey) {
"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"),
"newsagent", "optician", "outdoor", "paint", "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",
Expand Down Expand Up @@ -885,6 +892,11 @@ public interface WithBicycle {
String bicycle();
}

/** Rows with a String blockNumber attribute. */
public interface WithBlockNumber {
String blockNumber();
}

/** Rows with a String boundary attribute. */
public interface WithBoundary {
String boundary();
Expand Down Expand Up @@ -965,6 +977,11 @@ public interface WithFunicular {
String funicular();
}

/** Rows with a String hasName attribute. */
public interface WithHasName {
String hasName();
}

/** Rows with a String height attribute. */
public interface WithHeight {
String height();
Expand Down Expand Up @@ -1225,6 +1242,11 @@ public interface WithStation {
String station();
}

/** Rows with a String street attribute. */
public interface WithStreet {
String street();
}

/** Rows with a String subclass attribute. */
public interface WithSubclass {
String subclass();
Expand All @@ -1245,6 +1267,11 @@ public interface WithTourism {
String tourism();
}

/** Rows with a String tracktype attribute. */
public interface WithTracktype {
String tracktype();
}

/** Rows with a String uicRef attribute. */
public interface WithUicRef {
String uicRef();
Expand Down
Loading
Loading