Wykres commitów

81 Commity (master)

Autor SHA1 Wiadomość Data
Tomas Pohanka de2fa04c37
Docs clean up. (#1636)
Update docs, license year and clean up `.env`.
2024-02-21 13:40:46 +01:00
Tomas Pohanka 44cf6c8e35
Default output filename as `tiles.mbtiles` (#1633)
Keep the default output filename as `tiles.mbtiles`. `tiles.mbtiles` is expected to start TileServer.

Using the `area` as the name causes TileServer not to run. The name could be changed by the user by
 - change `MBTILES_FILE` in `.env`
 - use MBTILES_FILE as an environmental variable before running `quickstart.sh` or `generate-tiles-pg` 

Co-authored-by: Adam Laza <@lazaa32>
2024-02-21 11:52:29 +01:00
Yaser Kalali 692b0a7afe
Fix issues in compose and quickstart.sh (#1530)
* Chore(quickstart.sh):

Handle spaces in fonts name when calculating their md5 digest

* Chore(Makefile):

Change docker pull to docker-compose pull to read image from compose file
2023-05-15 12:36:15 +02:00
William Edmisten 5153dffe4a
Use area name for mbtiles in quickstart.sh (#1523)
Some parts of quickstart.sh reference `${area}.mbtiles`, but the file that gets created with the default `.env` is `tiles.mbtiles`. We should either reference `$MBTILES_FILE` instead, or override the filename with `${area}.mbtiles` (which is the approach taken by this PR).
2023-05-10 09:33:44 +02:00
William Edmisten 02dcc41e1f
Support new docker compose version (#1497)
Currently the Makefile and `quickstart.sh` expect the [deprecated docker compose V1](https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command) syntax, `docker-compose`.
The new V2 syntax uses `docker compose` instead.
2023-03-15 22:16:00 +01:00
Tomas Pohanka 624cf7a8a3
Minor docs enhancement. (#1481)
Update docs, links, and comments.
2023-01-30 14:04:47 +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
Brian Sperlongano b4b897999d
Replace osmborder with imposm/SQL (#1213)
Fixes #1156
Fixes #810
Fixes #1228

This PR replaces `osmborder`, which is no longer maintained, with `imposm` mappings and SQL code to generate borders.  Key features that were moved into the imposm/SQL layer:
1. Grouping by `osm_id` and aggregating by lowest `admin_level` value so that there's only one copy of ways that are members of multiple relations.
2. Filtering out of point features in boundary relations (typically `admin_centre` and `label` roles).
3. Move disputed boundary detection logic into SQL.

This will increase the database size slightly because of the limits of what imposm can do, as some of the filtering is done in the SQL layer after importing, rather than being done in `osmborder`.
2021-09-29 11:08:55 +02:00
Falke Design 87a37da243
Fix #1151 check if bc command is available (#1201)
On some systems the `bc` command is not installed, so I added a check if the command can be used.

It is a simply calculation from KB to GB.  If `bc` is missing, then it is displayed in KB.

fix: #1151
2021-09-01 15:13:35 +02:00
Yuri Astrakhan 1cea73cb7c
Use st-asmvt pg tilegen in quickstart (#1193)
* Use generate-tiles-pg target in quickstart
* update makefile documentation
2021-08-25 21:35:06 -04:00
tilmanb 077ec78f63
typo and spelling fixes in the output (#1060)
This simply fixes some spelling and/or grammar errors in the quickstart script output
2021-01-10 16:55:52 +01:00
Yuri Astrakhan 97ffabcb49
Use 5.3 - new bbox value (#1012)
Migrate to tools 5.3 and use the new bbox value.

* Use 5.3 - new bbox value
* Return correct bbox for meta-generate
mbtiles-tools meta-generate is now able to use bbox from *.bbox file

Thanks @nyurik
2020-10-26 18:39:49 +02:00
zstadler 09b68ed1c2
Allow `BBOX` to be set in `.env` file (#1013)
* Allow setting `BBOX` to be set in `.env` file

Currently, the `BBOX` setting in `.env` is ignored for all areas except `planet`.
On the other hand, the `planet` area is an overkill for any `BBOX` setting other than the default - `-180.0,-85.0511,180.0,85.0511`.

With this PR, `quickstart.sh` would not override a modified `BBOX` value in `.env`. 

Also, this provides a way to avoid the pessimistic `BBOX` computation for `osmfr` extracts, as described in https://github.com/openmaptiles/openmaptiles-tools/pull/297#issuecomment-700792702

#### Currently
- If the user does not do anything, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the full extent of the data source. This applies to `planet` and other data sources.
- If a user sets the `BBOX` value in `.env` and a `planet` data source is used, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the extent set in the `.env` file.
- If a user sets the `BBOX` value in `.env` and a non-`planet` data source is used, it is ignored - `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the full extent of the data source.

#### Problem statement
While users of a `planet` data source have a simple way to override the default extend of the tile generation, users of other data sources have no simple way of doing that. In fact, for such users the `BBOX` setting in the `.env` file is ignored and therefore misleading.

#### Proposal
- If the user does not do anything, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the full extent of the data source. This applies to `planet` and other data sources.
- If a user sets the `BBOX` value in `.env`, `quickstart.sh` and `make generate-tiles` create an `mbtiles` file for the extent set in the `.env` file. This applies to `planet` and other data sources.
2020-10-15 11:38:11 +03:00
zstadler 424c4ee8a3
Remove workaround for quickstart.sh (#998) 2020-09-28 22:28:34 +03: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 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
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 e12f09ae57
Generate multiple parallelizable SQL files (#839)
Generate multiple SQL files to be imported in parallel.
The files will respect the cross-layer dependencies,
so they can be all ingested at the same time.
2020-05-18 14:26:51 -04:00
zstadler aea7d73ece
quickstart support for osmfr and bbike areas (#861)
* quickstart support for osmfr and bbike areas

- Use the `--empty` flag to start with an empty database
- Geofabrik as the default server
- osmfr is used for hierarchical area names such as `europe/austria`
- bbbike is used for Capitalized area names such as `Adelaide`
2020-05-15 01:14:14 -04:00
zstadler 12542eb687
Unified naming convention for make targets (#862)
Following https://github.com/openmaptiles/openmaptiles/pull/821#issuecomment-625773180
2020-05-09 13:30:57 -04:00
Yuri Astrakhan b6f1e1374b
parametrized pbf file (#856)
* `make import-data` now accepts `PBF_FILE=...` parameter (see #820)
* quickstart uses specific data file when importing
2020-05-06 11:27:14 -04: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
zstadler 29973669ae
Warning-check for `make import-sql` (#846)
Always check `make import-sql` for warnings. Not only when invoked by `quickstart.sh`.
2020-05-04 13:28:23 -04:00
Yuri Astrakhan 21053e4a5f
Makefile target cleanup, minor improvements (#821)
* allow postgres image to be overwritten with an env var
* allow DIFF_MODE var to be overwritten with an env var
* add /mapping and /cache dirs into tools image
* make `build-sql` target explicit rather than relying on a filename
* `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
* better output messages
2020-04-22 11:15:20 -04:00
Yuri Astrakhan 2ca55abb7d
Use new import-data image (#818)
This is a partial migration of https://github.com/openmaptiles/openmaptiles/pull/785

* Use `import-data` instead of `import-lakelines`, `import-water`, and `import-natural-earth`
* Upgrade docker-compose.yml to version 2.3 (allows some extra env var usage in yaml file itself)
* Remove `openmaptiles-tools:latest` usage -- no longer needed, can use current version 4.1
* `db-start` does not do a container recreation in case docker-compose.yml definition has changed.
* a few minor cleanups in quickstart.sh
2020-04-22 02:48:57 -04:00
Yuri Astrakhan 4f5ea5f26e
Use v4.1, move import-wikidata before import-sql (#805)
import-wikidata should run before import-sql, and v4.1 allows for that.
Also it optimizes the wd_names table to just be a simple Wikidata ID -> labels lookup, with a proper index.

Minor other changes:
* `test-perf-null` target is now part of the Makefile
* `./data/osmstat.txt` is no longer created
* area download file now in this format:   `${osm_area}-latest.osm.pbf`
2020-04-09 10:49:35 -04:00
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 036a96fb40 use awk instead of gawk 2020-02-24 12:08:27 -05:00
Yuri Astrakhan 9f4d48cf25
Remove unused import-sql image (#738)
import-sql image is not used anywhere in OMT, deleting.
2020-01-24 14:40:03 -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
Eva Jelinkova 831bb6fe4d
Merge pull request #736 from MartinMikita/fix-docker-compose-tool-version
Fixed docker-compose commands.
2019-12-19 11:59:07 +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 d46af923dd Detect sql warnings and abort quickstart
If quickstart generates an SQL `WARNING` while running
the import-sql script, abort.
2019-12-14 03:11:38 -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 J f09a2edd12 import-water 1.0, update osmdata URL 2019-05-20 11:58:34 +02:00
Hsieh Chin Fan (Pham) 3591cb2f8d Improve Makefile - simplify make, without local omt-tools (PR #562) 2019-03-22 09:34:00 +01:00
Svante Richter b711b76389
Fixes minor typos/grammar typos 2018-07-29 17:22:53 +02:00
jirik 741be6d921 Import additional names from Wikidata 2017-11-16 09:03:41 +01:00
Taro Matsuzawa 8a1f07e555 check GNU Coreutils stat option and if fail use BSD stat, fix ls option position 2017-07-03 15:21:05 +09:00
jirik 8ff5d10e8b Use openmaptiles-tools:0.5 and docker-compose to run it 2017-06-06 19:46:50 +02:00
stirringhalo 239f0c6643 Fix travis (#245)
Move to the installed default docker version.
2017-05-11 19:34:25 -04:00
stirringhalo 255a4250b9 Add support for PBF tiles generated directly from postgres (#240)
* Add postserve

* Set postserve version
2017-05-10 18:35:01 -04:00
Jiri Kozel a4a7ca95c6 Add creadit to the end of quickstart.sh (#238) 2017-05-03 08:09:35 +02:00
stirringhalo 34c4f12301 Switch back to master for openmaptiles-tools (#235) 2017-05-02 21:32:14 -04:00
stirringhalo 90690d2a39 Switch to ZRes (#214) 2017-04-25 18:03:29 -04:00
stirringhalo 75dd026e17 Set Docker Version in Travis to 1.11.0 (#221)
* Set version to 1.11.0

* Change min docker version in quickstart
2017-04-13 20:07:41 -04:00