| Revision 556,
546 bytes
checked in by jdalbey, 6 years ago
(diff) |
|
Ver 0.1 of Graphic Traffic Events Creator.
|
| Rev | Line | |
|---|
| 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.