You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
# Contributing
7
7
8
-
Thank you for your interest in the Map Machine project. Since the primary goal of the project is to cover as many tags as possible, the project is crucially depend on contributions as OpenStreetMap itself.
8
+
Thank you for your interest in the Map Machine project. Since the primary goal of the project is to cover as many tags as possible, the project crucially depends on contributions just as OpenStreetMap itself.
9
9
10
10
## Modify the code
11
11
@@ -37,15 +37,15 @@ If you are using PyCharm, you may want to set up user dictionary as well:
37
37
38
38
### Code style
39
39
40
-
We use [Black](http://github.com/psf/black) code formatter version 22.6 with maximum 80 characters line length for all Python files within the project. Reformat a file is as simple as `black -l 80 <file name>`. Reformat everything with `black -l 80 map_machine tests`.
40
+
We use the [Ruff](https://github.com/astral-sh/ruff) linter and formatter with a maximum line length of 80 characters for all Python files within the project. Reformatting a file is as simple as `ruff format <file name>`. Reformat everything with `ruff format map_machine tests`.
41
41
42
42
If you create new Python file, make sure you add `__author__ = "<first name> <second name>"` and `__email__ = "<author e-mail>"` string variables.
43
43
44
44
### Commit message format
45
45
46
-
The project uses commit messages that starts with a verb in infinitive form with first letter in uppercase, ends with a dot, and is not longer than 50 characters. E.g. `Add new icon.` or `Fix labels.`
46
+
The project uses commit messages that start with a verb in infinitive form with the first letter in uppercase, end with a dot, and are not longer than 50 characters. E.g. `Add new icon.` or `Fix labels.`
47
47
48
-
If some issues or pull requests are referenced, commit message should starts with prefix such as `PR #123: `, `Issue #42: `, or `Fix #13: ` with the next letter in lowercase. E.g. `PR #123: refactor elements.` or `Issue #42: add icon for natural=tree.`
48
+
If some issues or pull requests are referenced, the commit message should start with a prefix such as `PR #123: `, `Issue #42: `, or `Fix #13: ` with the next letter in lowercase. E.g. `PR #123: refactor elements.` or `Issue #42: add icon for natural=tree.`
49
49
50
50
## Suggest a tag to support
51
51
@@ -57,5 +57,5 @@ Please, create an issue describing the current behavior, expected behavior, and
57
57
58
58
## Fix a typo in documentation
59
59
60
-
This action is not that easy as it supposed to be. We use [Moire](http://github.com/enzet/Moire) markup and converter to automatically generate documentation for GitHub, website, and [OpenStreetMap wiki](http://wiki.openstreetmap.org/). That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in `doc` directory (e.g. `doc/readme.moi` for `README.md`), modify it, and run `python map_machine/moire_manager.py`.
60
+
This action is not that easy as it supposed to be. We use [Moire](http://github.com/enzet/Moire) markup and converter to automatically generate documentation for GitHub, website, and [OpenStreetMap wiki](http://wiki.openstreetmap.org/). That's why editing Markdown files is not allowed. To fix a typo, open the corresponding Moire file in the `doc` directory (e.g. `doc/moi/readme.moi` for `README.md`), modify it, and run `python map_machine/doc/moire_manager.py`.
Copy file name to clipboardExpand all lines: README.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
**Map Machine** is a Python OpenStreetMap renderer that **can easily create static SVG maps** out of OpenStreetMap data. It also can generate PNG tiles for [slippy maps](https://wiki.openstreetmap.org/wiki/Slippy_Map) and run a tile server for them. It uses the Röntgen icon set ([site](https://enzet.ru/roentgen), [GitHub](https://github.com/enzet/Roentgen)) to display map features.
7
7
8
-
The idea behind the combination of the Röntgen icon set and the Map Machine project is to have a possibility to **show all the richness of the OpenStreetMap data**: to display any map feature represented by OpenStreetMap data tags by means of colors, shapes, and icons. For contributors it means possibility to display all changes even if they are small. And map users can dig down into the map and find every detail that was mapped.
8
+
The idea behind the combination of the Röntgen icon set and the Map Machine project is to have a possibility to **show all the richness of the OpenStreetMap data**: to display any map feature represented by OpenStreetMap data tags by means of colors, shapes, and icons. For contributors it means the possibility of displaying all changes even if they are small. And map users can dig down into the map and find every detail that was mapped.
9
9
10
10
Unlike standard OpenStreetMap renderers, **Map Machine is a playground for experiments** where one can easily try to support any unsupported tag, proposed tagging scheme, tags with little or even single usage, deprecated ones that are still in use.
To determine the road width Map Machine uses the [`width`](https://wiki.openstreetmap.org/wiki/Key:width) tag value or estimates it based on the [`lanes`](https://wiki.openstreetmap.org/wiki/Key:lanes) value. If lane value is specified, it also draws lane separators. This map style is highly inspired by Christoph Hormann's post [Navigating the Maze](https://blog.imagico.de/navigating-the-maze-part-2/).
58
+
To determine the road width Map Machine uses the [`width`](https://wiki.openstreetmap.org/wiki/Key:width) tag value or estimates it based on the [`lanes`](https://wiki.openstreetmap.org/wiki/Key:lanes) value. If a lane value is specified, it also draws lane separators. This map style is highly inspired by Christoph Hormann's post [Navigating the Maze](https://blog.imagico.de/navigating-the-maze-part-2/).
[`direction`](https://wiki.openstreetmap.org/wiki/Key:direction) tag values for [`tourism`](https://wiki.openstreetmap.org/wiki/Key:tourism) = [`viewpoint`](https://wiki.openstreetmap.org/wiki/Tag:tourism=viewpoint) and [`camera:direction`](https://wiki.openstreetmap.org/wiki/Key:camera:direction) for [`man_made`](https://wiki.openstreetmap.org/wiki/Key:man_made) = [`surveillance`](https://wiki.openstreetmap.org/wiki/Tag:man_made=surveillance) are rendered with sectors displaying the direction and angle (15º if angle is not specified) or the whole circle for panorama view. Radial gradient is used for surveillance and inverted radial gradient is used for viewpoints.
87
+
[`direction`](https://wiki.openstreetmap.org/wiki/Key:direction) tag values for [`tourism`](https://wiki.openstreetmap.org/wiki/Key:tourism) = [`viewpoint`](https://wiki.openstreetmap.org/wiki/Tag:tourism=viewpoint) and [`camera:direction`](https://wiki.openstreetmap.org/wiki/Key:camera:direction) for [`man_made`](https://wiki.openstreetmap.org/wiki/Key:man_made) = [`surveillance`](https://wiki.openstreetmap.org/wiki/Tag:man_made=surveillance) are rendered with sectors displaying the direction and angle (15º if angle is not specified) or the whole circle for panorama view. A radial gradient is used for surveillance and an inverted radial gradient is used for viewpoints.
88
88
89
89
#### Example
90
90
@@ -122,7 +122,7 @@ Japanese maps usually use [special symbols](https://en.wikipedia.org/wiki/List_o
122
122
123
123
### Indoor features
124
124
125
-
Indoor features can be visualized by specifying level with `--level` option. Possible values are numbers (e.g. `1`, `0.5`), lists of number separated by `;` (e.g. `1;2;4;4.5`), `all`, `overground`, and `underground`. The default value is not `all`, but `overground`, so underground objects are not shown on the map if `--level` option is not specified.
125
+
Indoor features can be visualized by specifying level with `--level` option. Possible values are numbers (e.g. `1`, `0.5`), lists of numbers separated by `;` (e.g. `1;2;4;4.5`), `all`, `overground`, and `underground`. The default value is not `all`, but `overground`, so underground objects are not shown on the map if `--level` option is not specified.
126
126
127
127
#### Example
128
128
@@ -138,7 +138,7 @@ One of the key features of Map Machine is constructing icons from several shapes
138
138
139
139
#### Masts
140
140
141
-
For [`man_made`](https://wiki.openstreetmap.org/wiki/Key:man_made) = [`mast`](https://wiki.openstreetmap.org/wiki/Tag:man_made=mast) distinguish types (communication, lighting, monitoring, and siren) and construction (freestanding or lattice, and using of guys) are rendered by combining 7 unique icon shapes.
141
+
For [`man_made`](https://wiki.openstreetmap.org/wiki/Key:man_made) = [`mast`](https://wiki.openstreetmap.org/wiki/Tag:man_made=mast), distinct types (communication, lighting, monitoring, and siren) and construction methods (freestanding or lattice, and use of guys) are rendered by combining 7 unique icon shapes.
142
142
143
143

144
144
@@ -158,7 +158,7 @@ Visualize element creation time with `--mode time`.
158
158
159
159
### Author mode
160
160
161
-
Every way and node displayed with the random color picked for each author with `--mode author`.
161
+
Every way and node is displayed with a random color picked for each author with `--mode author`.
162
162
163
163

164
164
@@ -203,6 +203,7 @@ will download OSM data to `cache/2.284,48.860,2.290,48.865.osm` and render an SV
203
203
| Option | Description |
204
204
|---|---|
205
205
| <spanstyle="white-space: nowrap;">`--no-overpass`</span> | do not use Overpass API to download complete data for incomplete relations |
206
+
| <spanstyle="white-space: nowrap;">`--overpass-query`</span> `<path>`| path to a custom Overpass query file; use {{bbox}} as a placeholder for the bounding box |
206
207
| <spanstyle="white-space: nowrap;">`-i`</span>, <spanstyle="white-space: nowrap;">`--input`</span> `<path>`| input XML file name or names (if not specified, files will be downloaded using the OpenStreetMap API) |
@@ -255,6 +256,7 @@ Command `tile` is used to generate PNG tiles for [slippy maps](https://wiki.open
255
256
| Option | Description |
256
257
|---|---|
257
258
| <spanstyle="white-space: nowrap;">`--no-overpass`</span> | do not use Overpass API to download complete data for incomplete relations |
259
+
| <spanstyle="white-space: nowrap;">`--overpass-query`</span> `<path>`| path to a custom Overpass query file; use {{bbox}} as a placeholder for the bounding box |
258
260
| <spanstyle="white-space: nowrap;">`-c`</span>, <spanstyle="white-space: nowrap;">`--coordinates`</span> `<latitude>,<longitude>`| coordinates of any location within the tile |
| <spanstyle="white-space: nowrap;">`--cache`</span> `<path>`| directory path for temporary OSM files, default value: `cache`|
@@ -280,7 +282,7 @@ map-machine tile \
280
282
--zoom <OSM zoom levels>
281
283
```
282
284
283
-
The tile will be stored as an SVG file `out/tiles/tile_<zoom level>_<x>_<y>.svg` and a PNG file `out/tiles/tile_<zoom level>_<x>_<y>.svg`, where `x` and `y` are tile coordinates. The `--zoom` option will be ignored if it is used with the `--tile` option.
285
+
The tile will be stored as an SVG file `out/tiles/tile_<zoom level>_<x>_<y>.svg` and a PNG file `out/tiles/tile_<zoom level>_<x>_<y>.png`, where `x` and `y` are tile coordinates. The `--zoom` option will be ignored if it is used with the `--tile` option.
284
286
285
287
Example:
286
288
@@ -300,7 +302,7 @@ map-machine tile \
300
302
--zoom <OSM zoom levels>
301
303
```
302
304
303
-
The bounding box will be extended to the boundaries of the minimal tileset that covers the area, then it will be extended a bit more to avoid some artifacts on the edges rounded to 3 digits after the decimal point. The map with the new bounding box coordinates will be written to the cache directory as SVG and PNG files. All tiles will be stored as SVG files `out/tiles/tile_<zoom level>_<x>_<y>.svg` and PNG files `out/tiles/tile_<zoom level>_<x>_<y>.svg`, where `x` and `y` are tile coordinates.
305
+
The bounding box will be extended to the boundaries of the minimal tileset that covers the area, then it will be extended a bit more to avoid some artifacts on the edges rounded to 3 digits after the decimal point. The map with the new bounding box coordinates will be written to the cache directory as SVG and PNG files. All tiles will be stored as SVG files `out/tiles/tile_<zoom level>_<x>_<y>.svg` and PNG files `out/tiles/tile_<zoom level>_<x>_<y>.png`, where `x` and `y` are tile coordinates.
@@ -372,21 +374,21 @@ Map configuration options used by `render` and `tile` commands:
372
374
| Option | Description |
373
375
|---|---|
374
376
| <spanstyle="white-space: nowrap;">`--scheme`</span> `<id> or <path>`| scheme identifier (look for `<id>.yml` file) or path to a YAML scheme file, default value: `default`|
375
-
| <spanstyle="white-space: nowrap;">`--buildings`</span> `<mode>`| building drawing mode: no, flat, isometric, isometric-no-parts, default value: `flat`|
| <spanstyle="white-space: nowrap;">`--mode`</span> `<string>`| map drawing mode (overrides scheme): normal, author, time, white, black |
378
380
| <spanstyle="white-space: nowrap;">`--overlap`</span> `<integer>`| size of the margin in pixels to leave around icons and text, default value: 12 |
379
-
| <spanstyle="white-space: nowrap;">`--labels`</span> `<string>`| label drawing mode: no, main, all, address, default value: `main`|
381
+
| <spanstyle="white-space: nowrap;">`--labels`</span> `<string>`| label drawing mode (overrides scheme): no, main, all, address |
380
382
| <spanstyle="white-space: nowrap;">`--level`</span> | display only the specified floor level, default value: `overground`|
381
383
| <spanstyle="white-space: nowrap;">`--seed`</span> `<string>`| seed for random number generation |
382
384
| <spanstyle="white-space: nowrap;">`--tooltips`</span> | add tooltips with tags for icons in SVG files |
383
385
| <spanstyle="white-space: nowrap;">`--country`</span> | two-letter code (ISO 3166-1 alpha-2) of the country that should be used for location restrictions, default value: `world`|
384
386
| <spanstyle="white-space: nowrap;">`--ignore-level-matching`</span> | draw all map features, ignoring the current level |
385
-
| <spanstyle="white-space: nowrap;">`--roofs`</span> | draw building roofs, enabled by default|
386
-
| <spanstyle="white-space: nowrap;">`--building-colors`</span> | paint walls (if isometric mode is enabled) and roofs with specified colors|
387
+
| <spanstyle="white-space: nowrap;">`--roofs`</span> | draw building roofs (overrides scheme)|
388
+
| <spanstyle="white-space: nowrap;">`--building-colors`</span> `<string>`| building color mode (overrides scheme): no, full, hue|
387
389
| <spanstyle="white-space: nowrap;">`--show-overlapped`</span> | show hidden nodes with a dot |
0 commit comments