Wykres commitów

1239 Commity (81d29fff2b325859b34b4a1d2f50bbf4a047b2d4)

Autor SHA1 Wiadomość Data
Brian Sperlongano df6906b7b5
Remove unneeded waterway='' check (#1377)
This PR removes an unnecessary check in water.yml.

generated SQL before:
```
SELECT CASE
           WHEN waterway='riverbank' THEN 'river'
           WHEN "waterway" = 'dock' THEN 'dock'
           WHEN "water" = 'river'
               OR "waterway" = 'riverbank'
               THEN 'river'
           WHEN "waterway" = '' THEN 'lake'
           ELSE 'lake'
           END;
```

generated SQL after:
```
SELECT CASE
           WHEN waterway='riverbank' THEN 'river'
           WHEN "waterway" = 'dock' THEN 'dock'
           WHEN "water" = 'river'
               OR "waterway" = 'riverbank'
               THEN 'river'
           ELSE 'lake'
           END;
```

The `waterway=''` test is purely redundant because it returns the same value as the fall-through ELSE case: `lake`.
2022-04-25 13:42:01 +02:00
ttomasz ca9e8f4e52
adds ATM to POI layer (#1375)
This PR adds ATM to POI layer.
If ATM isn't provided with a name tag we'll try to use operator or network instead.
2022-04-25 10:29:08 +02:00
zstadler 2d0b7159d0
Update aerodrome_label class in DIFF_MODE=true (#1371)
The class field was not updated if needed during the import of changes in DIFF_MODE=true.
2022-04-20 05:50:37 +02:00
zstadler 22915df783
Allow non-default `PGPORT` (#1363)
- Allow use of environment variables in addition to .env
- Remove .env-postgres and the need to synchronize it with .env

Resolves #1354
Related to https://github.com/openmaptiles/openmaptiles-tools/pull/403
2022-04-19 21:33:03 +02:00
Matt Riggott 8693822d50
Add documentation on islands in place layer (#1362)
Islands have been part of the OpenMapTiles schema for more than five years (see commits d664a2fe and 01db9a4e and issue #68), but they're not documented in [the layer definition](https://github.com/openmaptiles/openmaptiles/blob/master/layers/place/place.yaml) or [on openmaptiles.org](https://openmaptiles.org/schema/#place). This PR fixes that by updating `layers/place/place.yaml`.
2022-03-14 08:29:47 +01:00
zstadler b0e7f7884c
Use `docker-compose up -d` for on-going processes (#1353)
Make targets `start-tileserver`, `start-maputnik`, and `update-osm` initialize on-going processes rather than perform a one-time task. It is more appropriate to execute them using `docker-compose up -d`. With the current `docker-compose run` execution, the user needs to run `make` as a background process. This PR also allows the use of `docker-compose logs` rather than the need to handle `stdout` and `stderr` redirection and avoids the dependency of `stdin` handling for `docker-compose run`

Using `docker-compose` rather than `docker`
Use appropriate` start-*` and `stop-*` make target names

Resolves #1352
2022-02-22 12:43:59 +01:00
Matt Riggott b13ab9491f
Add more aerialway tags to transportation layer (#1343)
Before this, only `aerialway=cable_car` and `aerialway=gondola` were included in the tiles. That misses some widely-used tags, notably `aerialway=chair_lift`, `aerialway=drag_lift`, and `aerialway=platter`. The usage of all the tags added in this commit, by fraction of all aerialway way keys (according to TagInfo), is:

| Tag                    | Usage  |
|------------------------|-------:|
| `aerialway=chair_lift` | 25.51% |
| `aerialway=drag_lift`  | 12.93% |
| `aerialway=platter`    | 11.35% |
| `aerialway=t-bar`      |  7.93% |
| `aerialway=j-bar`      |  0.63% |
| `aerialway=mixed_lift` |  0.24% |

Some of these tags were also added in PR #620 back in May 2019, but were removed again before it was merged.

Fixes #1342.
2022-02-17 13:08:39 +01:00
Tomas Pohanka 81ddab9f9a
Updates documentation for 3.13 (#1350)
Adding missing information in `layers.yaml` files for 3.13
2022-02-09 12:38:47 +01:00
Adam Laža 7f08414f20
Use equal operator in combination with coalesce() function instead of IS NOT DISTINCT FROM operator. (#1344)
Updates on `transporation_name` layer take much more time than before.

In 3.13 there had been introduced highway concurrency into `transportation` and `transportation_name` so I expected the update process will take more time but not that much. Because of this it's impossible to use updates on larger areas because the process takes too long.

The issue is caused by `IS NOT DISTINCT FROM` operator over `tags` (hstore) columns. I replaced it with `=` operator in combination with `coalesce()` function which returns the same results but in shorter time.
2022-02-04 15:25:47 +01:00
Alexander Menk ff8cecf8ab
Doc: Updating tiles (#1340)
This tried to improve the documentation on Updates
2022-02-04 14:19:33 +01:00
ePirat a236bbec5c
Fix version check in quickstart.sh (#1333)
When docker compose returns a version with v prefix,
the version check would incorrectly treat it as version component
of 000, leading to always failing the docker-compose version check
even if the version is recent enough.

This happens at least with docker-compose 2.2.1 where
  docker-compose version --short
returns v2.2.1 with the leading v.
2022-02-04 13:50:47 +01:00
Adam Laža 2e04f83166
Fix paths and tracks in transportation layer z12 and z13 (#1334)
This PR fixes a bug that causes that `track` lines disappear at z13. This bug was introduced in https://github.com/openmaptiles/openmaptiles/pull/1190, which adds rendering of paths and tracks at z12 and z13.

Before this PR:
z12: lines with `route_rank = 1` are added (no matter what `highway`).
z13: lines with `route_rank BETWEEN 1 AND 2` and `highway = 'path'` are added.
-> tracks with `route_rank=1` are added at z12 but not at z13.

After this PR
z12: lines with `route_rank = 1` and `highway IN ('path', 'track')` are added.
z13: lines with `route_rank BETWEEN 1 AND 2` and `highway IN ('path', 'track')` are added .
-> only tracks and paths are added at z12 and z13 (which was IMHO the goal of https://github.com/openmaptiles/openmaptiles/pull/1190)

* Add only the most important paths and tracks (route_rank=1) to z12 and more important ones (route_rank between 1-2 or sac_scale or has name) to z13.
2022-01-05 07:28:34 +01:00
Tomas Pohanka 7d08e5b97e
Remove FILTER_MAPNIK_OUTPUT (#1327)
Remove `FILTER_MAPNIK_OUTPUT` variables from docker-compose which stop raising warnings during start-up dockers.

This functionality was removed in https://github.com/openmaptiles/openmaptiles-tools/pull/349.

The current version of the mapnik does not need `FILTER_MAPNIK_OUTPUT`.
2021-12-08 13:40:48 +01:00
Tomas Pohanka 73dcd23497
Run get_basic_name after osml10n_street_abbrev_* (#1326)
PR move `get_basic_names(tags, geometry)` function from `transportation_name_tags` function and adding it after `transportation_name_tags` resolve street abbrevation.

PR runs through `test-sql` test without error. Adding to `osm_transportation_name_network` (table and for update) was done in consequence of `test-sql` errors ([update test 500](a747d98550/tests/test-post-update.sql (L53))). Originally `get_basic_names` was just in `osm_transportation_name_linestring` table.

FIX #1324

![seattle_fix](https://user-images.githubusercontent.com/5182210/145085141-7857e97e-9b83-4467-bb98-84cc4a2e0623.png)
2021-12-08 08:20:15 +01:00
Tomas Pohanka a747d98550
Update TESTING.md (#1325)
Fix typo
2021-12-07 19:13:17 +01:00
Tomas Pohanka 44ae83718c
Remove `STRICT` statement (#1320)
Remove `STRICT` statement from `transportation_name_tags` function.

Concurrently with remove `STRICT` from `get_basic_names` and `get_latin_name` in OMT-T

FIX #1319
2021-12-07 17:59:04 +01:00
Cody B. Daig 7838221b16
Update Quickstart.md with proper make list commands (#1316)
`make list` insn't a valid command. This updates the documentation with the proper commands.
2021-11-27 03:50:40 -05:00
Tomas Pohanka edaf9179b0
Update openmaptiles.yaml (#1315)
Preparation for release 3.13
2021-11-26 12:19:48 +01:00
Yuri Astrakhan 4eb8feb0ad
Use tools v6.1, improve .env docs (#1281)
* Add info about using MID_ZOOM to optimize tile generation
* Remove params for generation that are now automatically detected


Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2021-11-26 11:31:01 +01:00
Nicholas Skehin 207396269e
Implement aerialway labels (#1309)
This PR adds labels to `aerialway` linestrings after zoom level 12. I roughly followed PR https://github.com/openmaptiles/openmaptiles/pull/1179

These are useful in ski resorts and should not inflate the size of the tiles by much as aerialways are rare:
![Screenshot from 2021-11-18 12-18-58](https://user-images.githubusercontent.com/632493/142680225-1875904b-d146-4932-8a22-8c36919b875d.png)


Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2021-11-26 10:16:41 +01:00
Brian Sperlongano 7f23feab88
Add expressway tagging to the transportation layer (#1313)
Fixes #1148 

This PR adds expressway tagging to the `transportation` layer, by setting `expressway=1` for non-motorway roads tagged `expressway=yes`, and omitting the tag otherwise.  Additionally, I've added a few unit tests to verify that the expressway tagging is being imported and updated into the intermediate tables.

Here is an example of expressway tagging on US-1 in Rhode Island, USA:

![image](https://user-images.githubusercontent.com/3254090/143501278-db3671b2-2efa-4998-bffd-9ddfec63579b.png)
2021-11-26 07:55:20 +01:00
Brian Sperlongano ec74480414
BUGFIX: Fix name-based way fragmentation in transportation_name (#1295)
I discovered this bug while investigating issues with the updates process related to #1190 #1292, and #814.

The `transportation_name` layer produces slightly different `tags` hstore values in the `osm_transportation_name_linestring` table during the initial import versus when running an update.  As currently written, the import code produces null-value keys in the `tags` column, while the update code suppresses them.  This PR removes that difference and makes the import code use same method that is currently used in the update code.

With a test case I've written, the import code produces a tags hstore that looks like this:
`"name"=>"OpenMapTiles Secondary 2", "name:de"=>NULL, "name:en"=>NULL, "name_int"=>"OpenMapTiles Secondary 2", "name:latin"=>"OpenMapTiles Secondary 2"`

...while the update code produces a tags hstore that looks like this:

`"name"=>"OpenMapTiles Secondary 2", "name_int"=>"OpenMapTiles Secondary 2", "name:latin"=>"OpenMapTiles Secondary 2"`

Note the missing NULL values.

This bug causes a small amount of space wastage after an update is run, because the update matching code detects the `tags` value as different, resulting in a duplicate copy of the tags value if that row is updated.  This causes duplicate objects and breaks GROUP BY clauses that expect to group same-tagged features together.  I've tested this by inspection of a generated mbtiles, database spot checks, and the unit test code included in this PR.
2021-11-25 10:45:11 +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 cdff735be1
Remove blank name tags (#1307)
This PR performs the same fix on the park layer that #1268 applied to the waterway layer.  It removes blank name, name_en, and name_de from the tiles.
2021-11-18 18:27:19 +01:00
Eva Jelinkova 054d3a7e4d
add province, increase scalerank + labelrank (#1306)
Add `province` (next to `state`) tag into `osm_state_point`
2021-11-18 18:05:02 +01:00
Brian Sperlongano 75d8c80228
Selective rendering of tracks and paths at z12-13 (#1190)
Closes #271

This PR adds track and path rendering at lower zooms than currently provided, and also achieves near-parity with openstreetmap-carto on track and path rendering. A previously-abandoned attempt, with significant discussion, was #1169.
2021-11-18 17:35:34 +01:00
zstadler 7f531c1dbb
Update "Verifying that updates still work" (#1290)
Convert the instructions into a single script that anyone can copy-paste to a terminal.
Add `make destroy-db` to the initialization part.
2021-11-16 07:58:16 +01:00
Eva Jelinkova 93d57a8d03
adding customary_ft for peaks in US (#1298)
Add tagging that will mark unit that is customary in the country. US peaks will include the tag `customary_ft=1`.
2021-11-15 16:55:35 +01:00
Brian Sperlongano d7ea45349e
Add highway tests (#1294)
This PR adds unit tests for the transportation layer, and fixes several bugs in the unit testing code.  It verifies the correct zoom association to the various highway classes, and verifies that updates to highway attributes are populated.

Additionally, the documentation for unit tests in the CONTRIB guide is updated to note the specific make commands for developers to run.
2021-11-11 08:27:01 +01:00
Eva Jelinkova 26cfe69a9c
Waterway zoomlevel 6 - 8 corresponding with water (#1291)
This PR is solving https://github.com/openmaptiles/openmaptiles/issues/406, partially also https://github.com/openmaptiles/openmaptiles/issues/320.
It is changing source of data for zoomlevel 6 - 8 in `waterway` layer to OSM (relation `waterway = river`), this way it corresponds with `water` layer.
Testing on Europe, z0 - z9 tiles increase size from 20.7 MB to 21.4 MB. We can discuss the level of generalization, but I think this size change is not critical.
2021-11-10 20:26:14 +01:00
zstadler 1be440404b
Update etl diagram for poi layer (#1297)
Add the missing `osm_poi_stop_centroid` and `osm_poi_stop_rank` materialized views.
2021-11-10 19:49:18 +01:00
Falke Design ebeafc65fa
Add requires.tables to <layer>.yaml (#1236)
**NOTE** this can only be merged after the next tools version is released.

Added required Postgres tables to the `<layer>.yaml` definition.
Close: #1220

PR of tools: https://github.com/openmaptiles/openmaptiles-tools/pull/370
2021-11-05 10:04:54 +01:00
zstadler 5b2e43497e
`transportation_name` update to consider `tags` (#1289)
Following 8bb77b67a1 (r59190611)
2021-11-04 13:51:28 +01:00
Brian Sperlongano dffb9c66d6
Document updates testing process (#1284)
This PR adds documentation for how to test the updates process.  The procedure is largely copied from @zstadler's work on #1230.
2021-11-01 10:43:37 +01:00
Brian Sperlongano 79f8db03f9
Fix blank names (#1268)
This PR fixes a bug in the `waterway` layer in which empty `name_en` and `name_de` tags were being added to the tiles.

`name_en` and `name_de` are legacy tags, intended to be removed in v4.0.  Thus, any legacy consumers that have not yet transitioned to `name:en` and `name:de` etc are currently NOT rendering labels for these features when `name:en` and `name:de` are not tagged on the feature.  Therefore there are two possible approaches:

1.  Remove these tags which are not rendering anyways from the tile, which keeps the bug in place, but shouldn't matter because no data consumer has taken notice of the issue (it would probably be easier to migrate to the new tag than to post a bug report!), _and they're going to be removed eventually anyways_.  That's the approach in this PR.
2021-11-01 09:05:01 +01:00
Brian Sperlongano c7e7fae9ee
Add support for Bus Rapid Transit (highway=busway) (#1271)
This PR adds support for bus rapid transit (BRT) systems, mapped with the [approved tag](https://wiki.openstreetmap.org/wiki/Proposed_features/Tag:highway%3Dbusway) `highway=busway`. BRT systems commonly appear in maps that also show light rail.  Below are two examples of BRT in such maps.

![image (1)](https://user-images.githubusercontent.com/3254090/138018375-ac1f60c3-8059-4f95-bf1d-a659ca0c0103.png)
![image](https://user-images.githubusercontent.com/3254090/138018376-f809aeb3-17ba-495e-b33c-9fe54a0fa840.png)

Since BRT is equivalent in nature to light rail systems, this PR matches the zoom level of light rail, which is rendered at zoom 11+.  BRT systems are relatively uncommon, so adding this support should have negligible impact on tile size.

Below is a data rendering of [a BRT system](https://www.openstreetmap.org/relation/4051383#map=12/40.4068/-79.8646) in Pittsburgh, Pennsylvania.

![image](https://user-images.githubusercontent.com/3254090/138021552-ce974f2f-cfbd-42a0-9848-42ed44da453e.png)
2021-11-01 08:40:07 +01:00
Nic Hubbard 6caab9fa09
Update QUICKSTART.md (#1282)
Updated the output of `make help`.
2021-10-29 18:08:50 -04:00
Brian Sperlongano a0d915942a
Allow oneway=-1,1 only (#1267)
This PR removes cases of `oneway=0` as this is an assumed default.  It is not necessary to have this tag on every road or path and by removing it we can save space in the tiles by only including the meaningful values.  It leaves intact `oneway=1` and `oneway=-1`, the latter of which indicates a oneway in the opposite direction of the way.

Unblocks #1265
2021-10-28 15:39:34 +02:00
Brian Sperlongano cded42349f
Remove unnecessary ramp tagging (#1266)
This PR removes unnecessary `ramp` tagging from the `transportation` layer.  The `ramp` tag is used for two situations.  First, it is set for all `highway=***_link` tags to indicate a highway ramp.  The second situation is when the `ramp` tag is set on a highway object, which indicates the presence of a ramp, such as one that would be used for a wheelchair.  `ramp=0` is a reasonable default in these situations; by removing cases of `ramp=0` and presenting only `ramp=1` to the tiles, we can save considerable size in the tiles.  Additionally, there appears to be a bug in which all objects tagged `highway=steps` are inexplicably tagged `ramp=1`.

The changes as follows:

1. Remove `ramp=0` where it appears in the tile.
2. `highway=steps` no longer assumes `ramp=1` in cases where `ramp=*` is not explicitly set.

In the current behavior, `ramp=0` is tagged only in at z13+ but suppressed in lower zooms:
![image](https://user-images.githubusercontent.com/3254090/137589213-5a3432df-8c19-47bf-b556-7be15479790c.png)
![image](https://user-images.githubusercontent.com/3254090/137589296-f3126264-fb07-4346-ba70-c1f1b007a709.png)
![image](https://user-images.githubusercontent.com/3254090/137589306-30f9821b-3160-4b45-98b3-f2b8a0ae3a13.png)

This PR unifies `ramp=0` suppression between z13+ and z12-.
2021-10-28 15:08:56 +02:00
Brian Sperlongano be37f3a565
Framework for SQL-based unit tests for import and updates (#1249)
This PR adds the ability to create SQL tests that ensure that OSM data is properly imported and updated in the OpenMapTiles data schema. The tests work by injecting test OSM data and updates into the database and checking to ensure that the data is properly loaded into the database using standard SQL statements.  With this framework in place, developers can now write small tests to inject known data into the database and ensure that imports and updates are working correctly.

In addition to the framework, basic tests are provided for four layers.  These initial tests are in no way comprehensive, but they provide a structure and framework for developers to add their own tests or expand the existing ones to cover more cases.

Usage:

`make clean && make sql-test`

## How it works
The SQL tests consist of the following parts:

1. **Test import data**, located in `tests/import`.  This test data is in the [OSM XML](https://wiki.openstreetmap.org/wiki/OSM_XML) format and contains the data that should be initially injected into the database.  The files are numbered in order to ensure that each test data file contains OSM id numbers that are distinct from the other files.  For example, the file starting with `100` will use node ids from 100000-199999, way ids from 1000-1999, and relation ids from 100-199.
1. **Test update data**, located in `tests/update`.  This test data is in the [osmChange XML](https://wiki.openstreetmap.org/wiki/OsmChange) format, and contains the data that will be used to update the test import data (in order to verify that the update process is working correctly.  These files are also numbered using the same scheme as the test import data.
1. **Import SQL test script**, located at `tests/test-post-import.sql`.  This script is executed after the test import data has been injected, and runs SQL-based checks to ensure that the import data was properly imported.  If there are failures in the tests, an entry will be added to the table `omt_test_failures`, with one record per error that occurs during the import process.  A test failure will also fail the build.  To inspect the test failure messages, run `make psql` and issue the comment `SELECT * FROM omt_test_failures`.
1. **Update SQL test script**, located at `tests/test-post-update.sql`.  This script performs the same function as the import test script, except that it occurs after the test update data has been applied to the database.  Note that script will only run if the import script passes all tests.
2021-10-28 13:38:46 +02:00
Brian Sperlongano 5833e8ce6e
Suppress rendering of underground buildings (#1241)
This PR does the following:
1. Suppresses underground buildings from rendering, when such buildings are tagged `location=underground`.  Based on the wiki documentation, the `layer` tag does not determine whether a feature is above of below ground.
2. Unifies the building and building relation imposm exclusion mappings.

The following underground building feature in Luxembourg is used as the test object:
https://www.openstreetmap.org/way/582873794
2021-10-28 13:09:06 +02:00
Petr Pridal 15eb75539d
Update LICENSE.md 2021-10-26 09:52:11 +02: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
Falke Design ce94fecaa8
Add boundaries `import-data` info to Readme (#1215)
* Add boundaries info to Readme

* make NE usage less specific - it may change later.

Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
2021-10-19 11:26:47 -04:00
Brian Sperlongano 829f28d27b
Fix logic error in transportation layer filter (#1270)
This PR fixes a bug in the `WHERE` clauses in the transportation layer generalization tables for zoom 10.    The intended behavior of the layer is to suppress `highway=tertiary` and `highway=tertiary_link` at zoom 10 and lower.  However, due to this bug, these objects were not suppressed as intended, because an `OR` was used in the SQL where an `AND` was needed instead.

This bug was inadvertently introduced in #1172 😞
2021-10-19 10:31:51 -04:00
Brian Sperlongano f744f9c009
Upgrade to omt-tools v6, Imposm 0.11.1 and migrate SQL (#1246)
This PR migrates the SQL in the transportation and transportation_name layer to use the new imposm3 mappings which now map a separate primary key ID.
2021-10-14 11:38:28 -04:00
Matt Riggott ac577fe014
Remove mention of now-gone `make import-borders` (#1259)
After commit b4b897999d the `make import-borders` rule no longer exists, but it's still mentioned in the README a couple of times. This PR removes those references.

Some [cleanup files are also mentioned in `.env`](4d6945b935/.env (L42-L44)). I'm not sure if those lines can be removed too, because the variables are used in [`bin/import-borders`](3796c4eab0/bin/import-borders (L8-L10)) in the `openmaptiles/openmaptiles-tools` repo.
2021-10-14 07:14:03 +02:00
Yuri Astrakhan 5fb15d5c31
Re-create cache dir after destroying (#1263)
Cache dir should always exist, so after deleting it,
it must be recreated. This is done in `make init-dirs`,
but if gets destroyed here, it won't auto-recreate.
2021-10-13 15:54:19 -04:00
Brian Sperlongano aaa68048d9
Remove unneeded toll code (#1262)
This PR removes unneeded `CASE` clauses which converts `toll` tags to booleans.  However, the `toll` tag is already mapped as a boolean by imposm, therefore this processing can be simplified.
2021-10-13 20:43:14 +02:00
Matt Riggott 4d6945b935
Simplify landcover layer generalisation SQL (#1255)
I was reading through the SQL used to generalise the landcover layer ([`layers/landcover/generalized.sql`](596f44aa26/layers/landcover/generalized.sql)) and I noticed that when creating the generalised landcover tables for zooms 9-13, the SQL was doing something like this:

```sql
SELECT * FROM simplify_vw_z13 WHERE ST_NPoints(geometry) < 50
UNION ALL
SELECT * FROM simplify_vw_z13 WHERE ST_NPoints(geometry) >= 50 AND ST_NPoints(geometry) < 300
```

As in, the simplification/clustering of landcover generalisations was being done in two steps: once for polygons with fewer than fifty points, and once for polygons with 50+ points.

As far as I can see, there's no benefit to doing this — it's probably just an artefact of the dev work done for the [original pull request](https://github.com/openmaptiles/openmaptiles/pull/1035). Of course, I might be completely missing the reason for clustering polygons into two groups (<50 points and 50+ points). But assuming I haven't, I've created this pull request to simplify the SQL used in the generalisation, merging the two steps into something like this:

```sql
SELECT * FROM simplify_vw_z13 WHERE ST_NPoints(geometry) < 300
```

The effect is to slightly reduce the number of landcover features (polygons with <50 points can now be clustered/unioned with those 50+), and to reduce the time taken to generalise the landcover tables (in a small test using OSM's Iceland data I saw a 7% reduction in the time spent). It doesn't alter the features that are shown on the map.

Builds upon work from commits 4a1b0afa26 and da689f9e42.
2021-10-08 08:51:20 +02:00