Wykres commitów

53 Commity (490acf9beb22ec06d118326a2311f9d265e181f1)

Autor SHA1 Wiadomość Data
Yuri Astrakhan 490acf9beb
Use tools v4 with on-the-fly boundary generation (#750)
* Switch OMT to use the new tools v4.0.0
* borders are dynamically generated from the PBF file instead of downloading a prepared CSV file
* all tools are executed as current user instead of root, thus files are easier to modify/delete if needed
* all data is stored in the local file system instead of docker volumes (Docker currently has a limitation of non-root operation for internal volumes). This also makes it easier to examine and test it.
* New `init-dirs` make target creates all the needed dirs - `build, data, cache`
* `make clean` deletes the whole `build` dir instead of individual files.
* `clean-docker` for backward compatibility deletes `cache` dirs (it used to be a volume)
* all `psql` calls are now done with `ON_ERROR_STOP=1`
* got rid of `pgclimb-*` targets -- same results can be done with `psql` (`pgclimb-list-views` & `pgclimb-list-tables` renamed to `list-views` and `list-tables`)
2020-03-06 13:15:54 -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
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 3449cecb22
Migrate to new Wikidata importer (#735)
* Use _resolve_wikidata in layer mapping.yaml

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.

* Migrate to new Wikidata importer

Uses latest tools to populate the wd_names table
during the quickstart.  This can be merged already,
or we can wait for the next tools version.
2020-01-22 16:16:38 -05:00
Yuri Astrakhan e4a9d90dec
noop: minor makefile targets cleanup (#737)
Avoid duplicating target name with `$@`.
This prevents accidental typo bugs.
2019-12-20 12:09:08 -05:00
MartinMikita 75a94f615f Fixed merge conflicts. 2019-12-18 09:40:10 +01:00
MartinMikita 434c0500f3 Removed TOOLS_VERSION, rewritten commands to use only docker-compose with TOOLS_VERSION inside .env. 2019-12-16 15:37:19 +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
Yuri Astrakhan 132747d9b5
Use unified tools version 3.1.0 for all images (#707)
* Use unified tools version for all images
* do not start postserve as part of quickstart, but added a help message how to start it
* wait for SQL start with pgwait
2019-12-12 12:40:31 -05:00
Yuri Astrakhan 8876e3a4d8
Clean up quickstart and makefile (#726)
Other than the change from `exit 404` to `exit 1`,
all other changes are noops - just cleaning things up
so that various linting tools don't complain.
2019-12-11 09:26:25 -05:00
Eva Jelinkova 5140b50b8a
Merge pull request #581 from zstadler/forced-clean-sql
Fix `make 'forced-clean-sql'` failure with Docker Toolbox for Windows
2019-11-11 11:01:22 +01: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
Yuri Astrakhan 8fe9af2327
Minor trailing whitespace cleanup (#596)
Remove extra spaces in a number of files.
2019-03-29 17:15:42 -04:00
Hsieh Chin Fan (Pham) 3591cb2f8d Improve Makefile - simplify make, without local omt-tools (PR #562) 2019-03-22 09:34:00 +01:00
zstadler 6093c1f9c2 Fix `make 'forced-clean-sql'` failure on Windows
Resolve #580
2019-02-11 14:41:00 +02:00
ImreSamu 61314fc289 remove osm2vectortiles/mapbox-studio from project 2018-11-05 16:41:23 +01:00
Eric Theise fc2080bed1 Correcting typos, standardizing whitespace, readability. 2018-10-12 00:51:32 -07:00
MartinMikita ab7eabe0e7 Cleaned Makefile, simple tasks moved upper, dev or specific moved down. Added start-postserve. 2018-07-27 15:32:44 +02:00
MartinMikita 5d193ba147 Updated Makefile to use make generate-tiles for custom PBF. 2018-07-27 09:53:39 +02:00
jirik a9adaf00c5 Add some make commands useful for dev 2018-01-16 09:53:59 +01:00
jirik 741be6d921 Import additional names from Wikidata 2017-11-16 09:03:41 +01:00
Jiri Kozel 51bc8fad35 Multilinguality (#279)
Improve multilinguality: names in 57 languages, name:latin, name:nonlatin, name_int. Fixes #211 #252 #80.

See #279 for more info.
2017-06-12 17:53:47 +02:00
ImreSamu 61af8e9517 add `make psql-analyze` and `make psql-vacuum-analyze` 2017-01-20 23:30:02 +01:00
ImreSamu 1dfb6d76a5 start-tileserver: text improvement 2017-01-11 09:46:19 +01:00
ImreSamu a9a17cb263 add: Clean up (–rm) to klokantech/tileserver-gl docker start 2017-01-10 19:44:31 +01:00
ImreSamu 3279c25283 fix `make remove-docker-images` 2017-01-09 13:44:54 +01:00
ImreSamu 524ff207b8 add: make start-tileserver 2017-01-08 13:31:24 +01:00
ImreSamu 2b76c17a11 fix make masking 2016-12-15 15:39:01 +01:00
ImreSamu 9e24e909d0 dockerize the generate-etlgraph procedure 2016-12-15 14:57:24 +01:00
ImreSamu eef775fda9 fix some `make` commands 2016-12-06 18:43:32 +01:00
ImreSamu 38329390de small fixes 2016-12-04 17:11:16 +01:00
ImreSamu 2e72698ed9 refactor to `make generate-qareports` and `make generate-devdoc` 2016-12-04 01:37:28 +01:00
ImreSamu 631f7b7856 fixes , improvements 2016-11-30 05:39:06 +01:00
ImreSamu d98d42826c Merge branch 'master' into quickstart_v2 2016-11-29 15:12:23 +01:00
Lukas Martinelli a98ede7ab2 Remove generated docs from repo 2016-11-29 11:07:29 +01:00
ImreSamu 5c38d0283e small fixes 2016-11-29 00:53:52 +01:00
ImreSamu 9b8adcb25b pgclimb and other examples 2016-11-29 00:27:44 +01:00
ImreSamu 355f4baf57 more improvments 2016-11-28 23:15:47 +01:00
ImreSamu ceb66e638c add more documentation, small fixes 2016-11-28 16:44:30 +01:00
ImreSamu 2957fb6048 using geofabrik-download for quickstart 2016-11-27 11:31:43 +01:00
ImreSamu 4028b6b49c improved ./quickstart.sh ( more comments, debug infos, more safe ) 2016-11-15 23:02:28 +01:00
lukasmartinelli 263d7e8a96 Add docs for landcover, landuse and housenumber 2016-10-30 16:07:47 +01:00
lukasmartinelli 94aca0e352 Document water_name and waterway 2016-10-29 15:16:21 +02:00
lukasmartinelli 6f915eca92 Documnt place 2016-10-29 11:15:13 +02:00
lukasmartinelli 4976ebba8e Document POI 2016-10-28 22:35:54 +02:00
lukasmartinelli a5506dc286 Separate build and doc step 2016-10-28 21:56:39 +02:00
lukasmartinelli 94f0573226 Document highway 2016-10-28 21:07:52 +02:00
lukasmartinelli ca28a0ac24 Document building 2016-10-28 20:53:38 +02:00
lukasmartinelli 90f2203e7c Document water and remove obsolete mapping 2016-10-28 20:49:20 +02:00
lukasmartinelli ff52cfda08 Remove unnecessary fields from boundary 2016-10-28 20:39:38 +02:00