Skip to content

Commit

Permalink
add topojson for airports
Browse files Browse the repository at this point in the history
  • Loading branch information
bradoyler committed Sep 1, 2017
1 parent 44ffcdc commit 5001d5e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions us-transportation/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Map layers for US transportation.
# Index: http://nationalmap.gov/small_scale/atlasftp.html

all: csv/us-airports-major.csv svg/us-airports.svg csv/us-railroads-50mi.csv geo/us-roads-interstate.json
all: csv/us-airports-major.csv svg/us-airports.svg csv/us-railroads-50mi.csv geo/us-roads-interstate.json topo/us-airports-major.json

.SECONDARY:

Expand Down Expand Up @@ -49,6 +49,15 @@ geo/us-roads-interstate.json: shp/us-roads.shp
-lco COORDINATE_PRECISION=1 \
-where "FCODE = '10'" $@ $<

topo/us-airports-major.json: geo/us-airports-major.json
mkdir -p $(dir $@)
../node_modules/.bin/topojson \
-o $@ \
--no-pre-quantization \
--post-quantization=1e6 \
--simplify=7e-7 \
--id-property=IATA \
-- airports=$<

topo/us-airports-projected.json: geo/us-airports.json
mkdir -p $(dir $@)
Expand All @@ -58,8 +67,8 @@ topo/us-airports-projected.json: geo/us-airports.json
--projection 'd3.geo.albersUsa()' \
--post-quantization=1e6 \
--simplify=7e-7 \
-p NAME,COUNTRY \
-- places=$<
-p IATA,NAME \
-- airports=$<

svg/us-airports.svg: topo/us-airports-projected.json
mkdir -p $(dir $@)
Expand Down

0 comments on commit 5001d5e

Please sign in to comment.