node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »




Given a road network and a set of address points as line delimited geojson; output an interpolation network.

map Mode

Basic Usage

map mode is the core mode that PT2ITP exposes. It is responsible for taking the input street network and address points and generating the interpolation network.

Basic Usage:

./index.js map --in-network=<FILE.geojson> --in-address=<File.geojson> --output=<File.geojson> --tokens=./lib/tokens/en.json"

Full Options:

./index.js map --help

Input Data

Address Input

Input line-delimited geojson features of points. Each point should have a property called street containing the street name and number containing the street address.


Property Function
number String The Housenumber for a given pt including any unit information. ie: 10a
street String or Array The name of the street - preferably non-abbreviated. If it's an array, it must contain an object for each street name synonym with the properties display for the street name and priority for the numeric ranking.
source String The source name of the data so a single input file can have a combination of multiple sources
output Boolean A boolean allowing pts to be used to calculate the ITP segment but not output in the final cluster
{ "type": "Feature", "geometry": { "type": "Point", ... }, "properties": { "street": "Main Street", "number": 10 } }
{ "type": "Feature", "geometry": { "type": "Point", ... }, "properties": { "street": [ { display: "Main Street", priority: 0  } ], "number": 11 } }

Street Network Input

Input line-delimited geojson features of lines. Each line should have a property called street containing the street name.

{ "type": "Feature", "geometry": { "type": "LineString", ... }, "properties": { "street": "Main Street" } }
{ "type": "Feature", "geometry": { "type": "LineString", ... }, "properties": { "street": "Main Street" } }

convert Mode

Basic Usage

Converts the PT2ITP standard of line delimited geojson features into the more widely supported GeoJSON FeatureCollections. Note that since GeoJSON is a text based format this should not be used for huge numbers of features as most parsing software will run out of memory.

Basic Usage:

./index.js convert --input linedelimited.geojson --output featurecollection.geojson

Full Options:

./index.js convert --help

Version Numbers

PT2ITP follows the Semver spec for it's CLI interface.

This means that breaking changes to the CLI tools will result in a MAJOR release. New features will result in a MINOR release and bug fixes a PATCH.

Internal functions may change in breaking ways with a MINOR release so long as they don't change/break the CLI interface.