Wykres commitów

1275 Commity (b9c9e69028d54ac5fd7694deed7eb6d8b5e4aa3e)

Autor SHA1 Wiadomość Data
Brian Sperlongano b9c9e69028
Remove expressway from ramps (#1602)
#1313 added `expressway` tagging to the transportation layer. However, this also added the `expressway` attributes to ramps where it doesn't make sense (ramps by definition are controlled-access roads in all cases).  This PR corrects this by dropping the `expressway` attribute from ramps where it doesn't make sense to do so.

See also ZeLonewolf/openstreetmap-americana#1017
2023-12-28 07:11:36 +01:00
Christopher Beddow e61442c49d
feat: add charging station to car POIs (#1544)
Adding charging station to class `fuel`.

Co-authored-by: Christopher Beddow <cbeddow>
Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2023-12-12 13:58:03 +01:00
Martin Fischer 3cf77e2a54
Introduce `office` POI class (#1423)
Omitted values include:

* office=yes ... too generic
* office=vacant ... not really a POI
* deprecated values (like office=administrative)
* tags that don't have a clear meaning (like office=camping,
  office=healthcare, office=transport, office=design)
* tags where another tag is used more often, e.g:
  office=religion is used more often than office=parish
  office=construction_company is used more often than office=construction
  office=engineer is used more often than office=engineering

---------

Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2023-12-01 17:43:58 +01:00
Brian Sperlongano 6c31841f46
Remove oneway from shipway/rail (#1591)
This PR removes the `oneway` attribute from ferry lines and rail lines.  These attributes don't really make sense for these feature classes and they are not typically rendered in general-purpose maps.
2023-11-09 16:56:28 +01:00
Zhongxiang Wang dfd20c647c
Fix unexpected error brought by typo: tigger -> trigger & fix `trigger_flag` was created on a wrong target (#1584)
1) The trigger name has a typo of `trigger`, which is incorrectly spelled as `tigger` and doesn't match the following create command: `CREATE TRIGGER trigger_flag`. This may result in an error when invoking `make import-sql`.

```
ERROR:  trigger "trigger_flag" for relation "osm_park_polygon_gen_z4" already exists
xargs: sh: exited with status 255; aborting
```

2) The `trigger_flag` may be created on the wrong target in line [#251](https://github.com/plainheart/openmaptiles/blob/master/layers/park/update_park_polygon.sql#L251).
2023-09-27 12:08:33 +02:00
Michał Gwóźdź febd1abbd2
Update README.md (#1581)
This workshop is extremely helpful in understanding how OpenMapTiles works, especially in creating new layers, which is not properly documented (or I just couldn't find any documentation).
2023-09-21 08:06:29 +02:00
Brian Sperlongano 9de3ff3921
Restore missing route zooms (#1579)
This PR restores missing transportation_name features that are missing from zoom 11 and improves the mechanism by which transportation_name features are merged through lower zooms. This prevents route features from being dropped due to bridge interleaving (when a bridge interrupts an otherwise continuous route).

This fix moves the length check to a later stage of processing and merges bridges/tunnels if they're too small.  This is similar to the work done in the transportation layer to merge bridges that are too small to render lines.  In this layer, bridges are merged when they're too small to justify a separate label.
2023-09-14 15:55:01 +02:00
Brian Sperlongano a7a50d84bc
Convert semi-colon separated house numbers to a range (#1562)
This PR collapses housenumber values into the form min(housenumber)-max(housenumber) for cases where housenumber is a semi-colon separated list. If the list is all numbers, the bounds are the smallest and largest numbers.  If the list includes non-numeric characters, it falls back to the first and last values in the list.
2023-09-13 11:09:41 +02:00
Brian Sperlongano 48a2b1af72
Convert PL/PGSQL to SQL (#1568)
This PR converts three plpgsql functions in the `transportation_name` layer to sql functions, which perform better.
2023-08-06 07:26:24 +02:00
Peter Hanecak 0ca096938e
Fix for classification of CA:ON:primary (#1564)
This PR changes classification of `CA:ON:primary`: "all else" should be `ca-provincial`.
2023-07-11 07:28:20 +02:00
benedikt-brandtner-bikemap a8e6573ba8
boundary.sql parallelization issue fix (#1551)
VectorTiles generated via the [openmaptiles-tools](https://github.com/openmaptiles/openmaptiles-tools) toolchain and using the OpenMaptiles-SQL-Layers as the query-source result in tiles which can contain duplicated keys.

This is because PostGIS `ST_AsMVT` is used to generate the Tiles and due to the way they [implemented parallelization](https://trac.osgeo.org/postgis/ticket/4310).

Although it is not prohibited by the Mapbox-Vector-Tile-Specification MapBox as well as MapLibre depending on version either throw a lot of warnings or even crash when encountering tiles with duplicated keys.
https://github.com/mapbox/vector-tile/issues/55
https://github.com/maplibre/maplibre-native/issues/795

After investigating I identified the boundary layer in zoom-leves 1 - 4 as the only layers containing duplicated keys.
2023-07-10 11:50:31 +02:00
Tomas Pohanka 103e37bd2c
Update readme links. (#1560)
Update links to Slack and lake lines.

Fix #1559
2023-07-05 13:03:42 +02:00
Andrea Mennillo a548093e08
transportation style: remove whitespace in color value (#1550)
Trivial fix for style validation failure with maplibre@3.0.1
2023-06-19 19:20:40 +02:00
benedikt-brandtner-bikemap 66731f3544
LineString Merging Updates (#1538)
This PR addresses two main issues introduced by the new ID-Based Merged-LineString Updates

1. Partial Indexes can only be accessed when the query matches more or less exactly and the query-planner will fail to use indexes when targeted via the join-condition and not the where-condition
    - `osm_transportation_merge_linestring_gen_z9`
    - `osm_transportation_name_network`
    - `osm_shipway_linestring`
    - `osm_aerialway_linestring`
    - `osm_waterway_linestring`
2. When intersecting updated Source-LineStrings with the existing Merged-LineStrings we join the Source-IDs of each existing Merged-LineString. This bloats the table unnecessarily and slows down bigger updates considerably.
    - This is addressed by aggregating the Source-IDs of each existing Merged-LineString into an array and concatinating these arrays when grouping them. Afterwards we add the IDs of updated SourceLineStrings and deduplicate the result before adding it to the Source-IDs-Table.
2023-06-19 10:12:57 +02:00
benedikt-brandtner-bikemap d8a264cd0c
remove leakproof attribute from functions; (#1535)
LEAKPROOF requires the executing user to have superuser privileges when creating the functions which would be the only statement required to be executed as a superuser.
2023-06-14 11:31:12 +02:00
benedikt-brandtner-bikemap d0d87e52d5
fixed analyzing of changes table in refresh_[shipway/aerialway]_linestring (#1536)
Fixes a typo analyzing the `name_changes` table during execution of `transportation_name.refresh_shipway_linestring` and `transportation_name.refresh_aerialway_linestring`
2023-06-13 18:13:17 +02:00
Christopher Beddow 80bc6518ab
Paint (#1435)
Paint shop is missing from the schema, so shops of this type do not appear on the map beside other POIs
---------

Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2023-05-16 14:19:29 +02:00
Yaser Kalali 692b0a7afe
Fix issues in compose and quickstart.sh (#1530)
* Chore(quickstart.sh):

Handle spaces in fonts name when calculating their md5 digest

* Chore(Makefile):

Change docker pull to docker-compose pull to read image from compose file
2023-05-15 12:36:15 +02:00
Brian Sperlongano aea2b734da
Update park layer description to include indigenous lands addition (#1526)
This PR updates the park layer description to reflect #1489 and clarify why we chose to place them in this layer (technology reasons).
2023-05-10 10:25:31 +02:00
William Edmisten 5153dffe4a
Use area name for mbtiles in quickstart.sh (#1523)
Some parts of quickstart.sh reference `${area}.mbtiles`, but the file that gets created with the default `.env` is `tiles.mbtiles`. We should either reference `$MBTILES_FILE` instead, or override the filename with `${area}.mbtiles` (which is the approach taken by this PR).
2023-05-10 09:33:44 +02:00
Brian Sperlongano 9969c5c741
Remove unused indexes (#1520)
Based on analysis from planet builds for this layer as well as running updates via the integrity script as discussed in #1516, these three indexes are not used and can be removed.
2023-05-10 07:39:45 +02:00
benedikt-brandtner-bikemap 91dd853a89
Transportation_route_member_coalesced constraint errors
Multi-Column Primary-Keys (Unique-Constraints) must not contain NULL values in postgres up until version 15.

This PR coalesces NULL to empty strings for the primary columns during `transportation_route_member_coalesced` updates and import.

Additionally adds the missing `concurrency_index` to UPSERT statement of `transportation_route_member_coalesced`
2023-04-26 22:19:34 +02:00
Brian Sperlongano b3d67ed5b3
Add aboriginal lands (#1489)
This PR adds support for `boundary=aboriginal_lands` by adding it to the `park` layer. While these lands are certainly not "parks", they have similar treatment from a technology perspective and can benefit from the existing processing chain established in that layer. I set all of these objects to `class=aboriginal_lands` in the tiles, including at the lowest zoom in order to separate it from the protected area merging implemented in #1160. In order to distinguish these from general parks, I expose the `class` attribute for these objects at z4 and also ensure that the z4 generalization is performed separately for protected areas versus aboriginal lands.

This unblocks #ZeLonewolf/openstreetmap-americana#105, which describes why having indigenous land boundaries is an important general feature on the map. This is also consistent with my suggested implementation in https://github.com/openmaptiles/openmaptiles/issues/1296#issuecomment-967749403.
2023-04-04 13:20:41 +02:00
Brian Sperlongano 6f2b39e657
Fix index typo (#1522)
This PR fixes a copy/paste error which caused the z2 boundary layer index to be created twice and the z1 index to not be created at all.
2023-03-28 10:33:18 +02:00
benedikt-brandtner-bikemap f3dbb0a839
Refresh osm_park_polygon_dissolve_z4 materialized view after update in update_park_polygon.sql (#1515)
Refresh osm_park_polygon_dissolve_z4 materialized view after update in update_park_polygon.sql.
2023-03-23 13:30:23 +01:00
benedikt-brandtner-bikemap 54e24207a1
Improved update performance of waterway layer (#1514)
Improved update performance of waterway layer
- Refactored LineString-merging and diff updates in update_important_waterway.sql
2023-03-23 08:05:15 +01:00
benedikt-brandtner-bikemap d937705292
Update Performance water_name Layer (#1513)
Improved update performance of water_name layer
- Implemented diff updates for update_water_lakeline.sql and update_water_point.sql
- Unified update_water_lakeline.sql and update_water_point.sql to update_water_name.sql
- Refactored IDs to be unique in water_name_marine.osm_ids
- Restricted updates to INSERT and UPDATE operations during water_name_marine.refresh
- Added analyze statements before update queries during water_name_marine.refresh
2023-03-22 21:28:21 +01:00
benedikt-brandtner-bikemap b2a57b3755
Update Performance transportation_name Layer (#1512)
Improved update performance of transportation_name layer
- Refactored LineString-merging and diff updates in update_transportation_name.sql
- Refactored transportation_route_member_coalesced materialized view to table
- Added analyze statements before update queries during transportation_name.refresh_network and update_osm_route_member
2023-03-22 19:39:18 +01:00
benedikt-brandtner-bikemap 8321574565
Improved update performance of transportation layer (#1511)
Improved update performance of transportation layer
- Refactored LineString-merging and diff updates in update_transportation_merge.sql
2023-03-22 16:48:27 +01:00
benedikt-brandtner-bikemap 0e8e2512e8
Update Performance poi Layer (#1510)
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
2023-03-22 15:07:10 +01:00
benedikt-brandtner-bikemap 3caa11aee9
Improved update performance of place layer (#1509)
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
2023-03-22 14:00:10 +01:00
benedikt-brandtner-bikemap 1126e30d0d
Improved update performance of mountain_peak layer (#1508)
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
2023-03-22 12:13:05 +01:00
benedikt-brandtner-bikemap d97d86320b
Do not raise errors with diagnostics code after local test in order to let executors of the script propagate the appropriate status-code (#1519)
Propagate the appropriate status-code during failed unit-test runs. (eg.: CI-Runs)
2023-03-22 07:56:34 +01:00
benedikt-brandtner-bikemap 7bdf1ae409
Improved update performance of housenumber layer (#1507)
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
2023-03-21 20:24:47 +01:00
benedikt-brandtner-bikemap d8a8c81f79
Improved update performance of aerodrome_label layer (#1506)
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.
2023-03-21 18:09:32 +01:00
benedikt-brandtner-bikemap f918f4d607
Local Test Fixes (#1505)
This PR fixes local tests affected by the changes introduced in #1440 #1444 #1361 #1501
2023-03-21 11:33:50 +01:00
Brian Sperlongano 81d29fff2b
Add convenience script to run the integrity test locally (#1495)
This PR adds a script that allows a developer to run the "integrity" CI script without actually creating a PR.
2023-03-17 07:53:21 +01:00
William Edmisten 02dcc41e1f
Support new docker compose version (#1497)
Currently the Makefile and `quickstart.sh` expect the [deprecated docker compose V1](https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command) syntax, `docker-compose`.
The new V2 syntax uses `docker compose` instead.
2023-03-15 22:16:00 +01:00
Brian Sperlongano e5a5acfa99
Render long-distance ferries at longer zooms (#1486)
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.
2023-03-15 16:55:47 +01:00
Brian Sperlongano d8c367f42c
Remove bridge/tunnel attributes from tiny bridges (#1283)
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.
2023-03-15 13:22:08 +01:00
Brian Sperlongano 0c6dd1fecb
Update Slack link (#1494)
This PR updates the link to Slack in the contributor's guide.
2023-03-06 19:14:01 +01:00
Brian Sperlongano b7edcf6153
Convert osm_route_member unique index to trigger (#1501)
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.
2023-03-06 17:10:30 +01:00
Tomas Pohanka 624cf7a8a3
Minor docs enhancement. (#1481)
Update docs, links, and comments.
2023-01-30 14:04:47 +01:00
Brian Sperlongano 5e9b7c475d
Add grade 1 tracks to paved (#1485)
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.
2023-01-26 19:24:44 +01:00
Tomas Pohanka d2c69b0d45
Fix stops aggregation in osm_poi_point. (#1480)
This PR fixing the stops aggregations which now returns always `NULL` and wasn't reflected in the tiles.
2023-01-26 17:57:31 +01:00
Brian Sperlongano bc9bbd2e67
Coalesce duplicate route concurrencies (#1361)
# 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.
2023-01-26 16:15:47 +01:00
Brian Sperlongano efa6b27fba
Render POIs for large universities at low zoom (#1479)
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.
2023-01-19 19:29:29 +01:00
Brian Sperlongano f9e358c962
Add substantial missing languages in the US (#1477)
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.
2023-01-17 10:38:31 +01:00
ttomasz 3b4650fca1
Tile duplicate housenumber filtering (#1391)
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`
2023-01-17 09:34:27 +01:00
Brian Sperlongano 168e8300c0
Allow lakelines at native sizes (#1475)
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.
2023-01-16 11:33:43 +01:00