OMT has generic highway shields for motorways and primary, secondary, and tertiary roads. However, mysteriously, trunk roads don't have such highway shields, which can be problematic if it doesn't have a name distinct from its highway designation.
This PR adds a new Makefile target `show-test-failures` to display test failure details and updates the existing `test-sql` target to automatically show failures when tests fail. This avoids forcing the developer to log into the SQL database to review test failures
### New Features
- **Added `show-test-failures` target**: A new Makefile target that displays test failures from the `omt_test_failures` table in a user-friendly format
- **update `test-sql` target**: Modified to automatically call `show-test-failures` when tests fail
This adds a field called `official` to `highway={path,footway,cycleway,bridleway}` features in the `transportation` layer. The field's value is:
- `0` if the OSM element is tagged `informal=yes`
- `1` if the feature has an `operator` in OSM (or is tagged `informal=no`)
- unset otherwise (this is the large majority of cases in the data today, especially when considering sidewalks, bike lanes, etc that aren't typically tagged with an `operator`).
**Questions I have about whether this PR is correct:**
1. The `official` field is conceptually an optional boolean. I chose to make it an `int` because I saw that existing boolean fields in the tiles (e.g. `intermittent` on waterways, `toll` on roads) have been implemented as 0/1 integers. Is this the right type for this field?
2. I added `description` and `values` fields to the transportation layer's `mapping.yaml` file. Is there anything else I should do to document this new field? Not sure how the schema docs on opentrailmap.org are built, but I am assuming they're generated from these mapping files somehow.
Presently, swimming pool labels are rendered as lake points in the `water_name` layer. This produces absurd results as follows:
In #1321, we made a separate swimming pool class so that they could be differentiated from lakes. However, we did not adjust the labels.
In fact, we now have two nodes - a `water_name` node and a `poi` node:
To correct this, this PR simply removes swimming pool labels from the `water_name` layer, as labeling a swimming pool the same way as a lake is clearly wrong. If there is a need to put labels on swimming pools, styles can continue to use the nodes available in the `poi` layer.
Fixes the bad orientation of a letter reported in https://github.com/openmaptiles/openmaptiles/issues/1750. Fixes any other potential weird letter rendering from zoom level 17 to 20 by making the symbol-spacing bigger at these zooms.
I noticed that OpenMapTiles generate lake labels only when run for the first time. After that, it never recreates `osm_water_lakeline` and `osm_water_point` tables, so when I generate one region after another, only the first one has lake labels. This PR fixes that.
* Fix text-field expressions in POI
- Removed text-field expressions from transport, place of worship and accommodation.
- The language switcher wasn't able to parse them and they are not neccessary in the style.
- Added `"text-optional": true` to Accommodation - if both icon and text can't fit, only icon will be displayed, which simulates a bit the previous behaviour.
* Fix filter in City layer
Fixed filter, Istanbul was missing.
This PR addresses a pg_deadlock error that would cause an update to fail if a `select getmvt` was queried during update. The deadlock occurred due to an ALTER TABLE DROP COLUMN operation on temporary columns ( `new_source_ids` and `old_source_ids`) in some linestring tables.
**Changes:**
* instead of adding/dropping the columns during update, they are now updated and set to NULL.
* Added new indexes on the source_ids columns to speed up the UPDATE.
* Will refresh `osm_park_polygon_dissolve_z4` concurrently in `park_polygon.refresh()` to avoid blocking.
Co-authored-by: Patrik Sylve <patrik.sylve@t-kartor.com>
Some of the `update_osm_${LAYER}`-functions, which are executed by triggers on updates, execute an UPDATE statement on the same tables that have these triggers. This causes the trigger functions `flag` and `store` to run multiple times for one record.
For instance, if I add log in the trigger functions and run an INSERT on `osm_housenumber_point`, this output is generated:
```
NOTICE: Store
NOTICE: Flag
NOTICE: Refresh housenumber
NOTICE: Flag
NOTICE: Store
NOTICE: Flag
INSERT 0 1
```
If we limit the triggers from executing if they are called from another trigger using `pg_trigger_depth() < 1`, the triggers will only be triggered once per record:
```
NOTICE: Store
NOTICE: Flag
NOTICE: Refresh housenumber
INSERT 0 1
```
This will prevent redunant executions and might improve update performance.
Co-authored-by: Patrik Sylve <patrik.sylve@t-kartor.com>
I noticed slow performance in `getmvt` when generating tiles at zoom levels ~ 0-8.
The issue was due to CASE blocks in the `transportation` and `poi` layers, which were processing unneccessary rows at lower zoom levels. To optimize this I added a pre-filter on `zoom_level` to reduce the workload.
In my tests, I timed the query `select getmvt(0,0,0);`.
`area=europe/united-kingdom`:
* Before: ~17 seconds
* With this fix: ~80 ms
`area=planet`:
* Before: have not yet timed it, but i believe it was around 15min if i remember correctly
* With this fix: ~10 seconds
Co-authored-by: Patrik Sylve <patrik.sylve@t-kartor.com>
Removed update trigger on osm_boundary_polygon, which attempted to run `REFRESH MATERIALIZED VIEW` on the table `osm_boundary_polygon_gen_z5`, resulting in the error: "osm_boundary_polygon_gen_z5" is not a materialized view
The issue is transportation layer filter format not match maplibre style spec
it cause tileserver-gl errors when parse the style.json:
---------
Co-authored-by: Double Max <max@ground-map.com>
Some US roads were not included in tiles, because the `ST_AsMVTGeom` did not transform geometry (result was NULL). This PR is trying to fix the geometry for `ST_AsMVTGeom`, even if the geometry is marked as valid (`ST_IsValid`). The odd geometry was caused by simplification when it could create `LINESTRING(1 1, 2 2, 1 1)` linestring, which in some cases was not converted into MVT.
Also, for the US (on zoom 4) keeps just the network `us-interstate` and the `highway=motorway` or `osm_national_network(network)` for the rest of the world.
Drop the main table for layer `transportation_name` layer before creation.
For the first SQL import, it is OK, but for the second import (e.g. for a different country by `import-osm area=yyy`) without dropping the whole database it will keep `osm_transportation_name_network` filled with data from the first import (after first `import-sql` step)
This PR will drop the already-filled table from the first import and insert data from the reimported area.
Partial revert the `e-road` and `a-road` added in https://github.com/openmaptiles/openmaptiles/pull/1619.
This PR leads to breaking the change of `network` and `ref` attributes for roads, which are not included in `osm_route_member_network_type`.
This PR fixes two things:
- remove disputed name like `ne_*m_ogc_fid` from lines
- use South Sudan disputed boundary from `ne_10m_admin_0_boundary_lines_land_disputed` so there is no gap.
This PR reduces transportation_name layer fragmentation by ensuring the short brunnel segments are merged rather than dropped from view.
---------
Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
This PR fixes boundary layer at low zoom levels:
-z4 - remove maritime boundary (Peru, northern and southern end of boundary between Canada and Alaska).
-z1-z4 - do not mix disputed boundary from NE and OSM - linestrings got duplicated. Use only NE data (z0-z4), then OSM data (z5+)
Fixes#1640
This ensures that place and poi points computed from areas result in a point node that is actually inside the area that it's derived from. Unusual shaped areas (like a banana shape, for example) may produce points that aren't actually contained.
The main goal is to improve consistency and reduce the number of poi without an icon.
- Remove music from poi cultural, music has only two subclasses music and musical_instrument, both are styled as poi shop
- Remove arts_centre from poi shop, it's already styled as poi cultural
- Remove chocolate icon, chocolate uses confectionery icon (see: https://github.com/openmaptiles/openmaptiles/pull/1628)
- Remove references to ice_cream class from poi shop
- Add missing gallery icon and move it to poi cultural (see: https://wiki.openstreetmap.org/wiki/Tag:tourism%3Dgallery)
- Use the icons alcohol, newsagent, perfumery, trade respectively for wine, kiosk, perfume and wholesale.
- Add a generic fallback icon for shops
Keep the default output filename as `tiles.mbtiles`. `tiles.mbtiles` is expected to start TileServer.
Using the `area` as the name causes TileServer not to run. The name could be changed by the user by
- change `MBTILES_FILE` in `.env`
- use MBTILES_FILE as an environmental variable before running `quickstart.sh` or `generate-tiles-pg`
Co-authored-by: Adam Laza <@lazaa32>
This PR replaces the `route_N` attribute scheme with individual attributes for name and colour on routes. Thus you will have:
* `route_N_network` to hold the route `network` value
* `route_N_ref` to hold the route `ref` value
* `route_N_name` to hold the route `name` value
* `route_N_colour` to hold the route `colour` or `ref:colour` value