Warning: Can't use blame annotator:
svn blame failed on trunk/webapps/GTEC/data_layers/csvToJson.awk: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator/trunk/webapps/GTEC/data_layers/csvToJson.awk @ 556

Revision 556, 546 bytes checked in by jdalbey, 6 years ago (diff)

Ver 0.1 of Graphic Traffic Events Creator.

RevLine 
1# Convert a csv with postmile and coordinates to a json file
2# Note it switches lat/long to long/lat
3# Sample invocation:  awk -F',' -f awkpgm1 filename
4//{printf "  {\n  \"type\": \"Feature\",\n  \"id\": \"%s\",\n    \"geometry\":\n      {\n      \"type\": \"Point\",\n      \"coordinates\": [%s,%s]\n      },\n      \"properties\": {\"street\":\"%s\", \"color\":\"%s\", \"perpx\":\"%s\", \"perpy\":\"%s\"}\n  },\n", $1, $3,$2,$4,$7,$5,$6 }
5#
6# When finished prepend:
7#{
8#  "type": "FeatureCollection",
9#  "features": [
10#
11# and Append:
12#  ] }
13
Note: See TracBrowser for help on using the repository browser.