◆ Reference

Reference

The input format, every option with its default and effect, the output FlowSpec, the TikZ output and the command line. The four languages use the same JSON door (pipeline::run_json): field names are the same in all of them.

By language: Rust · JavaScript · Python · R.

Version 0.1, experimental: the API and the drawing contract may change before 1.0. This page is checked when the site is built: an option of the core missing here makes the build fail.

Input (JSON)

{
  "crs": "EPSG:31985", "units": "m", "additive": true,
  "nodes": [ { "id": "a", "x": 290513, "y": 9125881, "label": "A", "group": "g1",
               "groups": { "bairro": "g1", "regiao": "Centro" } }, … ],
  "flows": [ { "origin": "a", "destination": "b", "value": 291, "category": "bus" }, … ],
  "skeleton": [ ["a", "b"], … ],
  "boundary": [ [ [x, y], [x, y], … ], … ]
}
FieldType and defaultEffect
nodeslist, requiredThe places. Each id appears once.
nodes[].idnon-empty textIdentifier, used by the flows and the skeleton.
nodes[].x, yfinite numberPlanar coordinates, y up, in units much larger than 1/1024 (metres work; degrees do not). Absolute value up to ≈ 4.4 × 10¹².
nodes[].labeltext, optional (the id)The label drawn.
nodes[].weightnumber, optionalWeight in the group's centroid; used only when every member of the group has one (otherwise each node's volume; otherwise 1).
nodes[].grouptext, optionalThe node's group, with the option group: true. The group becomes a place with that name; it may not be named like a node that stays on its own.
nodes[].groupsobject {level: group}, optionalThe node's groups at several levels, for example {"zona": "Z12", "municipio": "Recife"}. With group: "municipio" aggregation uses that level; a node with no group at the level stays alone. The same file serves the figure at every level: see levels.
flowslist, requiredThe directed flows.
flows[].origin, destinationnode idAn unknown id is an error. Origin equal to destination becomes internal flow.
flows[].valuefinite number ≥ 0Zeros are dropped. Repeated flows (same origin, destination and category) are summed, and the spec warns in meta.warnings.
flows[].categorytext, optionalThe flow's category (mode, purpose). With lines: "auto" each category becomes a line along the corridors: see Lines. Without a category, the flow goes to “other”.
additiveboolean, trueWhether value adds up along a corridor (counts, volumes). false is refused: convert percentages or indices first (for example, multiplying by the population of the origin).
skeletonlist of id pairs, optionalCorridors given by the user, used with skeleton: "input". After aggregation they join the groups of their ends.
boundarylist of polylines [[x, y], …], optionalBackground outline, in the same coordinates. Closed polylines are filled.
crs, unitstext, optionalCopied to the spec; they change no computation.

Canonical order: nodes by id, flows by (origin, destination, category, value), whatever their order in the input; permuting the input changes no byte of the output. Nodes that fall on the same point (after rounding to 1/1024) are merged into the one with the smallest id, with a warning.

Levels: one file, one figure per level

A node may carry its groups at several levels, in groups. The option group with the name of a level aggregates by it; group: true still reads group. Each level has the properties of plain aggregation: the accounting closes, and what is internal to a group becomes the place's ring.

{ "nodes": [
    { "id": "centro", "x": 12000, "y": 9000, "group": "Centro",
      "groups": { "bairro": "Centro", "regiao": "Centro" } },
    { "id": "lagoa",  "x": 14200, "y": 13000,
      "groups": { "regiao": "Norte" } }, … ] }

milkflow cidade.json --group bairro     # or { "group": "bairro" }
milkflow cidade.json --group regiao     # or { "group": "regiao" }

When the levels nest (every group of the lower level fits in one group of the upper), the internal volume can only grow from one level to the next. Nesting is the caller's promise: it is not checked, and without it the internal volumes of two levels are not comparable. The figures of the synthetic city at both levels are in How it works.

Options (Options)

Every option is optional; an unknown name is an error. The last column gives the equivalent command-line option, when there is one.

OptionDefaultEffectCommand line
groupfalsetrue: merges the nodes by their group. The name of a level ("municipio"): merges them by each node's group at that level of groups. An empty name, or a level no node has, is refused (a misspelt level would draw every node alone).--group [LEVEL]
aggregatenullAutomatic spatial aggregation: {"to": K} merges neighbouring places until K remain besides the isolated ones; keep (a list of ids, optional) protects nodes that are never absorbed (they may absorb and then represent the group; two protected nodes never merge); method chooses each merge: "ward" (default) merges the neighbouring pair of least ma·mb/(ma+mb)·d², d between the mass-weighted centroids (compact groups of similar weight); "gravity" sends the group of smallest mass to the neighbour of largest mass / distance². The mass is the volume that starts or ends at a place; neighbours are the Gabriel edges of the Delaunay triangulation up to 4 times their median, contracted after each merge. A place without a near neighbour stays alone and does not count in K, and the width classes fit the segments between the others; when no merge is left before K the run stops; meta.warnings says both. Each group sits at the position and takes the name of its heaviest member. K < 1, K below the number of ids in keep, an unknown id, an unknown method or group alongside are refused. With K ≥ the number of places nothing changes, byte for byte; otherwise meta.params.aggregate records the option (with the method) and meta.aggregation the provenance. Both methods are spatial: they ignore who exchanges flow with whom.--aggregate K, --aggregate-keep ID,…, --aggregate-method ward|gravity
k3Design pairs per place of the top_k filter: the k largest leaving or arriving (union). 0: every pair designs the skeleton. A k other than 3 next to another filter is refused.--k N
filternull (top-k with k)The filter of the design pairs: {"kind": …}, table below and Filters. When given, meta.params records filter instead of k.--filter KIND
mu4Weight of the detour against the ink, on the reference scale. Larger, more segments. Finite and ≥ 0.--mu X
max_stretchnullLargest detour allowed to a design pair during pruning (finite and > 0).--max-stretch T
skeleton"delaunay""input": uses the corridors of input.skeleton, without pruning.--skeleton delaunay|input
represent"all""design": only the design pairs are routed; the others count as filtered. Recommended with sparse filters.--represent all|design
schematicfalseAlso computes the schematic (octilinear) layout. If it fails, the geographic one stands and the reason goes to schematic_error.--schematic
schematic_optionsnull (the defaults)Options of the schematic layout, table below. An unknown key or a value out of range is refused.some, below
tikzfalseAlso the figures as a LaTeX tikzpicture, in tikz and schematic_tikz: see TikZ.--tikz [picture|standalone]
geojsonfalseAlso the figures as GeoJSON, in geojson and schematic_geojson: each paint operation in paint order, in the input's coordinates (reproject before using them as RFC 7946 lon/lat); places[].uses tells which segments and categories each place's flows use.--geojson
htmlfalseAlso the self-contained interactive page, in html (with the member names of each group in the tooltips).--html
lines"auto""auto": one line per category when the flows have a category (the lines mode); "off": categories ignored, the output identical to that of data without them.--lines auto|off
max_categories8Largest number of categories, “other” included (1 to 64); the smallest beyond it merge into “other”.--max-categories N
stylesee belowHow the figures look.several, below

filter

An object with kind and its parameters; an unknown parameter or one out of range is refused. Examples and advice in Filters.

