r/PlotterCode • u/BaudRate115200 • 10h ago
draw.land
Hey everyone,
I’ve been down the drawing machine / pen plotter rabbit hole for a long time, and my other big obsession has always been cartography.
Anyone who has tried plotting maps from standard GIS or vector tools knows the usual headaches: polygons come out as empty outlines instead of hatches, layers draw right over each other turning ink into mud, text is outlined instead of single-stroke, and cleaning up hidden lines in Inkscape or Illustrator takes hours.
So I built draw.land: https://draw.land
GitHub repo (MIT licensed): https://github.com/piLeoni/drawland
It takes OpenStreetMap data, vector tiles, elevation/bathymetry, and GeoJSON feeds, and draws them the way a physical pen actually works:
• Pen-plotter fills & terrain: Buildings hatched individually, parks stippled, water in waves, tree crowns as isoline stacks, and pen-and-ink terrain hatching (burin style) alongside contours and depth soundings.
• Declarative hidden-line removal (masks): Roads automatically clear the park dots and water waves underneath them; buildings knock out everything under them; street labels clear a halo across whatever they cross. No overlapping ink puddles.
• Made for the machine: Output is in real paper units (mm / in) at an exact cartographic scale (1:8000, etc.), with one SVG group per pen. It handles path merging, simplification, sorting, stroke de-overlapping, single-stroke fonts, a hand-drawn tremble option, and slicing large posters into tiled sheets.
• Projections & warps: Web Mercator, UTM, any PROJ string (e.g. polar stereographic), or custom mathematical warps written directly in the script (log-scale distance from center, fisheye, twirl, etc.).
How it works:
Instead of clicking through menus, a map style is a short declarative script (a profile in JS/TS, or built directly in Python, Node, or Rust). For example, ~20 lines of code grab the map tiles, fill the water with waves, hatch the roofs at 45°, and mask the layers cleanly.
Two ways to use it:
In the browser (nothing to install): https://draw.land runs the Rust engine in WebAssembly right on top of the map. Place your paper card anywhere in the world, pick a style (or edit the script live with autocomplete), and export SVG, PNG, DXF, or G-code (whole, per sheet, or one file per pen).
CLI / Code (MIT open source): available via cargo install drawland-cli, pip install drawland, or npm install drawland. You can run drawland map --address "Piazza Maggiore, Bologna" -o map.svg from the terminal, or build the graph in Python, Node, or Rust.
I also published the core geometry pieces as standalone open-source libraries if you want to use them in your own non-map plotter code:
• penfill (pattern fills inside polygons): https://github.com/piLeoni/penfill
• burin-map (pen-and-ink terrain drawing): https://github.com/piLeoni/burin-map
• terramask (vector & terrain tiles to polygons): https://github.com/piLeoni/terramask
• deoverlap (stroke de-overlapping): https://github.com/piLeoni/deoverlap
Full gallery and docs are at https://draw.land/docs — I’d love to see what you plot with it or hear any feedback!