Minor code cleanup:
SQL already returns NULL in the "WHEN" condition
if it is not matched by any of the cases.
Co-authored-by: Eva Jelinkova <evka.jelinkova@gmail.com>
Tag all SQL materialized views with a machine-readable comment
to indicate that this materialized view can be created without
data:
/* DELAY_MATERIALIZED_VIEW_CREATION */
In the next version of tools this comment can be optionally
replaced with the "WITH NO DATA" parameter, thus allowing
a much faster execution of the SQL script. All materialized
viewes will be populated with data in parallel afterwards
using the `refresh-views` tools script.
Simplify some of the OSM->OMT field value mappings using declarative syntax.
This approach is not for all cases, but in many it removes
the need of storing the same field in both the .yaml and .sql files.
TODO: support more complex AND/OR cases
Seems like etl and mapping diagrams have been neglected
for a long time. Now it regenerates the files and places
them in the source dir.
This PR also fixes two broken files:
* layers/aerodrome_label/mapping_diagram.png
* layers/housenumber/mapping_diagram.png
They were generated using the newest tools version with the fix
https://github.com/openmaptiles/openmaptiles-tools/pull/65
The `camp_site` subclass is assigned to the `campsite` class by an earlier statement"
```sql
WHEN subclass IN ('camp_site','caravan_site') THEN 'campsite'
```
The `fields` and `mapping` sections for `poi_point` and `poi_polygon` are the same, and must be the same for the SQL to work properly.
Using definitions avoids repetition and the need to make each change in these sections twice, as was already done for the subsections of `mapping`
* rail stations
* Create 'railway' POI class with 'station' and 'halt' subclasses
* Introduce subway stops as POI
* Revert unwanted changes in .env and openmaptiles.yaml
* Remove halt key from documentation
* Distinguish aeroway and railway station, add tram_stop