├── LICENSE ├── README.md ├── images ├── map_1.png ├── map_2_export.png ├── map_3_select_area.png ├── map_4_overpass.png └── plotting_image.png ├── index.html ├── map.osm └── map_to_grid.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Piet Brömmel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plotting Maps 2 | 3 | This is a tool to easily create OpenStreetMap SVG maps to plot them with a pen plotter. Check out the tool here: https://piebro.github.io/plotting-maps. There, you can upload OSM exports and render them as SVGs consisting only of lines, making it very pen plotter-friendly. 4 | 5 | ## How to Use 6 | 7 | 1. Use a **Desktop Browser** or enable desktop browsing on mobile. 8 | 2. Go to https://www.openstreetmap.org. 9 | 3. Navigate to a place of interest: 10 |  11 | 4. Click on "Export" (only visible on desktop): 12 |  13 | 5. Select the area of interest: 14 |  15 | 6. Download the data via the Overpass API (you can also use the export button, but the size of the export is more limited): 16 |  17 | 7. Download the file and upload it to https://piebro.github.io/plotting-maps using the "Upload OSM Export" button. 18 | 8. Set all options and align the map by dragging and zooming. 19 | 9. Download the map using the "Download Map" button. 20 | 21 | An alternative way to obtain OSM Map Extracts is to use a [public Overpass API instance](https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances) and download an area with a query. 22 | 23 | ## Plot the Map 24 | 25 | I use [vpype](https://github.com/abey79/vpype) and [axicli](https://axidraw.com/doc/cli_api/) to plot the map with my [AxiDraw Pen Plotter](https://shop.evilmadscientist.com/productsmenu/846). 26 | 27 | I use linemerge and linesort to make the plotting faster, 28 | ```bash 29 | vpype read map.svg \ 30 | linemerge --tolerance 1mm \ 31 | linesort \ 32 | write \ 33 | --page-size 400x266mm \ 34 | --center \ 35 | plot.svg 36 | ``` 37 | 38 | create a preview to check the plotting time, 39 | ```bash 40 | axicli plot.svg --model 2 -vg3 --speed_pendown 15 --report_time -o preview.svg 41 | ``` 42 | 43 | and finally, plot the map. 44 | ```bash 45 | axicli plot.svg --model 2 --speed_pendown 15 && axicli -m align 46 | ``` 47 | 48 | Plotting a map on an A3 piece of paper. 49 | 50 |  51 | 52 | If you want to plot the map on mulitple piece of papers, you can use the `map_to_grid.sh` script. 53 | 54 | A similar, cool project with a different UX and output is: https://github.com/anvaka/city-roads/ and another project to visualize maps in a custom way (also for plotters) is: https://github.com/marceloprates/prettymaps 55 | 56 | ## Contributing 57 | 58 | Contributions to this project are welcome. Feel free to report bugs, suggest ideas, or create merge requests. 59 | 60 | ## Developing 61 | 62 | The project uses [Prettier](https://prettier.io/playground/) for linting javascript with a `print-width` of 120, `tab-width` of 4, and using single quotes. 63 | 64 | ## Website Statistics 65 | 66 | There is lightweight tracking for the website using Plausible. Anyone interested can view these statistics at https://plausible.io/piebro.github.io%2Fplotting-maps. It's worth noting that these statistics might be an underestimate as many users, including myself, use AdBlockers. 67 | 68 | ## License 69 | 70 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. The Example map.osm file is licensed under [ODbL](https://www.openstreetmap.org/copyright) -------------------------------------------------------------------------------- /images/map_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piebro/plotting-maps/a3bea76be876993fadd295357986201a73870c57/images/map_1.png -------------------------------------------------------------------------------- /images/map_2_export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piebro/plotting-maps/a3bea76be876993fadd295357986201a73870c57/images/map_2_export.png -------------------------------------------------------------------------------- /images/map_3_select_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piebro/plotting-maps/a3bea76be876993fadd295357986201a73870c57/images/map_3_select_area.png -------------------------------------------------------------------------------- /images/map_4_overpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piebro/plotting-maps/a3bea76be876993fadd295357986201a73870c57/images/map_4_overpass.png -------------------------------------------------------------------------------- /images/plotting_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piebro/plotting-maps/a3bea76be876993fadd295357986201a73870c57/images/plotting_image.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |