summaryrefslogtreecommitdiff
path: root/htdocs/geojson/update_all.sh
blob: e25d8439f4600f064a2a0871b4c45992e93c385a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

function fetch() {
	if [[ "$3" != "" ]]; then
		fn="$3"
	else
		fn="$1"
	fi
	"./fetch_$1.sh" "$2" | json_reformat -m > "$fn.json.tmp"
	rm -f "$fn.json"
	mv "$fn.json.tmp" "$fn.json"
}

fetch streets
fetch city_outlines
fetch trainlines "Train Lines"
fetch trainlines "Access Paths" trainlines_access
fetch bodiesofwater "Rivers" rivers
fetch bodiesofwater "Oceans, Seas, and Lakes" oceans