Merge main.

This commit is contained in:
Sergey Vartanov 2022-09-10 13:41:56 +03:00
commit 40186aa736
6 changed files with 31 additions and 34 deletions

View file

@ -8,8 +8,8 @@ Modify the code
**IMPORTANT** ❗ Before committing please enable Git hooks: **IMPORTANT** ❗ Before committing please enable Git hooks:
```git config --local core.hooksPath data/githooks ```shell
shell git config --local core.hooksPath data/githooks
``` ```
This will allow you to automatically check your commit message and code before committing and pushing changes. This will crucially speed up pull request merging and make Git history neat and uniform. This will allow you to automatically check your commit message and code before committing and pushing changes. This will crucially speed up pull request merging and make Git history neat and uniform.
@ -22,8 +22,8 @@ Activate virtual environment. E.g. for fish shell, run `source venv/bin/activate
Install the project in editable mode: Install the project in editable mode:
```pip install -e . ```shell
shell pip install -e .
``` ```
Install formatter, linter and test system: `pip install black flake8 mypy pytest pytest-cov`. Install formatter, linter and test system: `pip install black flake8 mypy pytest pytest-cov`.

View file

@ -25,8 +25,8 @@ See
Usage example Usage example
------------- -------------
```map-machine render -b=2.284,48.860,2.290,48.865 ```shell
bash map-machine render -b=2.284,48.860,2.290,48.865
``` ```
will automatically download OSM data and write output SVG map of the specified area to `out/map.svg`. See [Map generation](#map-generation). will automatically download OSM data and write output SVG map of the specified area to `out/map.svg`. See [Map generation](#map-generation).
@ -142,8 +142,8 @@ Requirements: Python 3.9.
* install [GEOS library](https://libgeos.org), * install [GEOS library](https://libgeos.org),
* install Python packages with the command: * install Python packages with the command:
```pip install git+https://github.com/enzet/map-machine@no-cairo ```shell
shell pip install git+https://github.com/enzet/map-machine@no-cairo
``` ```
For more detailed instructions, see [instructions](doc/INSTALL.md). For more detailed instructions, see [instructions](doc/INSTALL.md).
@ -153,20 +153,20 @@ Map generation
Command `render` is used to generate SVG map from OpenStreetMap data. You can run it using: Command `render` is used to generate SVG map from OpenStreetMap data. You can run it using:
```map-machine render \ ```shell
-b=,,, \ map-machine render \
-o= \ -b=<min longitude>,<min latitude>,<max longitude>,<max latitude> \
-z= \ -o=<output file name> \
-z=<OSM zoom level> \
bash <other arguments>
``` ```
### Example ### ### Example ###
```map-machine render \ ```shell
map-machine render \
--boundary-box=2.284,48.860,2.290,48.865 \ --boundary-box=2.284,48.860,2.290,48.865 \
--output=out/esplanade_du_trocadéro.svg --output=out/esplanade_du_trocadéro.svg
bash
``` ```
will download OSM data to `cache/2.284,48.860,2.290,48.865.osm` and write an output SVG map of the specified area to `out/esplanade_du_trocadéro.svg`. will download OSM data to `cache/2.284,48.860,2.290,48.865.osm` and write an output SVG map of the specified area to `out/esplanade_du_trocadéro.svg`.

View file

@ -8,18 +8,15 @@ Installation examples
### Ubuntu ### ### Ubuntu ###
``` ```shell
apt install libgeos-dev apt install libgeos-dev
pip install git+https://github.com/enzet/map-machine@no-cairo pip install git+https://github.com/enzet/map-machine@no-cairo
shell
``` ```
### macOS ### ### macOS ###
``` ```shell
brew install geos brew install geos
pip install git+https://github.com/enzet/map-machine@no-cairo pip install git+https://github.com/enzet/map-machine@no-cairo
shell
``` ```

View file

