source: tmcsimulator/trunk/webapps/visualizer/data_layers/cctvToGeoJson.awk @ 516

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

Add new web app: Traffic Events Visualizer

Line 
1# Convert a csv with cctv location data to a geojson file
2# This was used for a one-off task to convert the static csv file we manually produced into json
3# Sample invocation:  awk -F',' -f awkpgm1 filename
4
5//{printf "  {\n  \"type\": \"Feature\",\n  \"id\": \"%s\",\n  \"geometry\":\n      {\n      \"type\": \"Point\",\n      \"coordinates\": [%s,%s]\n      },\n  \"properties\":\n      {\n      \"locationName\":\"%s\",\n      \"nearVDS\":\"%s\" \n      }\n  },\n", $7,$4,$5,$6,$8 }
6
7#
8# When finished prepend:
9#{
10#  "type": "FeatureCollection",
11#  "features": [
12#
13# and Append:
14#  ] }
15
Note: See TracBrowser for help on using the repository browser.