Issue #115: add installation examples.

Add `INSTALL.md` file.
This commit is contained in:
Sergey Vartanov 2022-02-16 10:46:14 +03:00
parent f830c3757f
commit 43d19b11d9
4 changed files with 72 additions and 8 deletions

View file

@ -14,6 +14,12 @@ Unlike standard OpenStreetMap layers, **Map Machine is a playground for experime
Map Machine is intended to be highly configurable, so it can generate precise but messy maps for OSM contributors as well as pretty and clean maps for OSM users. It can also use some slow algorithms for experimental features.
See
* [installation instructions](#installation),
* [map features](#map-features),
* [using Röntgen as JOSM style](#use-röntgen-as-josm-map-paint-style).
Usage example
-------------
@ -138,12 +144,14 @@ Requirements: Python 3.9.
* Install [cairo 2D graphic library](https://www.cairographics.org/download/),
* install [GEOS library](https://libgeos.org),
* install Python packages:
* install Python packages with the command:
```bash
pip install .
```shell
pip install git+https://github.com/enzet/map-machine
```
For more detailed instructions, see [instructions](doc/INSTALL.md).
Map generation
--------------
@ -313,6 +321,7 @@ Map configuration options used by `render` and `tile` commands:
| <span style="white-space: nowrap;">`--country`</span> | two-letter code (ISO 3166-1 alpha-2) of country, that should be used for location restrictions, default value: `world` |
| <span style="white-space: nowrap;">`--ignore-level-matching`</span> | draw all map features ignoring the current level |
| <span style="white-space: nowrap;">`--roofs`</span> | draw building roofs, set by default |
| <span style="white-space: nowrap;">`--building-colors`</span> | paint walls (if isometric mode is enabled) and roofs with specified colors |
MapCSS 0.2 generation
---------------------
@ -327,7 +336,7 @@ To create MapCSS with Map Machine style also for ways and relations, run `map-ma
| <span style="white-space: nowrap;">`--ways`</span> | add style for ways and relations |
| <span style="white-space: nowrap;">`--lifecycle`</span> | add icons for lifecycle tags; be careful: this will increase the number of node and area selectors by 9 times, set by default |
### Use Map Machine as JOSM map paint style ###
### Use Röntgen as JOSM map paint style ###
* Run `map-machine mapcss`.

25
doc/INSTALL.md Normal file
View file

@ -0,0 +1,25 @@
Install
-------
Map Machine requires [Python](https://www.python.org) 3.9, [pip](https://pip.pypa.io/en/stable/installation/), and two libraries:
* [cairo 2D graphic library](https://www.cairographics.org/download/),
* [GEOS library](https://libgeos.org).
Installation examples
---------------------
### Ubuntu ###
```shell
apt install libcairo2-dev libgeos-dev
pip install git+https://github.com/enzet/map-machine
```
### macOS ###
```shell
brew install cairo geos
pip install git+https://github.com/enzet/map-machine
```

23
doc/install.moi Normal file
View file

@ -0,0 +1,23 @@
\2 {Install} {install}
Map Machine requires \ref {https://www.python.org} {Python} 3.9, \ref {https://pip.pypa.io/en/stable/installation/} {pip}, and two libraries\:
\list
{\ref {https://www.cairographics.org/download/} {cairo 2D graphic library},}
{\ref {https://libgeos.org} {GEOS library}.}
\2 {Installation examples} {installation-examples}
\3 {Ubuntu} {ubuntu}
\code {
apt install libcairo2-dev libgeos-dev
pip install git+https://github.com/enzet/map-machine
} {shell}
\3 {macOS} {macos}
\code {
brew install cairo geos
pip install git+https://github.com/enzet/map-machine
} {shell}

View file

@ -1,5 +1,4 @@
\title {Map Machine}
\page_icon {out/icons_by_id/book.svg}
\b {Map Machine} project consists of
@ -16,6 +15,12 @@ Unlike standard OpenStreetMap layers, \b {Map Machine is a playground for experi
Map Machine is intended to be highly configurable, so it can generate precise but messy maps for OSM contributors as well as pretty and clean maps for OSM users. It can also use some slow algorithms for experimental features.
See
\list
{\ref {#installation} {installation instructions},}
{\ref {#map-features} {map features},}
{\ref {#use-röntgen-as-josm-map-paint-style} {using Röntgen as JOSM style}.}
\2 {Usage example} {usage-example}
\code {map-machine render -b=2.284,48.860,2.290,48.865} {bash}
@ -191,9 +196,11 @@ Requirements\: Python 3.9/* or higher*/.
\list
{Install \ref {https://www.cairographics.org/download/} {cairo 2D graphic library},}
{install \ref {https://libgeos.org} {GEOS library},}
{install Python packages\:}
{install Python packages with the command\:}
\code {pip install .} {bash}
\code {pip install git+https://github.com/enzet/map-machine} {shell}
For more detailed instructions, see \ref {doc/INSTALL.md} {instructions}.
\2 {Map generation} {map-generation}
@ -316,7 +323,7 @@ To create MapCSS with Map Machine style also for ways and relations, run \m {map
\options {mapcss}
\3 {Use Map Machine as JOSM map paint style}
\3 {Use Röntgen as JOSM map paint style} {use-rntgen-as-josm-map-paint-style}
\list
{Run \m {\command {mapcss}}.}