我正在尝试理解Bostock的"泡泡地图教程"。
特别是,我卡在了以下问题上:当将shapefile转换为Topojson文件时,Bostock将过滤器设置为none,以便制作整个美国的地图。
但是,如果我们只想制作一个州的地图,应该如何在makefile中设置过滤器?(或者我们应该做些其他事情吗?)
这是涉及的代码,来自makefile:
build/counties.json: build/gz_2010_us_050_00_20m.shp
node_modules/.bin/topojson \
-o $@ \
--projection='width = 960, height = 600, d3.geo.albersUsa() \
.scale(1280) \
.translate([width / 2, height / 2])' \
--simplify=.5 \
--filter=none \
-- counties=$<
我也使用过Bostock make file以及以下命令:
make shp/{state}/tracts.shp
它能工作,但似乎有限制?