filter.kindParametersPairs keptCommand line
"top_k"k (optional: the options' k)The k largest leaving or arriving at each place.--filter top_k --k N
"dominant"—Each place's largest outflow, when it goes to a place with more arrivals (Nystuen and Dacey).--filter dominant
"disparity"alpha in [0, 1], default 0.05Significant for the origin or the destination (Serrano et al., directed).--filter disparity --alpha A
"largest"n, requiredThe n largest pairs.--filter largest --n N
"share"share in [0, 1], requiredThe largest until they cover that share of the volume between places.--filter share --share S
"threshold"min ≥ 0, requiredThose with a value of at least min.--filter threshold --min V

schematic_options

The stable subset of the schematic layout options (schematize::SchematicOptions); the other fields, tuning of the search, exist only in Rust.

OptionDefaultEffectCommand line
sector_slack1Largest deviation of a port from the geographic direction, in 45° sectors (0 to 4; 4 disables rule H6).--sector-slack N
fallback_slacknullWhen no layout keeps sector_slack, tries again with this slack (0 to 4) and warns.--fallback-slack N
spacing0.5Opening of the dense areas (0 to 4; 0, none).--spacing X
bridge_cap1Bridges longer than this times the 90th percentile of the lengths are shortened (0: never; or 1 to 100).--bridge-cap X
spread0Placement by rank on each axis (1) or by the opened geography (0); 0 to 1.JSON only
w_length, w_bend, w_bend_flow, w_displacement0.5, 3, 4, 1Weights of the layout cost: length, bend, bend weighted by the flow that continues, displacement from the target (0 to 1000).JSON only
pinfalsePinned positions: every place stays at its geographic point and only the segments are bent to 0°, 45° and 90°, over the boundary. Closer to the map; without the guarantees of the grid layout (what could not be avoided comes in a warning), and the other options no longer apply.--pin
orthogonalfalseWith pin: the segments are bent to horizontal and vertical pieces alone (no diagonals).--ortho

Style (Style)

The style given is the starting point: canvas and symbols are fitted to each drawing (Style::fitted). Every field is optional; an unknown name or an invalid value is an error. Figures of each option in Styles and Lines.

OptionDefaultEffectCommand line
width, height900, 700Starting canvas, px. The width is kept (between 480 and 1400) unless the map would be too short for the number of places; the height follows the map's shape (between 320 and 1500) and acts as a maximum.JSON only
margin40Margin, px.JSON only
class_widths[1.5, 3, 5.5, 9, 14]Width of each class, px, thinnest first. Adjusted for density (multiplied by 0.3 + 0.7·t, t between 0.6 and 1).JSON only
title""Title at the top; empty, no title band. The command line uses the name by default.--title TEXT
max_labels30How many places get a label, by decreasing own volume. Those that do not fit are left out and counted in the honesty line.--labels N
key_labels12How many of them (the first) may use a leader line when they do not fit next to the node.JSON only
theme"light"light, dark, print (greys only) or basemap (no background, to lay over a map). Figures.--theme T
palettenull (the theme's colour)Colour of the corridors tuned to the paper: red, blue, green, amber, purple, graphite.--palette P
accentnull (the theme's or the palette's)The single colour of corridors, pair lines and junctions; wins over theme and palette.JSON only
backgroundnull (the theme's)Background; also the colour of halos and of the gap between lanes.JSON only
corridor_opacitynull (1; 0.85 in basemap)Opacity of the corridors, as one group (overlapping joints do not darken). Clamped to 0–1.--opacity X
context_opacity1Opacity of the context (the boundary).JSON only
directions"sum""split": one lane per direction, keeping right, each with the class of its own volume.--directions sum|split
direction_coloursfalseWith split: one colour per direction (towards the main place or away from it), a pair safe for colour-blind readers.--direction-colours
stroke"solid""rails": class c becomes c + 1 thin rails. Ignored with split (the command line refuses).--stroke solid|rails
rail_width1.6Width of one rail, px (> 0).--rail-width PX
rail_gap1.5Gap between rails, px (≥ 0).--rail-gap PX
max_rails8Most rails per bundle (≥ 1).--max-rails N
corners"round""mitre": mitred joins, butt ends, square junctions; "smooth": the bends inside segments become arcs; "bevel": the bends are cut by a straight piece. Figures.--corners C
corner_radius12Radius of the smooth bends or, with "bevel", distance from the bend where the cut starts, px (≥ 0), limited by half the neighbouring pieces.--corner-radius PX
fade0Fading by volume, 0 to 0.9: each segment fades towards the paper by fade × (1 − (volume / largest)^¼); the largest keeps its colour and a negligible one fades by fade. The legend shows each class at its top. Colours are mixed, not translucent, so crossings do not add up. It reinforces the width; it does not replace it.--fade X
place_shape"circle""square": a rounded square with the circle's area.--place-shape S
exits"fade"With frame_on_boundary, how a segment cut at the edge of the map ends past the boundary: "fade", each line fades into the paper; "dashed", each line goes on dashed, in its own colour; "arrow", an arrowhead (the former look).--exits arrow|dashed|fade
font_size11Size of an ordinary label, px; the others derive from it.JSON only
radius_min, radius_max3, 11Radius of the smallest and largest place, px (area proportional to volume), adjusted for density.JSON only
frame_on_boundaryfalseFrames the boundary alone: places outside it fall off the canvas and their segments leave through the edge.--frame all|boundary
lines"auto"Draws the lines when the spec has them; "off" draws the corridors anyway. (The lines option above decides whether the lines are computed.)JSON only
line_width"fixed""fixed": every line as wide as class 1; "flow": the class width shared by volume.--line-width fixed|flow
line_colours[]Colour of each category, by index of legend.categories (#RGB or #RRGGBB; anything else is refused).--line-colours "#RGB,…"
lang"pt"Language of the fixed texts (legend, honesty line, tooltips, interactive page): "pt", "en", "es" or "fr".--lang pt|en|es|fr
{ "k": 2, "mu": 8, "group": true, "schematic": true,
  "schematic_options": { "spacing": 1 },
  "filter": { "kind": "top_k", "k": 2 }, "html": true,
  "style": { "theme": "dark", "palette": "green", "corners": "smooth",
             "corner_radius": 16, "max_labels": 40, "lang": "en" } }

Output

run_json returns one JSON object:

FieldContent
specThe geographic FlowSpec.
svgThe corridor figure.
schematic_spec, schematic_svgThe schematic layout and its figure; null when not asked for or not found.
schematic_errorWhy there is no schematic layout, when it was asked for.
tikz, schematic_tikzOnly with tikz: true (keys absent without it): the figures as a tikzpicture, with the default TikZ options.
geojson, schematic_geojsonOnly with geojson: true (keys absent without it): the figures as GeoJSON text (a FeatureCollection), in the input's coordinates, not longitude and latitude unless the input is.
htmlOnly with html: true: the interactive page, a self-contained HTML.

FlowSpec

The drawing contract: everything a renderer needs, nothing it must compute. Coordinates in input units, y up. The SVG is a pure function of it and the style.

FieldContent
versionContract version ("0.1"; experimental).
crs, unitsCopied from the input.
meta.paramsThe options of the run: group (true, false or the level), aggregate (only when it merged places), k (or filter, when given), mu, max_stretch, skeleton, represent; in the lines mode, lines and max_categories; in the schematic spec, also schematic (what the layout recorded, with contract_chains and chains, the number of degree-2 chains contracted).
meta.accountingtotal = routed + internal + filtered + unroutable; pairs (pairs between places) and pairs_routed.
meta.metricsinput_nodes, places, segments, drawn_length (input units), stretch_mean (mean detour weighted by the value of the routed pairs), stretch_max, place_coverage_min and _median (share of each place's own volume that is routed), classes_used; in the lines mode, line_crossings; with junctions, junctions (absent without them).
meta.warningsWarnings: repeated flows summed; nodes merged because they coincide; categories merged into “other”; a sparse filter (any filter but top_k, with represent: "all") whose largest detour is above 4, suggesting represent: "design"; in the schematic spec, the use of the fallback slack of H6.
meta.aggregationOnly when aggregate merged places: members, an object that, for every place standing for more than one input node (by the place's id, its representative's), lists those nodes' ids in increasing order. The interactive page shows their names in the tooltips; nodes[].members stays the count.
nodes[]id; kind ("place"; "junction" with skeleton: "input", for a node of the user's network where no flow starts or ends and that a drawn segment touches: drawn as a dot, never labelled, with size, internal and residuals 0; with Delaunay there are no junctions); geo (real position) and pos (drawn; equal in the geographic spec); size (routed volume that starts or ends there, never what passes through); internal; residual_out, residual_in (volume not drawn); label; members (input nodes it stands for).
segments[]id (its position in the list); a, b (indices into nodes, a < b); path (centre line from a to b, ≥ 2 points); flow_ab, flow_ba (load each way); class (width class, 0 the thinnest). Only segments with load.
segments[].lines[]Lines mode only: one entry per category on the segment, left to right for a traveller from a to b: category (index into legend.categories), flow_ab, flow_ba (adding up exactly to the segment's), next_a, next_b (segments into which the line continues at each end; absent where it ends), ends_a, ends_b (volume of the line on the segment whose pairs start or end at each end; absent when zero).
legend.width_classes[]class, min, max: both directions summed in [min, max); the last class is closed.
legend.categories[]Lines mode only: id (the category; "" for “other”), label, total (routed volume, each pair once).
boundaryThe input's boundary (empty in the schematic spec: it is not deformed).

Hooks in the SVG

For your own interaction: every drawn segment is in <g class="seg" data-seg="ID" data-a="IA" data-b="IB">, every place in <g class="place" data-node="I">, every label is <text class="label" data-node="I"> and its leader line class="leader". In the lines mode, each line is <path class="line" data-cat="I"> inside its segment's group, each connector class="link" data-cat="I" data-node="V" and each category of the legend <g class="cat" data-cat="I">. The SVG carries a <title> and, in <desc>, the honesty line.

TikZ, for LaTeX

The corridor figure (and the schematic one) also comes out as a tikzpicture. It is written from the same scene as the SVG (svg::scene): the same bands (solid, the two directions in one or two colours, rails, the lines of the categories), connectors, separators, junctions, places (circle or square), residual stubs, ends at the edge of a map framed on the boundary, the same labels and leader lines (the same Algorithm L), the same legend and honesty line in the language of lang, the same theme, palette, opacities and corners. Nothing is placed twice: the TikZ module only writes what the scene holds. The gain is the text, typeset by LaTeX in the document's sans-serif font. The core does not produce PDF; the PDF comes from compiling the document.

  • Command line: --tikz writes NAME.tex (the figure to \input; with a schematic layout, also NAME-esquematico.tex); --tikz standalone, a complete document that pdflatex or lualatex compile; --tikz-width (cm, default 14) and --tikz-font (pt; default: the SVG's type scaled with the figure, 11 px on a 900 px canvas at 14 cm is 4.9 pt). With --tikz-font the labels are placed again with the size asked for: larger type takes more room and fewer labels come out than in the SVG. What the figure cannot draw as asked is printed as a warning (aviso (tikz): …).
  • JSON door (JavaScript, Python, R): tikz: true returns tikz and schematic_tikz, the bare figure, with the default options (14 cm, the SVG's type size). In R, write_tikz(x, file) writes it.
  • Rust: Run::tikz(&TikzOptions) and Run::schematic_tikz, or tikz::render(&FlowSpec, &Style, &TikzOptions), with TikzOptions { width_cm, max_height_cm, standalone, label_pt, keep_unicode }; tikz::picture also returns the notes (Picture { tex, notes }) and tikz::figure_style the style the figure was drawn with, whose SVG is its twin.

SVG and PDF side by side

Each pair below is one run of the command line: on the left the SVG, on the right the --tikz standalone document of the same run, as a pre-generated PNG kept in site/src/tikz: when this site was built pdflatex and pdftoppm were not on PATH, so the image may lag behind the .tex next to it. The labels come out in Latin Modern Sans, narrower than the Helvetica the text width is estimated with.

Lines by category, schematic

Lines by category, schematic: the SVG figure.
SVG. Lines by category, schematic.
Lines by category, schematic: the same run as TikZ, compiled to PDF.
TikZ → PDF (pre-generated PNG). tk-linhas.en.tex (1065 lines). No % Note: line: nothing of the style was left out.
milkflow cidade_linhas.json --title "" --schematic --lang en --tikz standalone

Rails

Rails: the SVG figure.
SVG. Rails.
Rails: the same run as TikZ, compiled to PDF.
TikZ → PDF (pre-generated PNG). tk-trilhos.en.tex (450 lines). No % Note: line: nothing of the style was left out.
milkflow cidade.json --title "" --group --stroke rails --lang en --tikz standalone

Dark theme and smooth corners, schematic

Dark theme and smooth corners, schematic: the SVG figure.
SVG. Dark theme and smooth corners, schematic.
Dark theme and smooth corners, schematic: the same run as TikZ, compiled to PDF.
TikZ → PDF (pre-generated PNG). tk-escuro.en.tex (327 lines). No % Note: line: nothing of the style was left out.
milkflow cidade.json --title "" --group --schematic --theme dark --corners smooth --corner-radius 16 --lang en --tikz standalone

Two directions in two colours, square places

Two directions in two colours, square places: the SVG figure.
SVG. Two directions in two colours, square places.
Two directions in two colours, square places: the same run as TikZ, compiled to PDF.
TikZ → PDF (pre-generated PNG). tk-sentidos.en.tex (479 lines). No % Note: line: nothing of the style was left out.
milkflow cidade.json --title "" --group --directions split --direction-colours --place-shape square --lang en --tikz standalone

The figure only needs \usepackage{tikz}; no TikZ library. The texts use \textless, \textbar and \textquotedbl, which need the T1 (pdflatex) or TU (lualatex) encoding. The preamble of the standalone document, as the program writes it:

\IfFileExists{luatex85.sty}{}{\expandafter\def\csname ver@luatex85.sty\endcsname{}}
\documentclass[border=2pt]{standalone}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{lmodern}
\else
  \usepackage{fontspec}
\fi
\usepackage{tikz}
\begin{document}

The start of the figure of the minimal example (minimo.tex, 86 lines):

% milkflow 0.1 TikZ figure (geographic): 14.00 x 15.39 cm, 4 places, 3 segments, 4 labels.
% Drawn from the same scene as the SVG (milkflow chapter 12). Needs only \usepackage{tikz};
% restyle with \tikzset{milkflow label/.style={...}} etc. Not in a TikZ figure: the SVG's
% tooltips and data hooks (interactive only); label halos are filled boxes; label widths
% were estimated with Helvetica metrics, so a document sans wider than that can make labels touch.
\begin{tikzpicture}[x=0.44260pt, y=-0.44260pt]
…

Every element uses a named TikZ style (milkflow corridor, milkflow line, milkflow label, milkflow legend…), defined only when the document has not defined it yet: the preamble can restyle the figure, for example \tikzset{milkflow label/.style={font=\rmfamily}}. Colours, widths, radii, joins and type sizes are given at each element, after the style, so a style of the document cannot break the geometry. To change the size, use width_cm, not scale (which does not scale the text).

What does not go on paper, and what is not guaranteed

  • The tooltips and the data-* hooks of the interactive page mean nothing on paper and are not written (the file's header says so).
  • The background is painted only when the SVG's is not the light paper: on the dark theme or with background. On the light, print and base-map themes the page is the paper.
  • Nothing the style asks for is dropped in silence: a colour (accent, background) that is not #RGB or #RRGGBB becomes the theme's colour, and characters LaTeX cannot be trusted with become ? (unless keep_unicode, for lualatex or xelatex); each case becomes a % Note: line in the file and a warning on the command line. Labels like \input{…} come out as text.
  • Label placement does not know the real width of the text: it uses the Helvetica estimate. A document font wider than Helvetica (a wide grotesque, \large) can make neighbouring labels touch.

Command line

milkflow INPUT.json [--out DIR] [--name NAME] [--group [LEVEL]]
                [--aggregate K] [--aggregate-keep ID,ID,...]
                [--aggregate-method ward|gravity] [--k N] [--mu X]
                [--max-stretch T] [--skeleton delaunay|input]
                [--represent all|design] [--title TEXT] [--labels N]
                [--frame all|boundary] [--schematic] [--html] [--geojson] [--pdf]
                [--theme light|dark|print|basemap] [--directions sum|split]
                [--stroke solid|rails] [--opacity X]
                [--tikz [picture|standalone]] [--tikz-width CM] [--tikz-font PT]
                [--palette red|blue|green|amber|purple|graphite]
                [--direction-colours] [--corners round|mitre|smooth|bevel]
                [--corner-radius PX] [--fade X] [--place-shape circle|square]
                [--exits arrow|dashed|fade]
                [--rail-width PX] [--rail-gap PX] [--max-rails N]
                [--lines auto|off] [--max-categories N]
                [--filter top_k|dominant|disparity|largest|share|threshold]
                [--alpha A] [--n N] [--share S] [--min V]
                [--sector-slack N] [--fallback-slack N] [--spacing X]
                [--bridge-cap X] [--pin] [--ortho]
                [--line-width fixed|flow] [--line-colours "#RGB,#RRGGBB,..."]
                [--lang pt|en|es|fr]
OptionDefaultEffect
--version, -V—Prints the program's version (milkflow 0.1.0) and exits, without reading any input.
--out DIRoutOutput folder.
--name NAMEinput file stemPrefix of the files.
--title TEXTthe namestyle.title; "" removes it.
--group [LEVEL]—group: without a value, true; with one, the level. The value is optional: the next argument is read as the level unless it starts with -- or ends with .json.
--aggregate K—aggregate.to: merges neighbouring places until K remain besides the places without a near neighbour. Not with --group.
--aggregate-keep ID,…—aggregate.keep: node ids, separated by commas, that are never absorbed. Needs --aggregate.
--aggregate-method ward|gravitywardaggregate.method: how each merge is chosen. Needs --aggregate.
--k N3k
--filter top_k|dominant|disparity|largest|share|thresholdtop_kfilter.kind, with --alpha A, --n N, --share S, --min V. With dominant the summary lists the terminal places.
--mu X4mu
--max-stretch Tnonemax_stretch
--skeleton delaunay|inputdelaunayskeleton
--represent all|designallrepresent
--lines auto|offautolines. With lines drawn, --directions split and --stroke rails are refused.
--max-categories N8max_categories
--line-width fixed|flowfixedstyle.line_width; needs lines.
--line-colours "#RGB,#RRGGBB,…"—style.line_colours, separated by commas; needs lines.
--labels N30style.max_labels
--frame all|boundaryallstyle.frame_on_boundary
--schematic—schematic
--sector-slack N, --fallback-slack N, --spacing X, --bridge-cap X, --pin, --orthothe library'sschematic_options
--html—Also the interactive page, NAME.html.
--geojson—Also the figures as GeoJSON, NAME.geojson (and NAME-esquematico.geojson).
--pdf—Also the figures as vector PDF, NAME.pdf (and NAME-esquematico.pdf), with the labels laid out again for the Go font the PDF embeds. Only in a binary built with --features pdf; without it, an error.
--tikz [picture|standalone]—Also NAME.tex: the tikzpicture (default) or a complete standalone document.
--tikz-width CM14Width of the TikZ figure, cm (2 to 100).
--tikz-font PTthe SVG's size, scaledSize of an ordinary label in the TikZ figure, pt (3 to 30); places the labels again with that size.
--theme light|dark|print|basemaplightstyle.theme
--palette red|blue|green|amber|purple|graphitethe theme'sstyle.palette
--directions sum|splitsumstyle.directions
--direction-colours—style.direction_colours; needs --directions split.
--stroke solid|railssolidstyle.stroke; rails with split is refused.
--rail-width PX, --rail-gap PX, --max-rails N1.6, 1.5, 8style.rail_width, rail_gap, max_rails; need --stroke rails.
--corners round|mitre|smoothroundstyle.corners
--corner-radius PX12style.corner_radius; needs --corners smooth or bevel.
--fade X0style.fade, 0 to 0.9.
--place-shape circle|squarecirclestyle.place_shape
--exits arrow|dashed|fadefadestyle.exits
--opacity Xthe theme'sstyle.corridor_opacity, in (0, 1].
--lang pt|en|es|frptstyle.lang (figures and interactive page; the printed summary stays in Portuguese).

Files written

FileContent
NAME-corredores.svgThe corridor figure.
NAME-todas.svgEvery pair as a straight line.
NAME-filtradas.svgThe largest pairs as straight lines, as many as the corridor figure has segments (the fair comparison: same ink).
NAME-spec.jsonThe FlowSpec.
NAME-esquematico.svg, NAME-esquematico-spec.jsonWith --schematic, when there is a valid layout.
NAME.htmlWith --html: a self-contained page with tooltips per segment and place, focus on a place or segment, zoom, search, a geographic/schematic switch and, in the lines mode, highlighting one category.
NAME.tex, NAME-esquematico.texWith --tikz: the figures in TikZ (the second only with a schematic layout).
NAME.geojson, NAME-esquematico.geojsonWith --geojson: the figures as GeoJSON, in the input's coordinates (the second only with a schematic layout).
NAME.pdf, NAME-esquematico.pdfWith --pdf (binary with --features pdf): the figures as vector PDF, one page the size of the SVG (1 px = 1 pt), text in the embedded Go font (the second only with a schematic layout).

The program prints a summary (in Portuguese): input, problem and design pairs, volume partition, segments, detour, coverage per place, in the lines mode the categories and crossings, the same-ink comparator, the time, with --schematic the violations and mean bend, with --filter dominant the terminal places, and the warnings. The summaries in the gallery are examples.