draw.land
Maps of any place on Earth, drawn for pen plotters. draw.land takes OpenStreetMap data, vector tiles and elevation, and draws them the way a pen would: buildings hatched, parks stippled, water in waves, roads at their real width, contours, depth soundings, names in single-stroke fonts. The result is one SVG in paper millimetres with one layer per pen, ready for an AxiDraw or any plotter, a laser or a cutter. How it looks is a short JavaScript profile you can write, change and share.

Two ways to use it
| Online, nothing to install | draw.land: place a card on a map, pick one of the styles, edit its profile with autocomplete, download SVG, PNG, DXF or G-code, whole, per sheet or per pen. The documentation (gallery, tutorial, concepts, every pattern, the full reference) lives there too. |
| From code | This repository, open source (MIT): the same engine as a command line, and a library you call from JavaScript or TypeScript, Python, Node or Rust. Write the style as a profile script, or build it in your own language. |
How it works
flowchart LR
JS["profile.js / .ts"] --> L
PY["Python<br/>drawland.Graph()"] --> L
NODE["Node<br/>new drawland.Graph()"] --> L
RS["Rust<br/>drawland_graph::Graph"] --> L
L["drawland-graph<br/>the library:<br/>checks, defaults, messages"] --> G["graph<br/>(JSON)"]
D["map data<br/>OpenStreetMap · vector tiles<br/>elevation · fonts · GeoJSON"] --> C
G --> C["drawland-core<br/>projection · fills · masks<br/>labels · plotter optimisation"]
C --> O["layered SVG<br/>one group per pen"]
A style never touches geometry: it describes the map (which data, made into which areas and lines, filled with which patterns, stacked and masked how) and builds a graph of operations. The engine, in Rust, runs the graph on the data, so the same style draws the same map everywhere.
The library a style calls (features.tiles, areas.union, fills.fill,
compose.mask…) is written once, in Rust (drawland-graph). JavaScript,
TypeScript, Python, Node and Rust are faces of that one library, equal: the
same functions, options, checks and error messages, and the same graph out.
A profile is a JavaScript or TypeScript file: the shareable form of a
style, the one draw.land's editor and gallery use.
| Piece | What it is | Where |
|---|---|---|
drawland-graph |
The library: every function a style calls, its checks, defaults and messages, building the graph. Called by name from JS and Python, with typed methods from Rust | crates/drawland-graph |
drawland-core |
The engine: runs the graph. Projections (web Mercator, UTM, any PROJ string, your own), fills, masks, labels, sheets, plotter optimisation. No network, no files | crates/drawland-core |
drawland-script |
Profiles: a sandboxed JavaScript interpreter (Boa) running the library's JavaScript face; drawland.d.ts describes it exactly |
crates/drawland-script |
drawland-ts |
TypeScript profiles: the types taken out, every line and column kept | crates/drawland-ts |
drawland |
All of the above plus everything a map reads: geocoding, Overpass, OpenFreeMap tiles, Terrarium elevation, fonts, datasets, cached on disk | crates/drawland |
drawland command |
drawland map <profile> |
crates/drawland-cli |
| Python package | import drawland: draw a profile, or build the graph in Python |
bindings/python |
| Node package | require('drawland'): the same, from Node, with TypeScript types |
bindings/node |
| draw.land | The web page: the engine compiled to WebAssembly, with a map, an editor and the styles | its own repository |
The patterns come from penfill, the pen-and-ink terrain from burin-map, the vector tiles as polygons from terramask, and stroke de-overlap from deoverlap: sibling libraries, each with its own Python and Node packages.
A profile
const bldg = features.
const buildings = areas.
const parks = areas.
const water = areas.
const roads = modules.
// The roads clear the dots and the waves under them; a building clears everything under it.
compose.
compose.
// The water keeps the dots out, and a hair round it keeps them off the shore line.
compose.
The script only builds a graph of operations; the engine runs it in Rust.
Every id is a group in the SVG, a pen of its own.
Use
Full documentation for the command line, Python, Node and Rust: draw.land/docs → For developers.
Command line
With no profile it draws the postcard, an example built in (crates/drawland/postcard.js).
| Argument | Does |
|---|---|
profile |
A profile script (.js, .ts) or a saved graph (.json); default postcard, the example built in |
--address / --lat --lng |
Where; overrides the profile's output({...}) |
--dump-graph |
Print the graph the profile builds, as JSON, and stop |
-o |
Output SVG (default map.svg) |
--per-layer |
Also one SVG per top-level layer (a file per pen) |
--slices |
For a card cut into sheets: whole, slices or both (default) |
--decimals |
Coordinate decimals in the SVG, 0 to 6 |
--cache |
Overpass / Nominatim response cache (default cache/; Overpass replies reused by any map they cover) |
--offline |
Use cached responses only |
--refresh |
Fetch again even when cached |
From a checkout: ./generate.sh "1730 Highland Pl, Berkeley, CA 94709"
writes exports/<address>/map.svg.
A profile can be TypeScript: drawland map style.ts takes the types out
and runs it, with errors at the line and column you wrote.
Python
Draw a profile:
=
# [(group id, strokes), …]: a group is a pen
or build the style in Python, with the same library:
=
=
=
Options are keywords with the library's own names (in_, from_ for in,
from); a view or a remap warp takes a Python function, and a GeoJSON
dataset can be any object with __geo_interface__ (a GeoDataFrame).
bindings/python · docs
Node
const drawland = require
// A profile
const map = await drawland.
map.
// or the graph built here: the library as a profile sees it, typed
const g =
g.
const water = g..
g.
;.
Rust
[]
= "0.3" # draws: the library, the downloads, the engine
= "0.3" # builds a graph, nothing else
use ;
use ;
let mut g = new;
g.output?;
let w = g.features.tiles?;
let water = g.areas.polygons?;
let waves = g.fills.fill?;
g.draw?;
let map = new.draw?;
map.save?;
A profile file draws the same way: Profile::read("city-grain.js".as_ref())?.
drawland-core alone draws a graph from bytes you fetched yourself, with no I/O.
crates/drawland-graph · docs
Gallery
Every picture below is an SVG written by drawland map. Each style is a
plain profile: open it on draw.land, save it from the
editor, and draw it here, anywhere.
What a profile can do
- Map data: vector tiles (OpenFreeMap), any Overpass query, GeoJSON and plain JSON from a file or a live URL, elevation and depth as contours, soundings or bands.
- Patterns: every penfill fill (hatches, dots, waves, isoline stacks, clouds, marble…) and burin-map terrain in pen and ink.
- Projections: web Mercator, UTM, any PROJ string (a pole on the page),
or one written in the script as a function of the page
(
warp: { remap }); fisheye, twirl and wave warps. - Composition: masks that clear exactly the layers they name, offset double lines for weight, labels that knock out what they cross, views of other places drawn into a rectangle of the page.
- The frame: a script reads its page and the ground under it
(
page,world,world.toPage,page.toWorld) to lay out grids, graticules, indexes and titles. - For the machine: merge, simplify, sort, de-overlap and a hand-drawn tremble; one SVG per pen; a card cut into sheets for a poster in tiles.
Profiles
A profile is a JavaScript or TypeScript file that calls the draw.land library: where the
map is and on what paper (output({...})), which map data to read
(features.tiles("buildings"), features.osm({ leisure: "park" })), what to
make of it (areas.*, lines.*, fills.fill, modules.roads()), and how to
ink and stack it (draw, compose). The script only builds a graph; the
engine runs the graph in Rust. A script can ask about its frame as it runs —
page (the paper) and world (the ground under it: centre, scale, bounds,
world.toPage({ lat, lng }), page.toWorld([x, y])) — but never about the
data: heights and the like come back as features with tags
(features.contours, features.soundings).
A profile can draw another place into a rectangle of its page in a style
named by its script: view({ id, at, size, lat, lng, scale }, "city-grain")
reads city-grain.js (or .ts) beside the profile, from JavaScript, Python
or Node alike.
crates/drawland-script/drawland.d.ts is the library's exact description: an
editor that knows TypeScript autocompletes and type-checks a profile against
it (a .ts profile with /// <reference path="drawland.d.ts" />, or a .js
one with // @ts-check). The Node package carries the same types for
Graph.
Repository layout
| Path | Role |
|---|---|
crates/drawland-graph |
The library: what a style calls, building the graph (src/library.rs) |
crates/drawland-core |
The graph's runner: projection, OSM and tiles → features, fills, compose, SVG. No I/O. |
crates/drawland-script |
Profile scripts: the JavaScript interpreter (Boa) and the library's JavaScript face (src/library.js) |
crates/drawland-ts |
TypeScript profiles, their types blanked out |
crates/drawland |
The library that draws a map: the script, the downloads and cache, the engine; the command line's code |
crates/drawland-cli |
The drawland binary |
bindings/python, bindings/node |
pip install drawland, npm install drawland |
configs/ |
Example profiles |
docs/gallery/ |
The README's pictures (drawn by the CLI from draw.land's styles) |
docs/architecture/ |
Architecture index for contributors and coding agents (AGENTS.md) |
reference/python/ |
The former Python pipeline, kept to read, not run |
Contributing
( && && && )
( && && )
The pattern types in drawland.d.ts are written from penfill's catalogue:
cargo run -p drawland-script --example write_dts (cargo test fails when
they are stale).
draw.land is developed against sibling checkouts of its own libraries:
penfill in ../penfill (fills), terramask in ../terramask (map tiles as
polygons, the sea, elevation bands), burin-map in ../burin-map (pen-and-ink
terrain) and deoverlap in ../deoverlap. Without them,
python3 scripts/registry-deps.py points the workspace at their published
versions on crates.io, which is what CI does. Start reading at
AGENTS.md and
docs/architecture/INDEX.md.
License
MIT. Use it, change it, ship it, in anything.