Improved update performance of poi layer
- Refactored update_poi_point.sql to partial diff update
- Refactored IDs to be unique in poi_polygon.osm_ids
- Restricted updates to INSERT and UPDATE operations during poi_polygon.refresh
- Added analyze statements before update queries during poi_polygon.refresh
Improved update performance of place layer
- Refactored IDs to be unique in the following tables
- place_city.osm_ids
- place_continent_point.osm_ids
- place_country.osm_ids
- place_island_point.osm_ids
- place_island_polygon.osm_ids
- place_state.osm_ids
- Added analyze statements before update queries and restricted updates to INSERT and UPDATE operations during execution of the following functions
- place_city.refresh
- place_continent_point.refresh
- place_country.refresh
- place_island_point.refresh
- place_island_polygon.refresh
- place_state.refresh
Improved update performance of mountain_peak layer
- Refactored IDs to be unique in mountain_linestring.osm_ids and mountain_peak_point.osm_ids
- Restricted updates to INSERT and UPDATE operations during mountain_linestring.refresh and mountain_peak_point.refresh
- Added analyze statements before update queries during mountain_linestring.refresh and mountain_peak_point.refresh
Improved update performance of housenumber layer
- Refactored IDs to be unique in housenumber.osm_ids
- Restricted updates to INSERT and UPDATE operations during housenumber.refresh
- Added analyze statements before update queries during housenumber.refresh
Improved update performance of aerodrome_label layer
- Refactored IDs to be unique in aerodrome_label.osm_ids
- Restricted updates to INSERT and UPDATE operations during aerodrome_label.refresh
- Added analyze statements before update queries during aerodrome_label.refresh
See #1433 for more detailed discussion.
In some areas of the world, ship transportation is the main means of long-distance travel. For example, in Alaska, the [Alaska Marine Highway System](https://dot.alaska.gov/amhs/route.shtml) is the principal means of transportation through the Alaska Panhandle and down the Aleutian island chain. The AMHS carries the same importance that the Interstate Highway System has on land, and these ferry routes are exceptionally long distance.
This PR now removes bridge/tunnel/ford attributes from the `transportation` layer from sections of bridge/tunnel etc that are too small to be meaningfully visible at a particular zoom level. This allows those segments to be generalized into geometries along with the surrounding sections of road, thereby dropping lots of useless little pieces of geometry in lower-zoom tiles.
This PR changes the three-column unique index to an on-insert trigger. This should fix the issues we're having with CI failures and still achieve the behavior of coalescing duplicate routes.
I moved the concurrency_index calculation into an intermediate materialized view to separate the de-duplication capability from both DENSE_RANK() and from imposm updates.
This PR sets `surface=paved` for `highway=track` + `tracktype=grade1` if no other value of `surface` is set. Roads tagged in this way are [generally paved](https://wiki.openstreetmap.org/wiki/Key:tracktype) and therefore encoding them as a paved road is appropriate.
# Problem description
#1128 introduced route relation concurrency information in OpenMapTiles via the `route_X` attributes. The original implementation assumed that there would be a single route relation for each `network` and `ref` pair. However, it is increasingly common practice to tag a separate route relation for each direction of a route in order to provide awareness to routers and other data consumers of the directionality of a route. This standard and growing practice is described on the [OSM wiki page on route directions](https://wiki.openstreetmap.org/wiki/Route_directions). Thus, the naïve implementation of #1128 caused duplicate entries to be added as `route_X` attributes in the case where separate route relations were used for directional routes.
# Solution description
This PR adds grouping when computing route concurrency information, such that duplicate entries are coalesced in a predictable way. Since this grouping is done only within a route membership join of a single member way, the computational complexity should be trivial.
This PR adapts the code used in #1457 to allow POIs to render up to z10 for very large features. I set the threshold at a very conservative value of 10% of a tile. Thus, it will render if an area POI covers at least 10% of a tile at a given zoom. Only for 'university' and 'college'.
Additionally, this consolidates a double UNION ALL on the same table with a WHERE/CASE combination, which is simpler.
This PR adds eight missing languages, all of which are among the top 25 languages spoken in the United States, as discussed in ZeLonewolf/openstreetmap-americana#586, and have at least 10,000 `name:xx` usages in the database. Additionally, most of these languages are the primary or national language in the countries where they are most commonly spoken.
This PR introduces simple filtering of duplicate housenumbers.
Simple means that filtering is done withing the tile.
Duplicates are defined as same housenumber, street, block_number[1].
Duplicates are usually caused by POIs. People like to add addresses to them. Most POIs have names so to prioritize addresses we pick features without names first.
Formula is: `row_number() OVER(PARTITION BY concat(street, block_number, housenumber) ORDER BY has_name ASC) == 1`
This PR reduces the minimum lake line zoom to z3, allowing the largest lakes to show a renderable label. The lakeline function is restricted by the LineLabel() function, which limits lakelines to only those that are big enough to render a text label. Therefore, further restricting lakelines by zoom is not necessary.
This PR follows #1465 to implement pseudo-route relations for Republic of Ireland road routes as described in the [OSM wiki](https://wiki.openstreetmap.org/wiki/Ireland/Roads). Irish road routes work in the same way as UK road routes in that signage is derived from highway classification on a 1:1 basis. The scheme described in the OSM wiki is confirmed via [overpass query](https://overpass-turbo.eu/s/1por).
This feature follows the implementation currently used for UK road routes, in which a 10m Natural Earth polygon is used to determine which roads are located within Ireland to apply this processing.
This PR implements 3 classes of routes:
* M-roads, which are `highway=motorway` and signed with blue/white lettering.
* N-roads ("national roads"), which are `highway=trunk` or `highway=primary` and are signed with green/yellow lettering.
* R- and L-roads ("regional and local roads"), which are `highway=secondary`, `highway=tertiary` or `highway=unclassified`, and signed with white/black lettering
Currently, river areas (`natural=water` + `water=river`) are rendered in the tiles as `class=river`. However, canal, stream, ditch, and drain water areas are rendered as `class=lake`. Since these types of objects are all flowing water, they should be grouped together into `class=river`, which allows for styles that render flowing water differently to do so on a consistent basis.
This PR adds an additional pseudo-network for UK non-primary [routes](https://en.wikipedia.org/wiki/Great_Britain_road_numbering_scheme), which are signed with black on white signage with "A" and "B" prefixes. This scheme is described on the [OSM wiki](https://wiki.openstreetmap.org/wiki/Roads_in_the_United_Kingdom). Adding this third psuedo network is needed for generating shields for UK white/black signage for non-primary routes.
Additionally, this fixes a minor bug under which single-digit refs would have been included. Single-digit refs don't exist in the UK, because the numbering scheme is always prefixed by a letter, e.g. "A4".
I also included documentation updates and fixed the typo where a view was named "bg" instead of "gb".
* At zooms 9-13, water labels will now be rendered for water features that are at least 0.25 tiles in size. This means that water features that are the same size as a 128x128 pixel square will get a point label.
* Labels for large water features are now shown at the lowest zoom at which it's appropriate to show a label.
* Bay and strait names (`natural=bay` and `natural=strait`) are included.
* Large seas modeled as areas (e.g. Caspian Sea) render as `class=sea` rather than `class=lake`
This PR addresses that by:
* rendering oneway arrows on more than `subclass=cycleway`
* less opacity for path/footway casing
* adding the thin black casing to bridges
* adding `subclass=steps` & `subclass=bridleway` rendering
* render `bicycle=designated` as `subclass=cycleway` and `horse=designated` as `subclass=bridleway` (bike taking priority)
* improved tunnel rendering with double casing & adding main line
* made casing min zoom consistent across subclasses
All of these changes were made to mimic OSM Carto.
This PR proposes to add a new class, "pond" to the water layer, which allows for a style to de-emphasize minor bodies of water (tagged `water=pond,basin,wastewater`) when compared to more significant objects tagged reservoir/lake. This PR retains the default behavior of classifying a water body as a "lake" if more specific tagging is not added.
This PR defines the set of routes in Canada which are equivalent in national importance to the US Interstate Highway System, and are therefore appropriate to render at zoom 4. This creates a sane, connected highway network at this zoom level across the USA and Canada.
This adds two additional network types for Canadian highways, ca-provincial for provincial-level roads, and ca-provincial-arterial for "highest importance" roads that are not part of the Trans-Canada highway but should be regarded as equivalent for low-zoom rendering purposes.
Additionally, this extracts out the country-specific network checks to a separate function in order to define "equivalent top-level networks" by country, providing a place to add additional national definitions as they're added by contributors.
This PR improves the behavior introduced in #1440, which inadvertently included all motorways at z4, which was unintended. Instead, this PR provides an appropriate progression from z4 to z5 with the highest national-importance highways being rendered at z4 (including where they degrade to trunk, as in Canada), and all motorways being added to the mix at z5.
This PR adds `build-style` and `download-fonts` targets to `start-tileserver` target.
Calling `build-style` and `download-fonts` ensures that there is the OSM OpenMapTiles style build and ready and fonts downloaded.
This adds support to show the Trans-Canada Highway at zoom 4. Despite being the most important highway network in Canada, portions are `highway=trunk` due to the remoteness of the countryside. However, it's still important to show a connected highway network at the lowest zoom without showing all trunk roads at this zoom.
This change also adds support for US Interstate Highways to be drawn at z4 when they're tagged as trunks. There's only a few examples of this, but it removes those (tiny) gaps from the generalized road geometries. As we identify additional countries which should have their most important road network rendered at the lowest road zoom even if they're trunk, we can add them to the list of networks that get this treatment.
* OpenMapTiles style
* Rename style snippets from layer_name.json to defaultstyle.json
* Add README to icons dir.
* Add README to icons dir.
* Rename snippets to style.json
* Fix spritezero - move icons to svg subdir
* Move icons from style/icons/svg directly to style/icons
Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
This PR creates larger polygons of `residential` land-use areas for upper zoom levels (especially for zoom 6 - 10).
Clusters are created with the same logic as for [`building on z13`](b14da2eafb/layers/building/update_building.sql (L34-L49)).
The generalization of land-use prolongs the `import-sql` step of the `landuse` layer. But it is still faster than the `building z13` generalization which with the parallel importing keeps the whole `import-sql` time untouched.
This PR updating Natural Earth dataset from v4.1 to 5.1.2. It is in cooperation with https://github.com/openmaptiles/openmaptiles-tools/pull/414, where is `import-data` docker image updated.
PR removes manual fixes for lake merging (already fixed in version 5.1.2)
Switched comparison from `gn_ascii` (removed from NE5) to `name_en`.
Could be merged after https://github.com/openmaptiles/openmaptiles-tools/pull/413. After OMT-T is merged, it will use `latest` image (until the release of OMT-T v7)
Guided busways (or bus guideways in OSM terminology) are special roadways along which bus operators can travel smoothly at high speeds without steering. These are tagged highway=bus_guideway on OpenStreetMap.
Currently, highway=busway is surfaced in OpenMapTiles as the busway class in the transportation layer, but highway=bus_guideway is not present. These two types of roadways serve generally similar purposes, so it would make sense to have guided busways at the same zoom levels.
This PR adds support for `capital=6` in the place layer, which is used for tagging county seats in the US. A county seat is the capital of a county. In addition, I reorganized the code a bit to be simpler.
As noted in ZeLonewolf/openstreetmap-americana#384, we would like to render county seats along with state and national capitals, as this is typical styling on American-style maps.
Update with also with `capital=3` and `capital=5`
closes#1370
This PR adds a parcel locker to post class.
Similarly to ATMs from PR #1375 if a name is not present we try to use `brand` or `operator`. Here we also try to add `ref` to the brand or operator since it can disambiguate parcel lockers that are next to each other (which happens).