-
Notifications
You must be signed in to change notification settings - Fork 0
/
globaldata_make
93 lines (67 loc) · 4.53 KB
/
globaldata_make
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#=================================================================================================
# Global data, on which contry extracts depend on
#=================================================================================================
#-------------------------------------------------------------------------------------------------
# Obtain and update Planet OSM
#-------------------------------------------------------------------------------------------------
planet-latest.osm.pbf:
if exist "data\in\planet.osm" del /q "data\in\planet.osm"
aria2c "https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf.torrent" --seed-time=0 --dir="data\in\planet.osm"
ren "data\in\planet.osm\planet-*.osm.pbf" $@
del /q "data\in\planet.osm\planet-*.osm.pbf.torrent"
touch "data\in\planet.osm/$(@F)"
data\in\mapaction\per_country_pbf:
md data\in\mapaction\per_country_pbf
#-------------------------------------------------------------------------------------------------
# Natural Earth
#-------------------------------------------------------------------------------------------------
data\in\mapaction\natural_earth\ne_10m_lakes: data\in\mapaction\zipped\ne_10m_lakes.zip
unzip "$<" "$@"
data\in\mapaction\natural_earth\ne_10m_rivers_lake_centerlines : data\in\mapaction\zipped\ne_10m_rivers_lake_centerlines.zip
unzip "$<" "$@"
data\in\mapaction\natural_earth\ne_10m_coastline : data\in\mapaction\zipped\ne_10m_coastline.zip
unzip "$<" "$@"
data\in\mapaction\natural_earth\ne_10m_roads: data\in\mapaction\zipped\ne_10m_roads.zip
unzip "$<" "$@"
data\in\mapaction\natural_earth\ne_10m_populated_places : data\in\mapaction\zipped\ne_10m_populated_places.zip
unzip "$<" "$@"
data\in\mapaction\zipped\ne_10m_rivers_lake_centerlines.zip: |data\in\mapaction\zipped
curl "https://naciscdn.org/naturalearth/10m/physical/ne_10m_rivers_lake_centerlines.zip" -o "$@"
data\in\mapaction\zipped\ne_10m_coastline.zip : |data\in\mapaction\zipped
curl "https://naciscdn.org/naturalearth/10m/physical/ne_10m_coastline.zip" -o "$@"
data\in\mapaction\zipped\ne_10m_roads.zip: |data\in\mapaction\zipped
curl "https://naciscdn.org/naturalearth/10m/cultural/ne_10m_roads.zip" -o "$@"
data\in\mapaction\zipped\ne_10m_populated_places.zip: |data\in\mapaction\zipped
curl "https://naciscdn.org/naturalearth/10m/cultural/ne_10m_populated_places.zip" -o "$@"
data\in\mapaction\zipped\ne_10m_lakes.zip: |data\in\mapaction\zipped
curl "https://naciscdn.org/naturalearth/10m/physical/ne_10m_lakes.zip" -o "$@"
#-------------------------------------------------------------------------------------------------
# Our Airports
#-------------------------------------------------------------------------------------------------
data\in\mapaction/ourairports/airports.csv:
if not exist "data\in\mapaction/ourairports" md "data\in\mapaction/ourairports/"
curl "https://davidmegginson.github.io/ourairports-data/airports.csv" -o "$@"
#-------------------------------------------------------------------------------------------------
# World Ports
#-------------------------------------------------------------------------------------------------
data\in\mapaction/worldports/UpdatedPub150.csv:
if not exist "data\in\mapaction/worldports" md "data\in\mapaction/worldports/"
curl "https://msi.nga.mil/api/publications/download?type=view&key=16920959/SFH00000/UpdatedPub150.csv" -o "$@"
#-------------------------------------------------------------------------------------------------
# WFP Railroads
#-------------------------------------------------------------------------------------------------
data\in\mapaction/WFP/wld_trs_railways_wfp : data\in\mapaction\zipped\wld_trs_railways_wfp.zip
unzip "$<" "$@"
data\in\mapaction\zipped\wld_trs_railways_wfp.zip: |data\in\mapaction\zipped
curl "https://geonode.wfp.org/geoserver/wfs?format_options=charset%3AUTF-8&typename=geonode%3Awld_trs_railways_wfp&outputFormat=SHAPE-ZIP&version=1.0.0&service=WFS&request=GetFeature" -o "$@"
#-------------------------------------------------------------------------------------------------
# Global Power Plant Database
#-------------------------------------------------------------------------------------------------
data\in\mapaction\gppd\global_power_plant_database.csv: data\in\mapaction\zipped\global_power_plant_database_v_1_3.zip
unzip "$<" "$(@D)"
touch "$@"
data\in\mapaction\zipped\global_power_plant_database_v_1_3.zip: |data\in\mapaction\zipped
curl "https://wri-dataportal-prod.s3.amazonaws.com/manual/global_power_plant_database_v_1_3.zip" --remote-time -o "$@"
touch "$@"
data\in\mapaction\zipped:
md $@