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.
- Use a Desktop Browser or enable desktop browsing on mobile.
- Go to https://www.openstreetmap.org.
- Navigate to a place of interest:
- Click on "Export" (only visible on desktop):
- Select the area of interest:
- Download the data via the Overpass API (you can also use the export button, but the size of the export is more limited):
- Download the file and upload it to https://piebro.github.io/plotting-maps using the "Upload OSM Export" button.
- Set all options and align the map by dragging and zooming.
- Download the map using the "Download Map" button.
An alternative way to obtain OSM Map Extracts is to use a public Overpass API instance and download an area with a query.
I use vpype and axicli to plot the map with my AxiDraw Pen Plotter.
I use linemerge and linesort to make the plotting faster,
vpype read map.svg \
linemerge --tolerance 1mm \
linesort \
write \
--page-size 400x266mm \
--center \
plot.svg
create a preview to check the plotting time,
axicli plot.svg --model 2 -vg3 --speed_pendown 15 --report_time -o preview.svg
and finally, plot the map.
axicli plot.svg --model 2 --speed_pendown 15 && axicli -m align
Plotting a map on an A3 piece of paper.
If you want to plot the map on mulitple piece of papers, you can use the map_to_grid.sh
script.
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
Contributions to this project are welcome. Feel free to report bugs, suggest ideas, or create merge requests.
The project uses Prettier for linting javascript with a print-width
of 120, tab-width
of 4, and using single quotes.
There is lightweight tracking for the website using Plausible. Anyone interested can view these statistics at https://plausible.io/piebro.github.io/plotting-maps. It's worth noting that these statistics might be an underestimate as many users, including myself, use AdBlockers.
This project is licensed under the MIT License - see the LICENSE file for details. The Example map.osm file is licensed under ODbL