forked from cartomap/nl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_index.bash
executable file
·66 lines (53 loc) · 1.04 KB
/
make_index.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
TYPES=`cat shapes.txt | sed 's/cbs_//' | sed 's/_[12].*//' | uniq`
#echo $TYPES
function create_url {
#echo "${1}"
for shape in $1
do
url=${shape/build/.}
year=${shape%.*}
year=${year##*_}
echo -n " [$year]($url)"
done
echo ""
}
for type in $TYPES
do
echo ""
echo "# $type"
echo ""
SHAPES=$(ls -A build/wgs84/*.geojson | grep "/${type}_[12]" -)
if [ "$SHAPES" == "" ]; then
continue
fi
echo ""
echo "### wgs84"
echo ""
echo ""
echo -n " - geojson: "
create_url "$SHAPES"
echo ""
SHAPES=$(ls build/wgs84/*.topojson | grep $type -)
echo ""
echo -n " - topojson: "
create_url "$SHAPES"
echo ""
SHAPES=$(ls -A build/rd/*.geojson | grep "/$type" -)
if [ "$SHAPES" == "" ]; then
continue
fi
echo ""
echo "### rijksdriehoekstelsel (28994)"
echo ""
echo ""
echo -n " - geojson: "
create_url "$SHAPES"
echo ""
SHAPES=$(ls build/rd/*.topojson | grep $type -)
echo ""
echo -n " - topojson: "
create_url "$SHAPES"
echo ""
done
echo ""