topo2geo - Man Page

converts TopoJSON objects to GeoJSON features

Synopsis

topo2geo [options] <[name=]file> ...

Description

Converts one or more TopoJSON objects from an input topology to one or more GeoJSON features. For example, to convert the “states” TopoJSON GeometryCollection object in us.json to a GeoJSON feature collection in us-states.json:

topo2geo states=us-states.json < us.json

For convenience, you can omit the object name and specify only the file name; the object name will be the basename of the file, with the directory and extension removed. For example, to convert the “states” TopoJSON GeometryCollection object in us.json to a GeoJSON feature collection in states.json:

topo2geo states.json < us.json

Options

-h,  --help

Output usage information.

-V--version

Output the version number.

-n--newline-delimited

Output newline-delimited JSON, with one feature per line.

-i--in file

Specify the input TopoJSON file name. Defaults to - for stdin.

-l--list

List the names of the objects in the input topology, and then exit. For example, this:

topo2geo -l < us.json

Will output this:

counties
states
nation

See Also

geo2topo(1), topomerge(1), topoquantize(1), toposimplify(1)

Referenced By

geo2topo(1), topomerge(1), topoquantize(1), toposimplify(1).

January 2021