Wykres commitów

10 Commity (f3dbb0a83959c05b6a8a2757f170b7f2696501f0)

Autor SHA1 Wiadomość Data
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
Brian Sperlongano 0cff3449b5
Implement non-blocking refresh (#1308)
This PR implements non-blocking updates in the park layer.

The approach was to use the `REFRESH MATERIALIZED VIEW CONCURRENTLY` feature in postgres.  In order to achieve this, a unique index was added on the z4 dissolved park area table.  The `ST_Union` / `ST_Dump` sequence was changed to an explicit cluster DB scan (an equivalent operation) so that a unique osm ID could be generated from each dissolved polygon.

Below is a screen shot from Idaho, USA showing that the dissolved z4 still works as expected.

![image](https://user-images.githubusercontent.com/3254090/142341513-588045f0-7757-4acd-99e5-a50bbe6b0682.png)
2021-11-24 11:17:29 +01:00
Brian Sperlongano 9e74fb6299
Fix park layer ETL diagram (#1278)
This PR fixes an ETL diagram documentation error in the park layer.
2021-10-25 08:12:17 -04:00
Brian Sperlongano 718e79a704
Fix park polygon update SQL (#1248)
This PR fixes a bug in the park polygon update code introduced in #1160.  Because park polygons at zoom 4 are dissolved, the centroid is not present in the table at that layer.  Thus, a separate update trigger is needed to avoid errors.  This PR adds the separate trigger for the zoom 4 park layer.

This PR likely resolves an unidentified blocker for #1245
2021-09-29 13:40:16 +02:00
Brian Sperlongano 0e17d53f42
Implement park rendering at z4-5 (#1160)
Unblocks ZeLonewolf/openstreetmap-americana#51

Currently, OpenMapTiles renders protected areas at zoom 6 and higher.  However, the western United States has protected areas that are so vast that it makes sense to render these areas as low as zoom 4, as noted in ZeLonewolf/openstreetmap-americana#51

This PR extends the generalization of park features from its current termination at zoom 6 to zoom 4.

Here is an example from the Americana style of rendering protected areas at zoom 6, which is currently the lowest supported zoom:
https://zelonewolf.github.io/openstreetmap-americana/#6/45.313/-111.721

We would like to provide rendering at zoom 4 (no labels) and zoom 5 (with labels) in the Americana style.  Below are samples generated from this PR for Idaho, USA:

Zoom 4:
![image](https://user-images.githubusercontent.com/3254090/126924222-e21865e9-b184-479a-abd5-46238bd106f8.png)

Zoom 5:
![image](https://user-images.githubusercontent.com/3254090/126924230-01853e8c-d3e0-41e8-b10f-06415da529d8.png)
2021-09-01 07:20:52 +02:00
Adam Laža 77f5d76e37
Refactor schema, one _gen_z view per zoom. (#1045)
* Refactor layer aeroway.

* Refactor layer boundary.

* Refactor layer landcover.

* Refactor layer landuse.

* Refactor layer park.

* Refactor layer transportation.

* Refactor layer water.

* Refactor layer waterway.

* Re-generate water* layers etl_diagrams.

* Regenerate etl_diagrams for waterway.

* Cast NULL to text.
2020-11-26 13:54:00 +01:00
Yuri Astrakhan 6457419e0d
NOOP: Format all layer's SQL code (#917)
I would like to reformat all of our SQL to have a concise coding style.
This makes it far easier to understand the code for a casual contributor,
and lets us spot errors more easily.

Most importantly, it makes it much easier to grep (search) the code because it is more likely to be in the same syntax

Some key changes:
* SQL keywords are always UPPERCASE, e.g. `SELECT WHEN AS END ...`
* types, variables, aliases, and field names (identifiers) are always lower case
* `LANGUAGE 'plpgsql'` is now `LANGUAGE plpgsql` (no quotes)
* a few minor spacing/semicolon cleanups

P.S. Per @TomPohys request, `TABLE` is spelled using upper case despite being a type for consistency with PG Docs. Same for `LANGUAGE SQL` vs `LANGUAGE plpgsql`.
2020-06-08 12:19:55 -04:00
Adrien Matissart 993d0ef589 Fix typo in update_osm_park_polygon_row function 2018-12-19 17:58:42 +01:00
jirik 927d3945e2 Add geometry_point indexes to park layer 2018-11-30 15:32:26 +01:00
jirik ccf8ee6dfa Add park labels layer 2018-11-05 16:40:32 +01:00