forked from yaph/d3-geomap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (35 loc) · 1.12 KB
/
Makefile
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
.PHONY: bundle
help:
@echo "topo-world - create topojson files for world"
@echo "topo-countries - create topojson files for countries"
bundle:
npm run build
cp LICENSE dist/
zip -r bundle/d3-geomap.zip dist/
clean:
rm -f bundle/d3.geomap.zip
rm -f data/*.json
rm -rf dist/*
topo-world:
mapshaper -i ~/data/geo/naturalearthdata.com/ne_10m_admin_0_countries_lakes/ne_10m_admin_0_countries_lakes.shp \
-rename-fields name=NAME,iso3=ADM0_A3 \
-rename-layers units \
-filter-fields iso3,name \
-simplify resolution=1920x1080 \
-o format=topojson \
precision=0.001 \
data/countries.json
python scripts/fix_country_ids.py
mkdir -p dist/topojson/world
mv data/countries.json dist/topojson/world/
# geonamescache must be installed
topo-countries:
mapshaper -i ~/data/geo/naturalearthdata.com/ne_10m_admin_1_states_provinces_lakes/ne_10m_admin_1_states_provinces_lakes.shp \
-rename-layers units \
-simplify resolution=24000x16000 \
-o format=topojson \
precision=0.001 \
data/states-provinces.json
mkdir -p dist/topojson/countries
python scripts/topo_countries.py
topo: clean topo-world topo-countries