0.0.2 • Published 8 years ago

polyline-gp v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

polyline-group-parser

This module allows one to extract geojson & kml from a csv file grouped with polyline data.

Installation

Requires node.js v6.2.1

npm install polyline-gp -g

Usage:

$ polyline-gp --input /file/to.csv --output /file/to/output/folder --group "Group column" --polyline "Polyline column"

Lets say you have a CSV like this located at ./my.csv:

GroupPolylineData
Yonge-Dundas-Square_omiGocNw@gFw@Jc@~BRlC | Main
City-Hallw_miGbdocN~DmAx@lG}DhAOld City Hall
City-HallicmiGpzocN{@wGtF_BEjHToronto City Hall

You can run the command:

$ polyline-gp -i ./my.csv -o ./some/path

This would create an output folder in ./some/path with the formed geojson/kml files inside. Any extra columns would be added as properties to the GIS file.

output
  |
  L - City-Hall
  |      |
  |      L - City-Hall.geojson
  |      L - City-Hall.kml
  |
  L - Yonge-Dundas-Square
         |
         L - Yonge-Dundas-Square.geojson
         L - Yonge-Dundas-Square.kml

You can change the column names that polyline-gp looks for with the --group and --polyline arguments

Arguments

ArgumentShorthandDescription
--input-iRequired The file location of the csv to parse
--output-oThe folder that you want your output to go (Default: "./")
--group-gThe column to group the csv file by (Default: "Group")
--polyline-pThe column that the polyline exists in (Default: "Polyline")