diff --git a/README.md b/README.md index 4db480c..59df07c 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,13 @@ Usage example ------------- ```shell -map-machine render -b=2.284,48.860,2.290,48.865 +map-machine render -b 2.284,48.860,2.290,48.865 ``` will automatically download OSM data and render an SVG map of the specified area to `out/map.svg`. See [Map generation](#map-generation). ```shell -map-machine tile -b=2.361,48.871,2.368,48.875 +map-machine tile -b 2.361,48.871,2.368,48.875 ``` will automatically download OSM data and render PNG tiles that cover the specified area to the `out/tiles` directory. See [Tile generation](#tile-generation). @@ -65,7 +65,7 @@ With `--buildings isometric` or `--buildings isometric-no-parts` (not set by def #### Example #### ```shell -map-machine render -c=-26.19049,28.05605 -s 600,400 --buildings isometric +map-machine render -c -26.19049,28.05605 -s 600,400 --buildings isometric ``` ![3D buildings](doc/buildings.svg) @@ -194,9 +194,9 @@ The `render` command is used to generate an SVG map from OpenStreetMap data. You ```shell map-machine render \ - -b=,,, \ - -o= \ - -z= \ + -b ,,, \ + -o \ + -z \ ``` @@ -204,8 +204,8 @@ map-machine render \ ```shell map-machine render \ - --boundary-box=2.284,48.860,2.290,48.865 \ - --output=out/esplanade_du_trocadéro.svg + --boundary-box 2.284,48.860,2.290,48.865 \ + --output out/esplanade_du_trocadéro.svg ``` will download OSM data to `cache/2.284,48.860,2.290,48.865.osm` and render an SVG map of the specified area to `out/esplanade_du_trocadéro.svg`. @@ -216,10 +216,10 @@ will download OSM data to `cache/2.284,48.860,2.290,48.865.osm` and render an SV |---|---| | `-i`, `--input` `` | input XML file name or names (if not specified, file will be downloaded using the OpenStreetMap API) | | `-o`, `--output` `` | output SVG file name, default value: `out/map.svg` | -| `-b`, `--boundary-box` `,,,` | geo boundary box; if the first value is negative, use the `=` sign or enclose the value with quotes and prefix a space before `-`, e.g. `-b=-84.752,39.504,-84.749,39.508` or `-b " -84.752,39.504,-84.749,39.508"` | +| `-b`, `--boundary-box` `,,,` | geo boundary box | | `--cache` `` | path for temporary OSM files, default value: `cache` | | `-z`, `--zoom` `` | OSM zoom level, default value: 18.0 | -| `-c`, `--coordinates` `,` | coordinates of any location inside the tile; if the first value is negative, use the `=` sign or enclose the value with quotes and prefix a space before `-`, e.g. `-c=-84.752,39.504` or `-c " -84.752,39.504"` | +| `-c`, `--coordinates` `,` | coordinates of any location inside the tile | | `-s`, `--size` `,` | resulted image size | plus [map configuration options](#map-options) @@ -231,10 +231,10 @@ Command `tile` is used to generate PNG tiles for [slippy maps](https://wiki.open | Option | Description | |---|---| -| `-c`, `--coordinates` `,` | coordinates of any location inside the tile; if the first value is negative, use the `=` sign or enclose the value with quotes and prefix a space before `-`, e.g. `-c=-84.752,39.504` or `-c " -84.752,39.504"` | +| `-c`, `--coordinates` `,` | coordinates of any location inside the tile | | `-t`, `--tile` `//` | tile specification | | `--cache` `` | path for temporary OSM files, default value: `cache` | -| `-b`, `--boundary-box` `,,,` | construct the minimum amount of tiles that cover the requested boundary box; if the first value is negative, use the `=` sign or enclose the value with quotes and prefix a space before `-`, e.g. `-b=-84.752,39.504,-84.749,39.508` or `-b " -84.752,39.504,-84.749,39.508"` | +| `-b`, `--boundary-box` `,,,` | construct the minimum amount of tiles that cover the requested boundary box | | `-z`, `--zoom` `` | OSM zoom levels; can be list of numbers or ranges, e.g. `16-18`, `16,17,18`, or `16,18-20`, default value: `18` | | `-i`, `--input` `` | input OSM XML file name (if not specified, the file will be downloaded using the OpenStreetMap API) | @@ -252,8 +252,8 @@ or specify any geographical coordinates inside a tile: ```shell map-machine tile \ - --coordinates=, \ - --zoom= + --coordinates , \ + --zoom ``` The tile will be stored as an SVG file `out/tiles/tile___.svg` and a PNG file `out/tiles/tile___.svg`, where `x` and `y` are tile coordinates. The `--zoom` option will be ignored if it is used with the `--tile` option. @@ -261,7 +261,7 @@ The tile will be stored as an SVG file `out/tiles/tile___.svg` Example: ```shell -map-machine tile -c=55.7510637,37.6270761 -z=18 +map-machine tile -c 55.7510637,37.6270761 -z 18 ``` will generate an SVG file `out/tiles/tile_18_158471_81953.svg` and a PNG file `out/tiles/tile_18_158471_81953.png`. @@ -272,8 +272,8 @@ Specify the boundary box to get the minimal set of tiles that covers the area: ```shell map-machine tile \ - --boundary-box=,,, \ - --zoom= + --boundary-box ,,, \ + --zoom ``` The boundary 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 boundary 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___.svg` and PNG files `out/tiles/tile___.svg`, where `x` and `y` are tile coordinates. @@ -281,7 +281,7 @@ The boundary box will be extended to the boundaries of the minimal tileset that Example: ```shell -map-machine tile -b=2.361,48.871,2.368,48.875 +map-machine tile -b 2.361,48.871,2.368,48.875 ``` will generate 36 PNG tiles at zoom level 18 from tile 18/132791/90164 all the way to 18/132796/90169 and two cached files `cache/2.360,48.869,2.370,48.877_18.svg` and `cache/2.360,48.869,2.370,48.877_18.png`. @@ -307,7 +307,7 @@ Stop server interrupting the process with Ctrl + C. Create a minimal amount of tiles that cover specified boundary box for zoom levels 16, 17, 18, and 19: ```shell -map-machine tile -b=2.364,48.854,2.367,48.857 -z=16-19 +map-machine tile -b 2.364,48.854,2.367,48.857 -z 16-19 ``` Run tile server on 127.0.0.1:8080: diff --git a/doc/moi/readme.moi b/doc/moi/readme.moi index a56dc96..49af808 100644 --- a/doc/moi/readme.moi +++ b/doc/moi/readme.moi @@ -21,11 +21,11 @@ See \2 {Usage example} {usage-example} -\code {shell} {map-machine render -b=2.284,48.860,2.290,48.865} +\code {shell} {map-machine render -b 2.284,48.860,2.290,48.865} will automatically download OSM data and render an SVG map of the specified area to \m {out/map.svg}. See \ref {#map-generation} {Map generation}. -\code {shell} {map-machine tile -b=2.361,48.871,2.368,48.875} +\code {shell} {map-machine tile -b 2.361,48.871,2.368,48.875} will automatically download OSM data and render PNG tiles that cover the specified area to the \m {out/tiles} directory. See \ref {#tile-generation} {Tile generation}. @@ -53,7 +53,7 @@ With \m {--buildings isometric} or \m {--buildings isometric-no-parts} (not set \4 {Example} -\code {shell} {map-machine render -c=-26.19049,28.05605 -s 600,400 --buildings isometric} +\code {shell} {map-machine render -c -26.19049,28.05605 -s 600,400 --buildings isometric} \image {doc/buildings.svg} {3D buildings} @@ -233,16 +233,16 @@ For more detailed instructions, see \ref {doc/INSTALL.md} {instructions}. The \m {render} command is used to generate an SVG map from OpenStreetMap data. You can run it using\: \code {shell} {map-machine render \\ - -b=\formal {min longitude},\formal {min latitude},\formal {max longitude},\formal {max latitude} \\ - -o=\formal {output file name} \\ - -z=\formal {OSM zoom level} \\ + -b \formal {min longitude},\formal {min latitude},\formal {max longitude},\formal {max latitude} \\ + -o \formal {output file name} \\ + -z \formal {OSM zoom level} \\ \formal {other arguments}} \3 {Example} {example} \code {shell} {map-machine render \\ - --boundary-box=2.284,48.860,2.290,48.865 \\ - --output=out/esplanade_du_trocadéro.svg} + --boundary-box 2.284,48.860,2.290,48.865 \\ + --output out/esplanade_du_trocadéro.svg} will download OSM data to \m {cache/2.284,48.860,2.290,48.865.osm} and render an SVG map of the specified area to \m {out/esplanade_du_trocadéro.svg}. @@ -269,14 +269,14 @@ Specify the tile coordinates\: or specify any geographical coordinates inside a tile\: \code {shell} {map-machine tile \\ - --coordinates=\formal {latitude},\formal {longitude} \\ - --zoom=\formal {OSM zoom levels}} + --coordinates \formal {latitude},\formal {longitude} \\ + --zoom \formal {OSM zoom levels}} The tile will be stored as an SVG file \m {out/tiles/tile___.svg} and a PNG file \m {out/tiles/tile___.svg}, where \m {x} and \m {y} are tile coordinates. The \m {--zoom} option will be ignored if it is used with the \m {--tile} option. Example\: -\code {shell} {map-machine tile -c=55.7510637,37.6270761 -z=18} +\code {shell} {map-machine tile -c 55.7510637,37.6270761 -z 18} will generate an SVG file \m {out/tiles/tile_18_158471_81953.svg} and a PNG file \m {out/tiles/tile_18_158471_81953.png}. @@ -285,14 +285,14 @@ will generate an SVG file \m {out/tiles/tile_18_158471_81953.svg} and a PNG file Specify the boundary box to get the minimal set of tiles that covers the area\: \code {shell} {map-machine tile \\ - --boundary-box=\formal {min longitude},\formal {min latitude},\formal {max longitude},\formal {max latitude} \\ - --zoom=\formal {OSM zoom levels}} + --boundary-box \formal {min longitude},\formal {min latitude},\formal {max longitude},\formal {max latitude} \\ + --zoom \formal {OSM zoom levels}} The boundary 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 boundary box coordinates will be written to the cache directory as SVG and PNG files. All tiles will be stored as SVG files \m {out/tiles/tile___.svg} and PNG files \m {out/tiles/tile___.svg}, where \m {x} and \m {y} are tile coordinates. Example\: -\code {shell} {map-machine tile -b=2.361,48.871,2.368,48.875} +\code {shell} {map-machine tile -b 2.361,48.871,2.368,48.875} will generate 36 PNG tiles at zoom level 18 from tile 18/132791/90164 all the way to 18/132796/90169 and two cached files \m {cache/2.360,48.869,2.370,48.877_18.svg} and \m {cache/2.360,48.869,2.370,48.877_18.png}. @@ -310,7 +310,7 @@ Stop server interrupting the process with \kbd {Ctrl} + \kbd {C}. Create a minimal amount of tiles that cover specified boundary box for zoom levels 16, 17, 18, and 19\: -\code {shell} {map-machine tile -b=2.364,48.854,2.367,48.857 -z=16-19} +\code {shell} {map-machine tile -b 2.364,48.854,2.367,48.857 -z 16-19} Run tile server on 127.0.0.1\:8080\: