Wykres commitów

749 Commity (master)

Autor SHA1 Wiadomość Data
Frédéric Rodrigo a3ce04fe23
Add landuse=salt_pond as water (#1000)
Add salt pond as water.

Most of salt pond are already tagged with natural=water even if it's not required. So the load added by this tag is very light.
2020-09-29 07:53:35 +03:00
Frédéric Rodrigo c8f919e9d6
Better update of osm_important_waterway_linestring, use frist and last version of osm object (#997)
Current implementation of osm_important_waterway_linestring have two bugs:
* The distinct on is_old keep the oldest version of the old object, and the oldest version of the new object, but need the last version of the new object.
* Delete the old version of the object and rebuild the using the new version of the object. But we need to remove matchings the old and the new version of the object, then rebuild the two.

Then only delete and update using first and last version of the object, intermediate versions are ignored.

Similar implementation of what is done in #996.
2020-09-28 17:07:37 +03:00
Frédéric Rodrigo 8bb77b67a1
Diff update osm transportation name network linestring (#996)
Replacing materialized view by a tables with update from trigger on change only.

Differential update of `osm_transportation_name_linestring`, `osm_transportation_name_linestring` and `osm_transportation_name_linestring_genX`).

At the end of the transaction the dependent rows are updated.

The goal is to update more quickly the content of derivated tables by just updating the changing content. It replaces the update of materialized view because their need a full recompute (with lock issue).

It is the last part of the replacement of materialized view for the transportation layer.

It addresses #814 and a part of #809.
2020-09-28 15:56:10 +03:00
Frédéric Rodrigo 47cdfc2c8b
Move where condition from osm_transportation_name_linestring to materialized view osm_transportation_name_network (fix) (#993)
On PR #991 the differential update was not updated like the main code.

Make similar change to the update code.
2020-09-23 11:10:59 +03:00
Eva Jelinkova f7d7a0ced3
Housenumbers - diff update, multipolygons (#990)
Following https://github.com/openmaptiles/openmaptiles/pull/983 - removing points also on multipolygons and checking only new geometry when updated.
2020-09-21 14:47:55 +03:00
zstadler 45f5b53c9c
Stitch `transportation_name` by all language tags (#989)
When OSM roads in the `transportation_name` layer are stitched together, their grouping does not consider all `name:*` tags.
As a result, roads with different `name:*` tags may be stitched together.

The `waterway` layer performs the grouping properly, for the same purpose:
1685eaccbd/layers/waterway/update_important_waterway.sql (L34)

Co-authored-by: Frédéric Rodrigo <fred.rodrigo@gmail.com>
2020-09-21 12:38:13 +03:00
Frédéric Rodrigo 5c640daf4f
Move where condition from osm_transportation_name_linestring to materialized view osm_transportation_name_network (#991)
Reduce the size of the materialized view osm_transportation_name_network by moving the weare clause.
osm_transportation_name_network is only used for osm_transportation_name_linestring.

Co-authored-by: zstadler <zeev.stadler@gmail.com>
2020-09-21 10:02:20 +03:00
Frédéric Rodrigo 550b1f8f90
Replace materialized view osm_transportation_name_network by a table with diff update (#987)
Replacing materialized view by a tables with update from trigger on change only.

The osm_id of object changing on table osm_route_member and osm_highway_linestring are logged.
At the end of the transaction the dependent row of osm_transportation_name_network are updated.

The goal is to update more quickly the content of derivated tables by just updating the changing content. It replaces the update of materialized view because their need a full recompute (with lock issue).

Note, it is only a part of the materialized view of the transportation layer, I am also working on the other parts, other parts are in #892 (omaterialized view on sm_transportation_name_linestring and osm_transportation_name_linestring_genX).

It addresses #814 and a part of #809.
2020-09-18 16:49:55 +03:00
Taro Matsuzawa aka. btm 1685eaccbd
#766 remove housenumbers inside polygon and same number (#983) 2020-09-16 17:06:48 +02:00
Frédéric Rodrigo df56b75719
Clean update_route_member.sql (#981)
Clean and do refactoring on `update_route_member.sql` as first step to replace materialized view osm_transportation_name_network by tables with diff update. See #892.
2020-09-14 19:13:32 +03:00
Jorge Sanz bd444c0d1a
Show more state borders at low zoom levels (#979)
* Change NE 50m by NE 10m state provinces dataset

* update documentation

Fixes #977 

This PR implements the change discussed at #977 to replace Natural Earth 10m states and provinces by the 50m version, since the 10m only covers state borders for US, Canada, Brazil, and Australia.

A few remarks:

* This change only affects zooms 1 to 4, not making any change in borders based in the `OSM Borders`  source. 
* The `min_zoom<=7` shows the first level regions (level 4 in OSM) as you can check for example for France, Italy, or Spain.
* I don't think it's necessary to simplify the geometries, it would mean adding a new materialized view, or a slower tile generation process.
* This change does not need any change in the styles, even someone could argue it could be interesting to add the country code in this layer as a new field, allowing style editors to filter features by country, but I would prefer to leave that change for another PR.
2020-09-10 09:41:43 +03:00
Eva Jelinkova 1356d724d4
adding disputed_name to NE sources (#976)
`disputed_name` is filled for disputed lines of NaturalEarth sources - it contains `ogc_fid` as suggested in https://github.com/openmaptiles/openmaptiles/issues/964. This way it is possible to filter disputed lines in style.
2020-09-03 21:09:15 +03:00
Jorge Sanz 194b2fbb70
Add state labels at low zoom levels (#969)
* Remove state labels zoom, rank, and country conditions from layer function

* Don't add labels for zooms 0 and 1

If we check Bright, Positron, or Dark styles, they all show a huge lack of data about states and regions. At zoom 2, for big countries like Canada, Brazil, China or Australia there are big patches of white space (aka cartographer's *horror vacui* 😅)
2020-09-02 09:02:43 +03:00
Frédéric Rodrigo 04d1b66e67
Incremental update marine point (#952)
Replacing update on the whole table with an update only on changed rows.

The goal is to update more quickly by just updating the changing content.
The update now focus on osm_id of changed rows, it use index. Add a where clause tags != update_tags(tags, geometry) to ensure only update when changed.

It requires one more trigger and a table to store changed osm_id.

The UPDATE is keep in a function to be reusable for initial setup and trigger update.

It is a based on the already merged https://github.com/openmaptiles/openmaptiles/pull/944

It is a separated PR as less obvious than previous. It replaces the reset of the `rank` field to NULL by missing value resulting of `LEFT JOIN`. It avoid triggering a new update on the table by reset the value then re-seting it to initial or new value.

It addresses #814.

Thanks @frodrigo
2020-08-30 16:16:54 +03:00
Frédéric Rodrigo 82616eaac0
Make update_city_point use incremental update #814 (#951)
Replacing update on the whole table with an update only on changed rows.

The goal is to update more quickly by just updating the changing content.
The update now focus on osm_id of changed rows, it use index. Add a where clause tags != update_tags(tags, geometry) to ensure only update when changed.

It requires one more trigger and a table to store changed osm_id.

The UPDATE is keep in a function to be reusable for initial setup and trigger update.

It is a based on the already merged https://github.com/openmaptiles/openmaptiles/pull/944

It is a separated PR as less obvious than previous. It replaces the reset of the `rank` field to NULL by missing value resulting of `LEFT JOIN`. It avoid triggering a new update on the table by reset the value then re-seting it to initial or new value.

It addresses #814.

Thanks @frodrigo
2020-08-30 15:29:50 +03:00
Frédéric Rodrigo bb2a4328f3
Make more simple incremental update (#944)
Replacing update on the whole table with an update only on changed rows.

The goal is to update more quickly by just updating the changing content.
The update now focus on osm_id of changed rows, it use index. Add a where clause tags != update_tags(tags, geometry) en ensure only update when changed.

It requires one more trigger and a table to store changed osm_id.

The UPDATE is keep in a function to be reusable for initial setup and trigger update.

I try many code layout before done it in this way with the goal to keep the code for initial pass and for update. It should have low impact on initial data load. Better performance for row update can be achieve with BEFORE UPDATE, but require to duplicate the logic.

It is not based on the already merged https://github.com/openmaptiles/openmaptiles/pull/896 because calling and update within a function for each updated row was not efficient for larger table (like housenumber).

It addresses #814.


* Remake update_peak_point use incremental update #814

* Make update_aerodrome_label_point use incremental update #814

* Make housenumber_centroid use incremental update #814

* Make update_continent_point use incremental update #814

* Make update_island_point use incremental update #814

* Make update_island_polygon use incremental update #814

* Remove dead code in update_state_point.sql

* Make update_state_point use incremental update #814

* Remove dead code in update_country_point.sql

* Make update_country_point use incremental update #814

* Make osm_poi_polygon use incremental update #814

Thanks @frodrigo
2020-08-28 11:03:27 +02:00
Frédéric Rodrigo 232379b3ca
Do insensitive case compare using lower() and not ILIKE (#961)
* Replace ILIKE by lower() for insensitive case compare

* Refactoring SQL insensitive case compare
2020-08-06 09:14:47 +02:00
Frédéric Rodrigo 9bb17792a6
Remove alignment of AS in SQL and few others (#932)
* Remove alignment of AS in SQL

* Remove alignment of CREATE TABLE in SQL
2020-07-22 13:48:25 +02:00
Frédéric Rodrigo 13aaa404d9
Fix More fail safe incremental update on water_lakeline and water_point (#949) (#950) 2020-07-22 12:17:33 +02:00
Frédéric Rodrigo 098f2d1ce2
Fix peak doc (#941) 2020-07-21 18:05:46 +02:00
Frédéric Rodrigo dd1b2d3b15
More fail safe incremental update on water_lakeline and water_point (#949)
Improve 97216c5c19 and #853

In case of replay update it may fails because of already existing primary key on osm_id.

Add a on conflict clause to make it fail safe.
2020-07-21 17:35:49 +02:00
Tomas Pohanka c86f4a557a
Build aggregation on zoom level 13 (#936)
* Building aggregation at zoom 13
2020-06-18 14:01:06 +02:00
Frédéric Rodrigo 6ac544fc96
Make update_osm_peak_point use incremental update #814 (#896)
Thanks a lot @frodrigo.
2020-06-17 19:58:12 +02:00
Yuri Astrakhan 2b95d1cffa
Fix & optimize incorrect function declarations (#918)
* All functions that access database must be declared as `STABLE`, not `IMMUTABLE` -- because database can change at any moment, e.g. during an update
* there are a few functions that could be made `STRICT` -- passing `NULL` as a parameter will always result in a `NULL`, but for some reason that causes a significant decrease in perf.
* tagged one function as parallel safe

NOTE: somehow `ST_AsMVT()` method of tile generation is showing 70-90% slowdown with this patch. I am not sure of why this is happening. If the reason is the `IMMUTABLE` -> `STABLE` change, we may have to dig deeper into PG optimization
2020-06-17 12:15:26 -04:00
Yuri Astrakhan f889853cb6
aerodrome_label: Remove unused function parameter (#919)
Minor optimization - in function `layer_aerodrome_label(bbox, zoom_level, pixel_width)` last parameter is not being used, so removing.
2020-06-11 14:24:55 -04:00
zstadler 5e65ac8c52
Add area-base filtering for park names in lower zoom levels (#911)
Resolve https://github.com/openmaptiles/openmaptiles/issues/776

Thanks @zstadler for this PR.
2020-06-09 10:53:18 +02:00
Yuri Astrakhan 0b1511d60d
NOOP water - Move updating sql into separate file (#920)
Use `update_water.sql` for all queries that update db
to be consistent with the other layers.
2020-06-08 12:32:09 -04: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
Jan-Philipp Benecke 99c6be722d
Add "shop=car_parts" (#874)
Thanks
2020-05-27 16:08:53 +02:00
Frédéric Rodrigo 495e8bd370
Align update.sql file naming to other layers (#897)
Code clean.

Use the same naming convention for the SLQ update file as other layer.
2020-05-26 21:03:07 +02:00
Frédéric Rodrigo 6feefb4145
Use osm_id as feature id for building layer (#827)
Change the feature_id of objects in the tiles from arbitrary number to osm_id.

From discussion here https://github.com/openmaptiles/openmaptiles/pull/725#issuecomment-619059931

Note the multiploygon building are load with negative relation osm_id. But the use in feature_id do an overflow (eg -7980888 -> 18446744073701570000). We can keep as is or not.

No stats done for yet. Trying to let the CI do it.
2020-05-26 20:44:36 +02:00
Yuri Astrakhan d0ff8be5f4
Use CleanNumeric in buildings layer (#858)
`nullif(as_numeric(height),-1)` is doing a double conversion -- null into -1 followed by -1 back into null. Remove that, and delete unused `as_numeric`
2020-05-24 16:59:35 -04:00
Frédéric Rodrigo 2622c5bfac
Update route member tagging support of Trans-Canada Highway (#864)
* Fix space at start in update_osm_route_member()

* Update Canada network route name

* Update Canadian route network
2020-05-22 15:52:51 +02:00
Frédéric Rodrigo e808590a4a
Add landuse=basin as water (#876)
Add support of tag landuse=basin as water polygon.
2020-05-22 14:45:18 +02:00
Jan-Philipp Benecke f5d34b5949
Mapping leisure=swimming_pool as water (#878)
Adds tag leisure=swimming_pool as water polygon
2020-05-22 10:31:47 +02:00
Yuri Astrakhan bac0f25b1d
Remove parallel safe on layer_building for now (#882)
layer_building uses osm_all_buildings, which uses a
non-parallel-safe as_numeric.  Marking it as non-parallel safe
for now until we switch to CleanNumeric later.
2020-05-20 13:38:11 -04:00
Frédéric Rodrigo 97216c5c19
Replace materialized view of water by tables with diff update (#853)
Replacing materialized view by a tables with update from trigger on change only.

Start with the most simple cases.

Just replicate the change on:
* `osm_water_polygon` to `osm_water_lakeline`,
* `osm_water_polygon` to `osm_water_point`.

Use a view to factorize the `osm_water_lakeline` and `osm_water_point_view` definition and reuse it in the trigger.

The update of `osm_important_waterway_linestring` is more complex, as it is a merge of `osm_waterway_linestring`. It not done in the same way. At the end of the transaction we remove impacted and recompute them.

The goal is to update more quickly the content of derivated table by just updating the changing content. It replaces the update of materialized view because their need a full recompute (with lock issue).

Note, an advanced version of differential update over materialized view as already implemented in the building cluster PR #725.

It addresses #814 and a part of #809.
2020-05-20 13:14:22 -04:00
Frédéric Rodrigo dcee493da6
Simplify update_gbr_route_members() (#870)
Code cleaning.

The function `update_gbr_route_members()` use two sub queries, but only one is relay needed.
2020-05-15 11:24:57 -04:00
Frédéric Rodrigo 9f9facc8c6
Remove support of relation type=associatedStreet, few valuable data, most false positive (#841)
Thank you @frodrigo for PR.
2020-05-07 14:37:00 +02:00
Eva Jelinkova 11566f89c7
adding more data in zoom 7 and 8 (#617) 2020-05-07 11:01:58 +02:00
Yuri Astrakhan 0cae7b9fd6
Upgrade to tools v5 - rm import-osm, new downloader... (#785)
Update to tools v5. See https://github.com/openmaptiles/openmaptiles-tools/releases/tag/v5.0.0 for the list of all changes. Other OMT-repo specific changes:

* removes `import-osm` docker usage, replacing it with `openmaptiles-tools`
* quickstart builds faster because it uses postgres with preloaded water, natural earth, and lake centerlines tables.

### Makefile targets
* `tools-dev` will open a shell in a docker to experiment and debug (instead of `import-sql-dev` and `import-osm-dev`)
* separated `start-maputnik` from `start-postserve`
* renamed `clean-docker` into `db-destroy` to make it more explicit
* cleaner `db-start`, `db-stop`, `db-destroy` targets
* `db-start-preloaded` is the same as `db-start`, except that it uses `postgis-preloaded` -- an image with preloaded water, natural-earth, and lake centerline data
* `db-start` will not recreate the container if it already exists -- this way if it was started as preloaded, it will not be rebuilt.
* better output messages

### Quickstart
* uses `postgis-preloaded` image by default to make quickstart quicker.  To start with a clean db, pass 2 parameters to quickstart, e.g. `./quickstart.sh albania empty`
2020-05-05 11:53:09 -04:00
Frédéric Rodrigo 99f9336e5e
Merge ways and relations fetch from table osm_building_polygon (#757)
Build on top of PR #755, to be merged first.

Since we want every thing from osm_building_polygon (osm_id >= 0 and osm_id < 0), we can merge the two queries.

Note: the obp.osm_id >= 0 on the left join only apply to the left join part.
2020-04-29 16:03:22 +02:00
Kyle Barron cc6fccb4df
Add amenity=drinking_water (#765)
* Add amenity=drinking_water

Fixes #569.

From test:
Generated 118,970 tiles in 0:06:20.7, 312.4 tiles/s +1.3%, 155.5 bytes/tile +0.0%

* updated devdoc image  - Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
2020-04-28 12:51:26 +02:00
Frédéric Rodrigo 86a6f93b29
Micro SQL improvement of building layer (#755)
Thank you @frodrigo for this improvement.
2020-04-28 12:05:58 +02:00
Frédéric Rodrigo cb2cc09d20
Remove support of relation type=street, few valuable data, most false positive (#754)
Thank you @frodrigo for this PR. Tests are looking good.
2020-04-28 10:36:44 +02:00
Frédéric Rodrigo 5da406f4a2
Filter osm_building_polygon on polygon (#758) 2020-04-23 08:23:52 +02:00
Frédéric Rodrigo 8f9770e546
Reorder POI data update and trigger creation to avoid refresh of materialized view on initial import (#780)
Reorder POI data update and trigger creation to avoid refresh of materialized view after update done by initial import.

I checked the other updates and there are OK.
2020-04-22 03:03:10 -04:00
Yuri Astrakhan 0683185717
Add `requires` to 2 layer definitions (#797)
Mark waterway and transoprtation_name as having a dependency on another layer.
This is currently an unused parameter, but tools will use it later for faster
sql code generation.

Closes #796
2020-04-21 12:36:44 -04:00
Frédéric Rodrigo b850819218
Narrow osm_building_relation_building_idx with condition building = '' (#771) 2020-04-21 11:12:29 +02:00
zstadler 2584489ad7
Continue conflict resolution 2020-04-04 13:16:59 +03:00
zstadler 88e9127bfd
Merge branch 'master' into protected_area 2020-04-04 12:50:03 +03:00
Ludovic Delauné 924ccd6015
remove useless sql selection (#752) 2020-03-13 15:14:30 -04:00
Yuri Astrakhan 2edbbfa1a0 Updated etl diagrams from latest tools
* gets rid of duplicate connecting lines in etl graphs
2020-02-14 16:22:48 -05:00
Yuri Astrakhan a803bc3d11
cleanup trailing spaces (#777)
minor noop
2020-02-11 01:13:01 -05:00
Jorge Sanz ace759590e
Parallel capability to layer functions (#728)
This PR allows queries to be parallelized on recent versions of Postgres. The `PARALLEL SAFE` modifier has been added to the layer functions and a PLPGSQL function to convert strings into number has been replaced.

`PARALLEL SAFE` is a modifier for `CREATE FUNCTION` available since Postgres 9.6, so this change does not break current OpenMapTiles supported database version. More details about this topic [here](https://www.postgresql.org/docs/current/parallel-safety.html) and at the reference documentation for [`CREATE FUNCTION`](https://www.postgresql.org/docs/current/sql-createfunction.html).

### Testing procedure

The procedure to test this was:

* Imported `spain.pbf` in a clean environment
* Dumped the OpenMapTiles database from the Postgres Docker image
* Created a clean Postgres 12 database using the default Docker image
* Installed `postgis` 3 from the default Debian package and `osml10n` 2.5.8 from the repository (`make`, etc.)
* Restored the dump
* Lowered the postgres planner parameters for triggering parallel plans:
```sql
set parallel_setup_cost = 5;
set parallel_tuple_cost = 0.005;
```
* Manually added the `PARALLEL SAFE` modifier to each function involved in layer queries (not on updates or inserting functions).
* For each layer, run a testing query to confirm parallel workers were created, something like this:
```sql
explain analyze 
select * from layer_aerodrome_label(tilebbox(8,128,95),10,null)
union all
select * from layer_aerodrome_label(tilebbox(8,128,97),10,null);
```
* After all the layers were processed and confirmed to start parallel executions, a more complete example was run. This example just retrieves the geometries for all the layers from the same tile but without using any MVT related function.

<details><summary>Testing query</summary>

```sql
-- Using the function layer_landuse
explain analyze 
select geometry from layer_water(tilebbox(14,8020,6178),14)
union all
select geometry from layer_waterway(tilebbox(14,8020,6178),14)
union all
select geometry from layer_landcover(tilebbox(14,8020,6178),14)
union all
select geometry from layer_landuse(tilebbox(14,8020,6178),14)
union all
select geometry from layer_mountain_peak(tilebbox(14,8020,6178),14)
union all
select geometry from layer_park(tilebbox(14,8020,6178),14)
union all
select geometry from layer_boundary(tilebbox(14,8020,6178),14)
union all
select geometry from layer_aeroway(tilebbox(14,8020,6178),14)
union all
select geometry from layer_transportation(tilebbox(14,8020,6178),14)
union all
select geometry from layer_building(tilebbox(14,8020,6178),14)
union all
select geometry from layer_water_name(tilebbox(14,8020,6178),14)
union all
select geometry from layer_transportation_name(tilebbox(14,8020,6178),14)
union all
select geometry from layer_place(tilebbox(14,8020,6178),14)
union all
select geometry from layer_housenumber(tilebbox(14,8020,6178),14)
union all
select geometry from layer_poi(tilebbox(14,8020,6178),14)
union all
select geometry from layer_aerodrome_label(tilebbox(14,8020,6178),14);
```
</details>

You can inspect the execution plan and results on [this page](https://explain.dalibo.com/plan/3z). Also [attaching](https://github.com/openmaptiles/openmaptiles/files/3951822/explain-tile-simple.tar.gz) the query and JSON output for future reference. The website gives a ton of details, but you may want to search for nodes mentioning `workers` or `parallel` like in this area referring to `osm_border` or `osm_aeroway_linestring` entities

![image](https://user-images.githubusercontent.com/188264/70647153-9cac9300-1c48-11ea-96ea-ac7a1e2f4a79.png)

### Next steps

Since the execution plan is not showing a parallel append at the top level, meaning it's not running each layer individually, I want to continue experimenting with parameters and queries to see if it's possible to even parallelize more the request.

I will post my finding here, even no change in the code should happen.


cc. @nyurik

Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
2020-01-31 19:36:02 -05:00
Frédéric Rodrigo b1eeff573e
Remove table building_multipolygon as multipolygon are already in table osm_building_polygon (#756)
Buildings from ways and multipolygons are loaded in table `osm_building_polygon`. But a table for `osm_building_multipolygon` is also loaded, the content is not used except to ensure an `osm_id` is from a multipolygon. To check if the object is from a multipolygon we have only to check if `osm_id` is negative. It is the counter part of e0c8ece375/layers/building/building.sql (L89)

I checked the objects are the same after this change.
2020-01-31 19:34:08 -05:00
Yuri Astrakhan 6801353e15
Declared field mapping 2 (#734)
Make a few more mappings declarative, and removes values declared in both SQL and the yaml file.

Here's the diff comparing `build/tileset.sql` in master vs the new PR. The changes are mostly stylistic, except when a nested `if` statement is expanded into individual `if ... and ...` conditions (logically identical)

```diff
55c55
diff --git a/build/tileset.sql b/build/tileset.sql
index 4e59357..7c6c444 100644
--- a/build/tileset.sql
+++ b/build/tileset.sql
@@ -52,7 +52,7 @@ CREATE INDEX IF NOT EXISTS osm_ocean_polygon_gen4_idx ON osm_ocean_polygon_gen4
 CREATE OR REPLACE FUNCTION water_class(waterway TEXT) RETURNS TEXT AS $$
     SELECT CASE
            WHEN "waterway" IN ('', 'lake') THEN 'lake'
-           WHEN "waterway"='dock' THEN 'dock'
+           WHEN "waterway" = 'dock' THEN 'dock'
            ELSE 'river'
    END;
 $$ LANGUAGE SQL IMMUTABLE;
@@ -1813,24 +1813,41 @@ CREATE OR REPLACE FUNCTION highway_class(highway TEXT, public_transport TEXT, co
         WHEN "highway" IN ('tertiary', 'tertiary_link') THEN 'tertiary'
         WHEN "highway" IN ('unclassified', 'residential', 'living_street', 'road') THEN 'minor'
         WHEN "highway" IN ('pedestrian', 'path', 'footway', 'cycleway', 'steps', 'bridleway', 'corridor')
-            OR "public_transport"='platform'
+            OR "public_transport" = 'platform'
             THEN 'path'
-        WHEN "highway"='service' THEN 'service'
-        WHEN "highway"='track' THEN 'track'
-        WHEN "highway"='raceway' THEN 'raceway'
-        WHEN highway = 'construction' THEN CASE
-          WHEN construction IN ('motorway', 'motorway_link') THEN 'motorway_construction'
-          WHEN construction IN ('trunk', 'trunk_link') THEN 'trunk_construction'
-          WHEN construction IN ('primary', 'primary_link') THEN 'primary_construction'
-          WHEN construction IN ('secondary', 'secondary_link') THEN 'secondary_construction'
-          WHEN construction IN ('tertiary', 'tertiary_link') THEN 'tertiary_construction'
-          WHEN construction IN ('', 'unclassified', 'residential', 'living_street', 'road') THEN 'minor_construction'
-          WHEN construction IN ('pedestrian', 'path', 'footway', 'cycleway', 'steps', 'bridleway', 'corridor')
-              OR public_transport = 'platform' THEN 'path_construction'
-          WHEN construction = 'service' THEN 'service_construction'
-          WHEN construction = 'track' THEN 'track_construction'
-          WHEN construction = 'raceway' THEN 'raceway_construction'
-        END
+        WHEN "highway" = 'service' THEN 'service'
+        WHEN "highway" = 'track' THEN 'track'
+        WHEN "highway" = 'raceway' THEN 'raceway'
+        WHEN "highway" = 'construction'
+            AND "construction" IN ('motorway', 'motorway_link')
+            THEN 'motorway_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" IN ('trunk', 'trunk_link')
+            THEN 'trunk_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" IN ('primary', 'primary_link')
+            THEN 'primary_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" IN ('secondary', 'secondary_link')
+            THEN 'secondary_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" IN ('tertiary', 'tertiary_link')
+            THEN 'tertiary_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" IN ('', 'unclassified', 'residential', 'living_street', 'road')
+            THEN 'minor_construction'
+        WHEN "highway" = 'construction'
+            AND ("construction" IN ('pedestrian', 'path', 'footway', 'cycleway', 'steps', 'bridleway', 'corridor') OR "public_transport" = 'platform')
+            THEN 'path_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" = 'service'
+            THEN 'service_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" = 'track'
+            THEN 'track_construction'
+        WHEN "highway" = 'construction'
+            AND "construction" = 'raceway'
+            THEN 'raceway_construction'
     END;
 $$ LANGUAGE SQL IMMUTABLE;
 
@@ -4073,6 +4090,12 @@ RETURNS TEXT AS $$
         WHEN "subclass" IN ('fast_food', 'food_court') THEN 'fast_food'
         WHEN "subclass" IN ('park', 'bbq') THEN 'park'
         WHEN "subclass" IN ('bus_stop', 'bus_station') THEN 'bus'
+        WHEN ("subclass" = 'station' AND "mapping_key" = 'railway')
+            OR "subclass" IN ('halt', 'tram_stop', 'subway')
+            THEN 'railway'
+        WHEN "subclass" = 'station'
+            AND "mapping_key" = 'aerialway'
+            THEN 'aerialway'
         WHEN "subclass" IN ('subway_entrance', 'train_station_entrance') THEN 'entrance'
         WHEN "subclass" IN ('camp_site', 'caravan_site') THEN 'campsite'
         WHEN "subclass" IN ('laundry', 'dry_cleaning') THEN 'laundry'
@@ -4082,7 +4105,7 @@ RETURNS TEXT AS $$
         WHEN "subclass" IN ('hotel', 'motel', 'bed_and_breakfast', 'guest_house', 'hostel', 'chalet', 'alpine_hut', 'dormitory') THEN 'lodging'
         WHEN "subclass" IN ('chocolate', 'confectionery') THEN 'ice_cream'
         WHEN "subclass" IN ('post_box', 'post_office') THEN 'post'
-        WHEN "subclass"='cafe' THEN 'cafe'
+        WHEN "subclass" = 'cafe' THEN 'cafe'
         WHEN "subclass" IN ('school', 'kindergarten') THEN 'school'
         WHEN "subclass" IN ('alcohol', 'beverages', 'wine') THEN 'alcohol_shop'
         WHEN "subclass" IN ('bar', 'nightclub') THEN 'bar'
@@ -4098,9 +4121,6 @@ RETURNS TEXT AS $$
         WHEN "subclass" IN ('bag', 'clothes') THEN 'clothing_store'
         WHEN "subclass" IN ('swimming_area', 'swimming') THEN 'swimming'
         WHEN "subclass" IN ('castle', 'ruins') THEN 'castle'
-        WHEN (subclass = 'station' AND mapping_key = 'railway')
-          OR (subclass IN ('halt', 'tram_stop', 'subway')) THEN 'railway'
-        WHEN (subclass = 'station' AND mapping_key = 'aerialway') THEN 'aerialway'
         ELSE subclass
     END;
 $$ LANGUAGE SQL IMMUTABLE;
@@ -4301,22 +4321,22 @@ $$
     COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de,
     tags,
     CASE
-      WHEN "aerodrome"='international'
-          OR "aerodrome_type"='international'
+      WHEN "aerodrome" = 'international'
+          OR "aerodrome_type" = 'international'
           THEN 'international'
-      WHEN "aerodrome"='public'
-          OR "aerodrome_type"='civil'
+      WHEN "aerodrome" = 'public'
+          OR "aerodrome_type" = 'civil'
           OR "aerodrome_type" LIKE '%public%'
           THEN 'public'
-      WHEN "aerodrome"='regional'
-          OR "aerodrome_type"='regional'
+      WHEN "aerodrome" = 'regional'
+          OR "aerodrome_type" = 'regional'
           THEN 'regional'
-      WHEN "aerodrome"='military'
+      WHEN "aerodrome" = 'military'
           OR "aerodrome_type" LIKE '%military%'
-          OR "military"='airfield'
+          OR "military" = 'airfield'
           THEN 'military'
-      WHEN "aerodrome"='private'
-          OR "aerodrome_type"='private'
+      WHEN "aerodrome" = 'private'
+          OR "aerodrome_type" = 'private'
           THEN 'private'
       ELSE 'other'
     END AS class,
```
2020-01-31 00:22:21 -05:00
zstadler 5657ede450 Add `boundary=protected_area` parks
Update the **class** of the **park* layer in a backward-compatible way.

The class for `boundary=protected_area` parks is the lower-case of the
[`protection_title`](http://wiki.openstreetmap.org/wiki/key:protection_title)
value with blanks replaced by `_`.
`national_park` is the class of `protection_title=National Park` and `boundary=national_park`.
`nature_reserve` is the class of `protection_title=Nature Reserve` and `leisure=nature_reserve`.
The class for other [`protection_title`](http://wiki.openstreetmap.org/wiki/key:protection_title)
values is similarly assigned.

Resolve https://github.com/openmaptiles/openmaptiles/issues/760
2020-01-27 11:12:57 +02:00
Yuri Astrakhan 9d6dbfc64f
Use one pass docs image generation (#751)
quicker and cleaner diagram image generation.
Remove etl-graph and mapping-graph targets - redundant

Also, the obsolete "fields" is still in Imposm's code and both names are accepted,
but "fields" is not documented anywhere (PR submitted), and could be removed at any moment.

Our docs were not supporting it until this PR, so renaming it at the same time.

Several images have been updated due to a more inclusive mapping scan
Requires https://github.com/openmaptiles/openmaptiles-tools/pull/147 (merged)
2020-01-22 21:55:22 -05:00
Yuri Astrakhan c9e7ad90c6
Remove unneeded "else null" in conditions (#732)
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>
2020-01-22 17:24:28 -05:00
Yuri Astrakhan 1bc3f138b4
Create boundary materialized views (#740)
* Move simplified border tables to OMT as MAT VIEWs

Consolidate derived table creation in OMT repository.
Move all non-original simplified geometry tables from import-osmborder
image to this repo, allowing further optimization.

Later we can remove derived table creation fro mthe import-osmborder image.
2020-01-21 09:44:29 -05:00
Yuri Astrakhan e6e92036a0
Use _resolve_wikidata in layer mapping.yaml (#731)
Mark all tables that should not be populated with the Wikidata
international labels with a special OMT-specific flag.

This should be ok to merge even before the new tools version
is used because imposm seems to ignore anything it doesn't understand.

The next tools version will remove it when generating imposm mapping file.
2020-01-21 09:43:21 -05:00
Yuri Astrakhan 11f4856d48
Add simplified water materialized views (#739)
Move materialized view creation from the tools repo.

This PR should be merged before the https://github.com/openmaptiles/openmaptiles-tools/pull/115

Merge the other PR shortly after this one to avoid doing the same work twice - first creating simplified table, then dropping it and recreating them as materialized views.
2020-01-20 12:12:19 -05:00
Yuri Astrakhan 1d91b9ef6e
Noop: tag sql MAT VIEWS with a special comment (#733)
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.
2020-01-20 12:02:49 -05:00
Yuri Astrakhan 1614a4656c Manage field mapping in SQL declaratively
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
2019-12-19 11:25:29 -05:00
Eva Jelinkova 9f00db0245
Merge pull request #747 from eva-j/water_z4
Change NE source of lakes in zoom 4
2019-12-19 11:31:12 +01:00
Eva J 4c43c6ea3b add data types for boundary_z0 2019-12-18 19:31:28 +01:00
Eva J c40e092381 lakes z4 2019-12-18 09:14:47 +01:00
Yuri Astrakhan 358939e912
etl graph update, add graph test to travis (#741)
* etl graph update

re-ran `make generate-devdoc` which updated landuse graph

* Add travis test to check docs are up to date
2019-12-16 08:37:34 -05:00
Eva Jelinkova afb9ccfa84
Merge pull request #730 from eva-j/723_water_sources
Changing ocean data source in z6-7
2019-12-12 19:05:27 +01:00
Eva Jelinkova dae8e055ae
Merge pull request #720 from lun/add-garages
Add garages
2019-12-12 19:04:26 +01:00
Eva Jelinkova d82ede81ce
Merge pull request #727 from eva-j/disp_borders_rel
Disputed borders - adding relations with claimed_by
2019-12-12 19:03:06 +01:00
Eva J 8ff4a5acb4 changing ocean data source in z6-7 2019-12-12 12:44:32 +01:00
Eva J 6381451964 just newlines 2019-12-12 09:48:35 +01:00
Eva Jelinkova 02c202e2f7
Revert "Remove the area condition on highway polygon." 2019-12-11 22:22:59 +01:00
Eva Jelinkova a049d88db8
Merge pull request #721 from frodrigo/building_poly
Filter building on polygons
2019-12-11 17:55:02 +01:00
Eva J fee22d4eb9 adding disp. relations into z1-4 2019-12-11 12:05:42 +01:00
Eva J 0181513b1a 2 attributes, generalization in mapping, edit unions 2019-12-10 19:48:24 +01:00
Eva J fd940684eb relation member values, diagrams 2019-12-10 08:49:54 +01:00
Eva Jelinkova b97d6de626
Merge pull request #718 from frodrigo/golf_grass
Add leisure=golf_course, map it to grass
2019-12-09 15:21:07 +01:00
Eva J 89815c04cf mapping_diagram update 2019-12-09 14:48:52 +01:00
Frédéric Rodrigo e0c8ece375 Filter building index on polygons 2019-12-09 11:03:21 +01:00
Eva J a05228381a add relations with claimed_by 2019-12-07 12:18:06 +01:00
golubev 7f591ffebc update the 'layers/landuse/mapping_diagram.png' 2019-12-06 19:48:56 +02:00
golubev 1247972951 merge master into add-garages 2019-12-06 19:40:12 +02:00
Frédéric Rodrigo f916e29be0 Add leisure=golf_course, map it to grass 2019-11-29 13:43:10 +01:00
Eva J b62619c00c etl_diagram update 2019-11-27 12:50:24 +01:00
Eva J 60b4a4cebc removing ne_10m source 2019-11-27 11:51:15 +01:00
Eva Jelinkova 9bfdefca31
Merge pull request #708 from eva-j/637_webmerc_area
Removing webmerc_area field from mapping.yaml
2019-11-26 15:46:28 +01:00
Eva Jelinkova dfaf8e3cc8
Merge pull request #713 from eva-j/621_landuse_dam
Adding waterway=dam to landuse layer
2019-11-26 15:39:21 +01:00
Eva J fcee8571fb adding waterway=dam 2019-11-20 18:05:07 +01:00
Yuri Astrakhan 39dcfc2072
Fix missing description for the new brunnel field (#709) 2019-11-19 14:47:34 -05:00
Eva J 90c4854184 removing webmerc_area 2019-11-19 16:36:00 +01:00
Eva J 062e2c89b0 adding disputed for NE sources 2019-11-07 18:07:15 +01:00
Eva J 11c07bfbed waterway - edit docs 2019-11-06 16:40:37 +01:00
Eva Jelinkova 67672de287
Merge pull request #646 from osmontrouge/refactor-landcover
Add a subclass column from the mapping_value to clean the landcover layer
2019-11-05 19:24:55 +01:00
François de Metz cf219c1e09
Include only polygons and multipolygons highways on zoom >= 13. 2019-11-05 12:31:54 +01:00
Eva Jelinkova 6ea4cde691
Merge branch 'master' into refactor-landcover 2019-11-05 12:02:37 +01:00
Eva Jelinkova 3f65811cda
Merge pull request #663 from frodrigo/more_grass
Map fell, heath, scrub and tundra like grassland, as 'grass'
2019-11-05 10:00:35 +01:00
Eva Jelinkova f440fa53bc
Merge pull request #679 from QwantResearch/upstream-water
add brunnel info for water
2019-11-04 18:32:55 +01:00
golubev fd120ff8ca layers/transportation_name/mapping_diagram.png: update the diagram 2019-11-04 14:25:11 +02:00
golubev 8a5541a78e merge master into add-garages 2019-11-04 13:48:18 +02:00
Sergii Golubev 8dcb8a3192 close #657: limit mountain_peak's 'ele' tag to 10000 (#658)
* close #657: limit mountain_peak's 'ele' tag to 10000

* layers/mountain_peak/layer.sql: implement a more elegant 'ele' filter
2019-11-04 06:14:55 -05:00
golubev 05e77f6870 merge master into add-garages 2019-11-04 13:12:34 +02:00
Taro Matsuzawa af7f96ac94 fix typo: hourse -> horse 2019-11-03 14:36:06 +09:00
Frédéric Rodrigo a2917a9323 Map fell, heath, scrub and tundra like grassland, as 'grass' 2019-11-02 21:14:51 +01:00
Yuri Astrakhan 73c7290893 Updated mapping diagrams to match changes in landcover & transportation
These were forgotten to check in.  We should add validation to the tests
to make sure all values are up to date.
2019-11-01 22:40:39 -04:00
Eva Jelinkova dff9a850a6
Merge pull request #675 from Sophox/nyurik-patch-1
Fix err in transportation update_gbr_route_members
2019-10-31 22:46:37 +01:00
Eva Jelinkova bdeb6c8b2e
Merge branch 'master' into bicycle-foot-horse-mtb_scale 2019-10-31 18:52:12 +01:00
Eva Jelinkova c5b58057cb
Merge pull request #677 from lun/321-highway-construction
Add roads under construction
2019-10-31 18:42:11 +01:00
Eva Jelinkova e7aa43d91b
Merge pull request #662 from frodrigo/dune
Support natural=dune aside of beach and sand
2019-10-29 15:00:20 +01:00
Yuri Astrakhan 0374d4d047 insert non-null osm_id 2019-10-28 12:35:08 -04:00
Yuri Astrakhan 479914e4b5 Fix err in transportation update_gbr_route_members
The query was producing 3 columns - `(member, ref, network)`,
whereas osm_id is a required field (otherwise it throws null constraint).
2019-10-28 12:35:08 -04:00
Yuri Astrakhan 7426e3a924
Added missing key_field to the aerodrome_label & mountain_peak def (#686)
aerodrome_label & mountain_peak queries return `osm_id`, but they
are not declared in the data source.  I think we should either remove
the `osm_id` from the query result, or declare the data source.
2019-10-28 12:26:03 -04:00
Yuri Astrakhan eca13f9bed
Refreshed all diagrams, fixed automation & 2 broken graphs (#692)
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
2019-10-26 21:28:43 -04:00
zstadler 2738c649ca Fix typos 2019-10-26 22:52:14 +03:00
Yuri Astrakhan bf833dcd45
Merge pull request #655 from frodrigo/chocolate
Remove duplicate POI class match on chocolate and confectionery
2019-10-25 23:43:44 -04:00
zstadler 556bfb889d
Merge branch 'master' into bicycle-foot-horse-mtb_scale 2019-10-25 16:09:44 +03:00
Yuri Astrakhan edd1c44ac6
remove trailing space 2019-10-25 00:46:38 -04:00
Yuri Astrakhan 84daa0ea1d Merge zstadler/openmaptiles/patch-1 into master
Rebasing onto the latest changes in origin/master,
resolving merge conflict.
2019-10-23 13:24:20 -04:00
Guillaume Gomez 23358f18af add brunnel info for water 2019-10-11 17:57:26 +02:00
golubev 4251701858 layers/transportation/class.sql: fix up empty value issue (#321) 2019-10-07 14:15:45 +03:00
golubev e74bfb67b4 update transportation layers doc (#321) 2019-10-04 15:19:56 +03:00
golubev 73307a610b layers/transportation_name/: add roads under construction, fix SQL error (#321) 2019-10-04 14:50:05 +03:00
golubev 81c90be19b layers/transportation/: fix SQL mistakes, modify indices (#321) 2019-10-04 14:00:14 +03:00
golubev 0636466cfd layers/transportation/: differentiate roads under construction (#321) 2019-10-04 13:08:49 +03:00
golubev 45a50a5bd0 layers/transportation/: add 'highway=construction' roads (#321) 2019-10-03 14:17:44 +03:00
golubev 8d9a5df48b layers/transportation/: do a tiny code styling (#321) 2019-10-03 14:10:36 +03:00
golubev 84689f6cd1 layers/landuse/mapping.yaml: add 'garages' 2019-09-20 13:00:21 +03:00
Frédéric Rodrigo c6a13981ba Support natural=dune aside of beach and sand 2019-08-31 14:30:42 +02:00
Frédéric Rodrigo dedc1fd91f Remove duplicate POI class match on chocolate and confectionery 2019-08-12 22:30:44 +02:00
François de Metz f4b56d00ae
Add a subclass column from the mapping_value to clean the landcover layer. 2019-07-28 12:36:01 +02:00
zstadler 7a3ac079ae Add intermittent field to water* layers (#430 PR #585) 2019-05-24 13:21:43 +02:00
Frédéric Rodrigo 4d43ee9136 Add colour to buildings (#555) 2019-05-24 11:09:09 +02:00
Dalibor Janák b9c8de3fbb
Merge pull request #620 from eva-j/aerialway
Adding aerialway=gondola
2019-05-20 13:42:40 +02:00
Dalibor Janák 2920ffd4da
Merge pull request #578 from nlehuby/ski_resorts
Add ski resorts to poi and landuse layers
2019-05-20 13:40:58 +02:00
Dalibor Janák 3ae8542cf9
Merge pull request #624 from zstadler/patch-3
Remove second occurance of `camp_site` subclass
2019-05-20 13:40:06 +02:00
Dalibor Janák 2ecca4b20d
Merge pull request #626 from eva-j/osmdata_url
import-water 1.0, update osmdata URL
2019-05-20 13:37:14 +02:00
Dalibor Janák 0ecfe3bd63
Merge branch 'master' into patch-3 2019-05-20 13:17:43 +02:00
Dalibor Janák 7bb810667d
Merge pull request #612 from zstadler/patch-2
Add missing subclass values to `landcover` documentation
2019-05-20 13:06:53 +02:00
Dalibor Janák 26b2fb0765
Merge pull request #622 from eva-j/poi_dormitory
Adding dormitories
2019-05-20 13:05:35 +02:00
Dalibor Janák 94b58f5f21
Merge pull request #570 from Phyks/surface
Add surface field for highways
2019-05-20 13:02:47 +02:00
Eva J f09a2edd12 import-water 1.0, update osmdata URL 2019-05-20 11:58:34 +02:00
Eva J 3520cbec40 POI update only (removing changes in landuse) 2019-05-19 22:04:30 +02:00
zstadler d2f78cc346
Remove second occurance of `camp_site` subclass
The `camp_site` subclass is assigned to the `campsite` class by an earlier statement"
```sql
WHEN subclass IN ('camp_site','caravan_site') THEN 'campsite'
```
2019-05-18 08:26:15 +03:00
Eva J 664bc7da28 adding dormitories 2019-05-17 17:28:20 +02:00
Eva J ed0d63804c update of tag lists, documentation 2019-05-17 14:28:13 +02:00
Eva J 7a167142eb add aerialway=gondola 2019-05-16 13:44:50 +02:00
Eva J 7b6c4752e9 add leisure=track 2019-05-15 18:05:44 +02:00
Eva J 54d0fbc78c adding aerialway=chair_lift,t-bar,rope_tow 2019-05-15 16:37:58 +02:00
Dalibor Janák bf7e160331
Merge pull request #613 from eva-j/boundaries
Boundary - changes in z4 and z5
2019-05-08 09:07:29 +02:00
Eva J 8f543c5e62 removing using scalerank 2019-05-06 18:04:29 +02:00
Eva J aee74675eb changes in z4 and z5 - diagram update 2019-05-03 15:06:05 +02:00
Eva J 9146fc74b0 changes in z4 and z5 2019-05-03 14:47:30 +02:00
zstadler bf062d4731
Add missing `landcover` subclass values
Subclass values were extracted from `mapping.yaml`
2019-05-01 08:45:57 +03:00
zstadler 53976b154d
Avoid long repeated text in poi mapping file
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`
2019-04-18 01:04:07 +03:00
Dalibor Janák 65d9036616
Merge pull request #567 from Phyks/parking
Add parking, bicycle_parking and motorcycle_parking as POIs
2019-04-15 10:58:17 +02:00
Eva Jelinkova b0ee2a9c90
adding parking 2019-04-11 21:11:34 +02:00
Dalibor Janák 9d6a021ecb
Merge pull request #605 from eva-j/missing-islands2
Missing islands
2019-04-11 15:08:13 +02:00
Dalibor Janák 6d7c09a039
Merge pull request #606 from eva-j/suburbs
suburb and neighbourhood added for landuse-residential
2019-04-11 15:08:04 +02:00
Dalibor Janák bc0aeca21f
Merge pull request #553 from typebrook/volcano
Add 'natural=volcano' into mountain_peak layer
2019-04-11 15:07:49 +02:00
Eva J c320b92a4b place=suburb and place=neighbourhood added 2019-04-11 11:57:07 +02:00
Eva J 68255e16ad not importing bays into water_z views, they are mostly duplicating water/ocean areas and cover important islands 2019-04-10 15:59:35 +02:00
Eva J 6ec66e94e3 distinguish bays from other water polygons 2019-04-10 10:04:23 +02:00
zstadler 2357bde1b9 Add bicycle, foot, horse, and mtb_scale to the transportation layer
Resolve https://github.com/openmaptiles/openmaptiles/issues/422
Resolve https://github.com/openmaptiles/openmaptiles/issues/512
Resolve https://github.com/openmaptiles/openmaptiles/issues/602

An extended and refined alternative to https://github.com/openmaptiles/openmaptiles/pull/573
2019-04-08 00:08:21 +03:00
Yuri Astrakhan 8fe9af2327
Minor trailing whitespace cleanup (#596)
Remove extra spaces in a number of files.
2019-03-29 17:15:42 -04:00
Martin Mikita 04fe8f8912
Updated boundary.yaml description PR#550 2019-03-18 12:35:07 +01:00
Noémie 1731464db8 Add ski resorts to poi and landuse layers 2019-01-27 14:30:21 +01:00
Phyks (Lucas Verney) da00063e0d Add surface field for highways
Keep surface field from OSM on highways, generalize it to two values:
"paved" and "unpaved".

This is a fix for #389 and a partial fix for #422.
2019-01-09 15:59:32 +01:00
Phyks (Lucas Verney) 56f282b17d Add bicycle/motorcycle parkings as POIs 2019-01-04 16:53:58 +01:00
typebrook 89cbf27c98 Add 'natural=volcanal' into mountain_peak layer
1. Add new field "class" into mountain_peak layer,
   which is original value of "natural" tag
2. Reformat layer.sql
2018-12-20 14:10:22 +00:00
Adrien Matissart 993d0ef589 Fix typo in update_osm_park_polygon_row function 2018-12-19 17:58:42 +01:00
pathmapper 0a82a07bc4
Update boundary layer description 2018-12-18 22:31:12 +01:00
jirik 92a056ab78 Abbreviate also name:latin of streets 2018-11-30 15:32:26 +01:00
jirik 00d88a103c Revert back to NE 4.0.0
See https://github.com/openmaptiles/openmaptiles/issues/365#issuecomment-442823991
2018-11-30 15:32:26 +01:00
jirik 8d591a59aa Wrap place UNIONs into one SELECT to sppeed up rendering 2018-11-30 15:32:26 +01:00
jirik 927d3945e2 Add geometry_point indexes to park layer 2018-11-30 15:32:26 +01:00
jirik fe057eede1 Move geometry && bbox check in park layer 2018-11-30 15:32:26 +01:00
jirik 7cd29e2622 Add extra geometry_point && bbox check to park layer 2018-11-30 15:32:26 +01:00
Jiri Kozel f3f8b9804e
Improve 3D buildings (#533)
Add `hide_3d` building attribute to hide some building parts in 3D.

Fix #128
2018-11-14 15:26:24 +01:00
Jiri Kozel bb00b4e53f
Add type of sport as subclass of pitch (#532) 2018-11-12 14:37:00 +01:00
jirik 9d07350ac4 Prefer to join NE countries by Wikidata ID 2018-11-12 12:37:15 +01:00
jirik 8766a0effc Add waterway:dock to water layer 2018-11-11 16:48:37 +01:00
jirik cd920755bf Remove park_label layer, add labels to park layer 2018-11-07 18:22:26 +01:00
jirik 765d6fbc76 Add line piers 2018-11-07 16:19:19 +01:00
jirik 4304c756ad Add polygon piers 2018-11-07 16:19:19 +01:00
jirik bae5f21bb4 Respect current grouping of osm_transportation_name_network 2018-11-07 11:08:06 +01:00
Joakim Kronqvist 7ec9e49a44 Only group transportation name based on language tags 2018-11-07 11:08:06 +01:00
Joakim Kronqvist 08df7abf27 Use osml10n functions for transportation name tags 2018-11-07 11:08:06 +01:00
jirik ccf8ee6dfa Add park labels layer 2018-11-05 16:40:32 +01:00
nlehuby 7e50695631 Add layer, level, and indoor tags for poi 2018-11-05 10:08:31 +01:00
Eric Theise 7e625de3e1 Correct etldoc mapping. 2018-11-05 10:01:06 +01:00
jirik ff99a02aae Treat buildings with fault heights 2018-06-13 14:51:25 +02:00
nlehuby b28ea79d4c add aquarium to the poi layer 2018-06-11 11:18:16 +02:00
jirik dba6e7025f Improve doc, update diagrams 2018-04-27 13:41:32 +02:00
jirik 26cc6dbbea Remove borders of leased areas at Z4 2018-04-27 12:44:04 +02:00
jirik 77c1c038d5 Remove borders of leased areas
Fix #416. Affects Baykonur and Guantanamo.
2018-04-16 09:18:13 +02:00
jirik 1093dcece8 Improve class of water polygon on Z6-Z10 2018-04-13 15:58:22 +02:00
jirik 24caa53b92 Import more ocean and sea labels
Related to #434
2018-04-11 17:16:19 +02:00
Jiri Kozel fce0ba1ce1
Add layer attribute to transportation (#441)
Fix #280
2018-04-11 15:28:23 +02:00
Jiri Kozel e6efe363ed
Add polygon bridges to transportation (#437) 2018-04-04 10:39:46 +02:00
nlehuby f93c175e47 Remove duplicates on shop and art POI class 2018-03-29 16:15:27 +02:00
Jiri Kozel 8ac85dced6
Remove park and cemetery duplicates from POI rank
Based on f3e2d7f163 (commitcomment-28180665)
2018-03-26 14:34:37 +02:00
Han Chao 974e85ff78 add class and subclass values to documentation 2018-02-01 09:25:38 +01:00
hanchao 51d4558ea8 add sand and beach 2018-02-01 09:25:38 +01:00
jirik 5c67f2769e Add st_isvalid check to imposm3 generalized tables
Fix #386
2018-01-31 17:24:05 +01:00
jirik c2c5fc8f32 Generate park_polygon_gen8 from _gen7 2018-01-31 17:24:05 +01:00
Jiri Kozel d48b623eda
POI: remove doctors from hospital class
Related comment: https://github.com/openmaptiles/openmaptiles/issues/387#issuecomment-358273945
2018-01-29 18:38:49 +01:00
Frédéric Rodrigo 89ee0de23b Waterway: Rename function to waterway_brunnel, Remove ford. 2018-01-16 11:45:49 +01:00
Bob Wallis c246b3c4df Add brunnel to waterway layer 2018-01-16 11:45:49 +01:00
Frédéric Rodrigo b211beafe2 Use direction as type for oneway, support oneway-opposite #376 2018-01-16 10:29:07 +01:00
jirik a6ccbfd876 Update POI diagram 2018-01-12 17:41:57 +01:00
Noémie 5c740f8570 Add a few missing POIs (#391)
* Add a few missing POIs

* hackerspace
* escape room
* subway and station entrance
* frozen food (shop)
2018-01-12 15:56:06 +01:00
Noémie Lehuby 761d8eb889 update doc
to add religion as subclass on poi layer
2018-01-12 15:47:31 +01:00
nlehuby 225a0f6fd9 add religion as subclass for place_of_worship 2018-01-12 15:47:31 +01:00
jirik 2f151a833d Update landuse documentation & diagram 2018-01-12 15:43:33 +01:00
Noémie Lehuby 050051bce6 Add bus_station and zoo in landuse 2018-01-12 15:40:54 +01:00
nlehuby 940f70a415 Handle theme_park as a landuse 2018-01-12 15:40:54 +01:00
jirik 294d7d22c3 Update boundary diagrams & readme 2018-01-12 15:17:59 +01:00
Adrien Matissart 6521981af8 Remove unused osm_boundary_linestring and boundary mapping 2018-01-12 15:11:14 +01:00
Adrien Matissart 756a848a5d Remove unused boundary generalized_tables 2018-01-12 15:11:14 +01:00
jirik 3cee3c7f80 Update diagrams 2017-12-04 12:06:28 +01:00
jirik 919686b6c9 Fix missing cities with diacritics at Z6 2017-12-04 11:02:04 +01:00
jirik db60ae7f40 Fix missing state and province boundaries at Z4 and Z5 2017-12-04 11:00:53 +01:00
jirik 35786ee64c Add osm_id as key of water_name 2017-12-04 10:53:26 +01:00
jirik afa85ea37e Add osm_id as key of POI 2017-12-04 10:53:26 +01:00
jirik a380f358fe Add osm_id as key of places 2017-12-04 10:53:26 +01:00
jirik 63f6915fab Add missing transportation_name features
Fix #372
2017-11-25 11:10:01 +01:00
jirik 455f36e634 Fix highway_class function 2017-11-20 18:59:45 +01:00
jirik d2a81bd1da Show more (and do not remove) seas with increasing zoom level
Fix #275
2017-11-20 17:26:55 +01:00
jirik 9c7a3aeb36 Add ISO 3166-1 alpha-2 country codes as iso_a2 attribute
Fix #306
2017-11-20 15:49:08 +01:00
jirik 2097b2c31b Compute rank also for tiny countries 2017-11-20 15:49:08 +01:00
jirik b88b34c98d Set rank of countries with limited recognition to 6 2017-11-20 15:49:08 +01:00
jirik 30539e78d1 Fix rank of archipelago countries
Fix #342
2017-11-20 10:51:32 +01:00
antoine-de 2ddbc8b1c1 update the layers from natural earth latest data
Natural earth has released new data and now some sql query are invalid

should fix #352

I don't really know how natural earth data versioning is maintained
though 😕
2017-11-17 13:55:02 +01:00
jirik 3925c1b194 Group important waterways by language tags only 2017-11-16 11:43:36 +01:00
jirik 741be6d921 Import additional names from Wikidata 2017-11-16 09:03:41 +01:00
jirik d3a5985343 Remove waterway's name.sql because of duplicity 2017-11-16 09:03:41 +01:00
Jiri Kozel 1a324aaf22
Do not load all tags, use later imposm3 (#356)
Fix #266 #267
2017-11-10 15:25:23 +01:00
jirik 543b0315b2 Add agg_stop indicator to transit stations (POI) 2017-11-09 11:46:32 +01:00
jirik 1c2ce970fd Distinguish type of information point (POI) 2017-11-09 11:46:32 +01:00
jirik d300dbca48 Distinguish aerial way stations from other stations (POI) 2017-11-09 11:46:32 +01:00
jirik b633626335 Add castles and ruins to POI 2017-11-09 11:46:32 +01:00
jirik cf79b928d0 Publish funicular stations as halts 2017-11-09 11:46:32 +01:00
jirik 21f5f1717b Show ferry terminals sooner 2017-11-09 11:46:32 +01:00
jirik a0a6e2d438 Show railway halts sooner 2017-11-09 11:46:32 +01:00
jirik 9cec6e1a10 Show railway stations sooner 2017-11-09 11:46:32 +01:00
jirik e95f2d476b Add layer, level, and indoor tags for footways and steps 2017-11-09 10:13:53 +01:00
jirik 0b94704436 Add subclass of paths in transportation_name 2017-11-09 10:13:53 +01:00
jirik 14f6729f5c Update diagrams of transportation_name 2017-11-09 10:13:53 +01:00