| 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 |
|---|
| 4 | if [ "$#" -ne 1 ] |
|---|
| 5 | then |
|---|
| 6 | echo "argument required: provide input csv filename of prepped postmile file" |
|---|
| 7 | exit 1 |
|---|
| 8 | fi |
|---|
| 9 | |
|---|
| 10 | echo "{" |
|---|
| 11 | echo " \"type\": \"FeatureCollection\"," |
|---|
| 12 | echo " \"features\": [" |
|---|
| 13 | awk -F',' -f csvToJson.awk $1 |
|---|
| 14 | echo " ]" |
|---|
| 15 | echo "}" |
|---|
| 16 | # NB: You need to manually remove the comma after the last feature. |
|---|
Note: See
TracBrowser
for help on using the repository browser.