Skip to content

A tool to easily create OpenStreetMap SVG maps to plot them with a pen plotter.

License

Notifications You must be signed in to change notification settings

piebro/plotting-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plotting Maps

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.

How to Use

  1. Use a Desktop Browser or enable desktop browsing on mobile.
  2. Go to https://www.openstreetmap.org.
  3. Navigate to a place of interest: Screenshot of OpenStreetMap
  4. Click on "Export" (only visible on desktop): Screenshot of OpenStreetMap with an arrow pointing to the "Export" button
  5. Select the area of interest: Screenshot of OpenStreetMap with an arrow pointing to the "Manually select a different area" link
  6. Download the data via the Overpass API (you can also use the export button, but the size of the export is more limited): Screenshot of OpenStreetMap with an arrow pointing to the "Overpass API" link
  7. Download the file and upload it to https://piebro.github.io/plotting-maps using the "Upload OSM Export" button.
  8. Set all options and align the map by dragging and zooming.
  9. 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.

Plot the Map

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.

Image of a plotter plotting a map

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

Contributing

Contributions to this project are welcome. Feel free to report bugs, suggest ideas, or create merge requests.

Developing

The project uses Prettier for linting javascript with a print-width of 120, tab-width of 4, and using single quotes.

Website Statistics

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.

License

This project is licensed under the MIT License - see the LICENSE file for details. The Example map.osm file is licensed under ODbL

Releases

No releases published

Packages

No packages published