Wykres commitów

1310 Commity (master)

Autor SHA1 Wiadomość Data
David Zhao a4671b84f0
Expose COPY_CONCURRENCY to users (#972)
Allow users to override how the number of threads used when generating map vector tiles.
2020-09-01 14:46:53 +03:00
naveenkumar 4807ccee24
adding hi(hindi),ta(tamil) and te(telugu) language (#973) 2020-09-01 12:25:17 +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 10efc29280
Make tileset def openmaptiles.yaml a variable (#968)
Move the hard coded `openmaptiles.yaml` from Makefile to a variable. Allows use other tileset definition.
A step forward easy alternative layer definition.
2020-08-27 12:43:09 -04:00
zstadler 1daacf354e
Use line buffering by `awk` in `make import-sql` (#962)
Resolve https://github.com/openmaptiles/openmaptiles/issues/958
2020-08-10 10:41:14 +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
zstadler 6a512af90f
Special cache handling for Docker Toolbox on Windows (#957)
resolves https://github.com/openmaptiles/openmaptiles/issues/807
2020-08-03 18:12:09 +02:00
zstadler 751551f910
Add `$OMT_HOST` support to `make start-postserve` (#956)
Resolve https://github.com/openmaptiles/openmaptiles/issues/955
2020-07-28 18:28:04 +02:00
zstadler 897846380a
Rephrase `area` detection messages (#954)
Thanks @zstadler.
2020-07-28 07:25:52 +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 ad8bd41567
Do not wait for integrity test (#934)
It's ok if integrity test fails -- makes the whole testing process faster by 10 minutes at a cost of some extra CPU cycles.
2020-06-14 11:02:44 -04:00
Tomas Pohanka 8f31655564
Change GitHub Actions to dedicated server (#929)
* Change GitHub Action to the dedicated server Ralph

* bugfix - let quickstart generate-tiles up to zoom 14
2020-06-12 11:04:33 +02: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
Yuri Astrakhan 447a8380e0
Fix incorrect Imposm config updates (#922)
* Current code incorrectly passes `IMPOSM_CONFIG_FILE` to the `generate-tiles` image, but should pass it to the tools.
* add a test to ensure imposm config exists
* add a test to ensure area is set during updates
2020-06-09 10:00:10 -04:00
Yuri Astrakhan 491bb10bd7
Expose MAX_PARALLEL_PSQL to users (#927)
Allow users to override how many import-sql files are loaded in parallel at the same time.

This change should be a noop
2020-06-09 09:53:02 -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
zstadler ffd237d5c8
Fix `clean-unnecessary-docker` make target (#921)
Add missing `-q` flag
2020-06-08 12:40:04 -04: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 60a3e1ea70
Fix Makefile duplicate runs (#923)
Make sure that core targets (i.e. part of the `all` target like build-sql and build yaml files) do not run multiple times if they already exist.

Makefile for some reason does not like it when a real target depends on a PHONY target, and re-runs it. I added an `if` statement to skip building targets if their result already exists.
2020-06-08 12:26:11 -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
Yuri Astrakhan 805d95df09
Fix import-borders if runs multiple times (#916)
Running './quickstart monaco' twice in a row will cause an error the second time.
2020-06-05 12:48:48 -04:00
Yuri Astrakhan 1a9f6132c3
New generate-dc-config target, rm QUICKSTART_MIN/MAX_ZOOM (#915)
* Set `MAX_ZOOM` to 7 by default.
* Remove `QUICKSTART_MIN/MAX_ZOOM` - unneeded complexity with two env vars. We can just use `MIN_ZOOM` and `MAX_ZOOM`. See also #261
* Generate dc-config yaml file with a new `make generate-dc-config` step. It will compute BBOX based on the downloaded data file. This step is not needed for planet generation.
* Generate Imposm replication file only when `DIFF_MODE` is `true`. Not needed otherwise. If the data source does not support it, it will throw an error.
2020-06-04 15:45:04 -04:00
Yuri Astrakhan 1486b7e0cb
Rework download area support (#908)
Closes #904
* Make all data-related targets like `download*`, `import-osm`, `import-borders`, and `generate-tiles` into `area`-aware -- making it possible for multiple data files to coexist inside the `./data` dir.
* Add `make download area=... [url=...]` command to automatically download any kind of area by checking Geofabrik, BBBike, and OSM.fr, optionally from a custom URL. Supports `area=planet` too.
* Do not re-download area with `make download-*` if it already exists.
* Automatically rename `<area>-latest.osm.pbf` into `<area>.osm.pbf`
* If `area=...` parameter is not given to `make`, see if there is exactly one `*.osm.pbf` file, and if so, use `*` as the `area`.
* Configure many variables in the .env file, overriding the defaults in tools
* If `<area>.osm.pbf` exists, but `<area>.dc-config.pbf` is missing, generate it using `download-osm make-dc` command.

Also:
* closes #614
* closes #647
* partially addresses #261
2020-06-03 15:37:45 -04:00
Yuri Astrakhan fca53ef0ee
Minor makefile/quickstart cleanup (#907)
* Make a few spacing adjustments for ease-of-reading and consistency
* fix bbbike naming and other source urls
* remove unneeded `override`
* added `list-bbbike` target
2020-06-01 12:54:30 -04:00
Yuri Astrakhan 546f26e68a
MVT: use gzip and generate for v3.0 (#906)
This only changes the generated `getmvt(...)` function used by mvt users.

Beginning with tools 5.1, postgis docker images uses postgis v3.0, and includes gzip extension
2020-06-01 12:46:34 -04:00
Yuri Astrakhan 1a31b9212e
Minor fix import-borders file param (#905)
just like import-osm, import-borders can accept PBF_FILE param
2020-06-01 12:33:26 -04:00
Yuri Astrakhan 907fc58ee2
Use tools v5.2 (#903)
* Use [tools v5.2](https://github.com/openmaptiles/openmaptiles-tools/releases/tag/v5.2.0)
* Use `mbtiles-tools meta-generate` instead of the removed `generate-metadata` script.
* Remove `show-metadata` make target - it was just added and is not needed.

## Relevant changes
* Upgrade [osml10n PG extension](https://github.com/giggls/mapnik-german-l10n) to the faster v2.5.9 (significant performance improvements merged upstream by @nyurik)
2020-06-01 12:15:36 -04:00
Adam c6fff879ac
remove automatic osmfr choice (#902)
Resolves #895
2020-05-27 16:34:53 +02:00
Jan-Philipp Benecke 99c6be722d
Add "shop=car_parts" (#874)
Thanks
2020-05-27 16:08:53 +02:00
Yuri Astrakhan 28af9c0d9a
Add BORDERS_CLEANUP param to .env (#886)
This should be a noop, but will help users that it is available.
2020-05-26 15:37:13 -04:00
Yuri Astrakhan dbf130deb0
Allow custom ports for postserve/tileserver (#887)
* `make start-postserve PPORT=8000`
* `make start-tileserver TPORT=9000`

Note that both ports need to be the same on host and inside the docker container because the services include a URL to the tiles as part of their manifest.
2020-05-26 15:19:52 -04: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
Tomas Pohanka b2ab969128
Update steps for 'Using your own OSM data' (#889)
Add more clear step into quickstart.md for using own OSM data
fix #843
2020-05-26 20:50:00 +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 cec49b23ba
Save DB schema during test run (#891)
Places the output of `pg_dump --schema-only` into the saved build artifact as `schema.sql`

Closes #877
2020-05-26 14:30:27 -04:00
Yuri Astrakhan 19673b5592
Print generated metadata during quickstart (#894)
Add a new `show-metadata` target to show all settings
in the .mbtiles file.
2020-05-26 13:35:52 -04: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
Yuri Astrakhan a82397940a
Hide Mapnik warnings once available (5.1) (#884)
Uses the patch by @zstadler to filter out irrelevant Mapnik warnings.
This will be ignored until tools v5.1 is used.
2020-05-24 16:04:05 -04:00
Yuri Astrakhan 04ae4a6b50
Upgrade to tools v5.1 (#883) 2020-05-24 15:56:03 -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