# Convert a csv with cctv location data to a geojson file # This was used for a one-off task to convert the static csv file we manually produced into json # Sample invocation: awk -F',' -f awkpgm1 filename //{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 } # # When finished prepend: #{ # "type": "FeatureCollection", # "features": [ # # and Append: # ] }