source: tmcsimulator/trunk/webapps/visualizer/data_layers/convertCSVtoJSON.bash @ 516

Revision 516, 396 bytes checked in by jdalbey, 6 years ago (diff)

Add new web app: Traffic Events Visualizer

Line 
1#!/bin/bash
2# Convert csv to json using awk pgm
3# Get input filename from command line
4if [ "$#" -ne 1 ]
5then
6  echo "argument required: provide input csv filename of prepped postmile file"
7  exit 1
8fi
9
10echo "{"
11echo " \"type\": \"FeatureCollection\","
12echo " \"features\": ["
13awk -F',' -f csvToJson.awk $1
14echo " ]"
15echo "}"
16# NB: You need to manually remove the comma after the last feature.
Note: See TracBrowser for help on using the repository browser.