@ -6,7 +6,7 @@ Thank you for your interest in the Map Machine project. Since the primary goal
❗ \b {IMPORTANT} ❗ Before committing please enable Git hooks: ❗ \b {IMPORTANT} ❗ Before committing please enable Git hooks:
\code {git config --local core.hooksPath data/githooks} {shell} \code {shell} {git config --local core.hooksPath data/githooks}
This will allow you to automatically check your commit message and code before committing and pushing changes. This will crucially speed up pull request merging and make Git history neat and uniform. This will allow you to automatically check your commit message and code before committing and pushing changes. This will crucially speed up pull request merging and make Git history neat and uniform.
@ -18,7 +18,7 @@ Activate virtual environment. E.g. for fish shell, run \m {source venv/bin/acti
Install the project in editable mode: Install the project in editable mode:
\code {pip install -e .} {shell} \code {shell} {pip install -e .}
Install formatter, linter and test system\: \m {pip install black flake8 mypy pytest pytest-cov}. Install formatter, linter and test system\: \m {pip install black flake8 mypy pytest pytest-cov}.

View file

@ -6,14 +6,14 @@ Map Machine requires \ref {https://www.python.org} {Python} 3.9, \ref {https://p
\3 {Ubuntu} {ubuntu} \3 {Ubuntu} {ubuntu}
\code { \code {shell} {
apt install libgeos-dev apt install libgeos-dev
pip install git+https://github.com/enzet/map-machine@no-cairo pip install git+https://github.com/enzet/map-machine@no-cairo
} {shell} }
\3 {macOS} {macos} \3 {macOS} {macos}
\code { \code {shell} {
brew install geos brew install geos
pip install git+https://github.com/enzet/map-machine@no-cairo pip install git+https://github.com/enzet/map-machine@no-cairo
} {shell} }

View file

@ -24,7 +24,7 @@ See
\2 {Usage example} {usage-example} \2 {Usage example} {usage-example}
\code {map-machine render -b=2.284,48.860,2.290,48.865} {bash} \code {shell} {map-machine render -b=2.284,48.860,2.290,48.865}
will automatically download OSM data and write output SVG map of the specified area to \m {out/map.svg}. See \ref {#map-generation} {Map generation}. will automatically download OSM data and write output SVG map of the specified area to \m {out/map.svg}. See \ref {#map-generation} {Map generation}.
@ -195,7 +195,7 @@ Requirements\: Python 3.9/* or higher*/.
{install \ref {https://libgeos.org} {GEOS library},} {install \ref {https://libgeos.org} {GEOS library},}
{install Python packages with the command\:} {install Python packages with the command\:}
\code {pip install git+https://github.com/enzet/map-machine@no-cairo} {shell} \code {shell} {pip install git+https://github.com/enzet/map-machine@no-cairo}
For more detailed instructions, see \ref {doc/INSTALL.md} {instructions}. For more detailed instructions, see \ref {doc/INSTALL.md} {instructions}.
@ -203,17 +203,17 @@ For more detailed instructions, see \ref {doc/INSTALL.md} {instructions}.
Command \m {render} is used to generate SVG map from OpenStreetMap data. You can run it using\: Command \m {render} is used to generate SVG map from OpenStreetMap data. You can run it using\:
\code {map-machine render \\ \code {shell} {map-machine render \\
-b=\formal {min longitude},\formal {min latitude},\formal {max longitude},\formal {max latitude} \\ -b=\formal {min longitude},\formal {min latitude},\formal {max longitude},\formal {max latitude} \\
-o=\formal {output file name} \\ -o=\formal {output file name} \\
-z=\formal {OSM zoom level} \\ -z=\formal {OSM zoom level} \\
\formal {other arguments}} {bash} \formal {other arguments}}
\3 {Example} {example} \3 {Example} {example}
\code {map-machine render \\ \code {shell} {map-machine render \\
--boundary-box=2.284,48.860,2.290,48.865 \\ --boundary-box=2.284,48.860,2.290,48.865 \\
--output=out/esplanade_du_trocadéro.svg} {bash} --output=out/esplanade_du_trocadéro.svg}
will download OSM data to \m {cache/2.284,48.860,2.290,48.865.osm} and write an output SVG map of the specified area to \m {out/esplanade_du_trocadéro.svg}. will download OSM data to \m {cache/2.284,48.860,2.290,48.865.osm} and write an output SVG map of the specified area to \m {out/esplanade_du_trocadéro.svg}.