【发布时间】:2016-05-01 23:00:51
【问题描述】:
我正在尝试使用 makefile 制作一个嵌入了 csv 数据的 topojson 文件。我使用 Mike Bostock 的 us-atlas 作为指南。
topo/us-counties-10m-ungrouped.json: shp/us/counties.shp
mkdir -p $(dir $@)
topojson \
-o us_counties.json \
--no-pre-quantization \
--post-quantization=1e6 \
--external-properties=output.csv \
--id-property=FIPS \
--properties="County=County" \
--properties="PerChildrenPos=+PerChildrenPos" \
--simplify=7e-7 \
-- $<
它创建了我需要的 topojson,但完全忽略了 output.csv 文件。 这是它返回的一瞥。
{"type":"Polygon","id":"53051","properties":{"code":"53051"},"arcs":[[-22,79,80,-75,81]]}
这是我需要它返回的内容。
{"type":"Polygon","id":"53051","properties":{"code":"53051", "County":"Los Angeles", "PerChildrenPos": 10},"arcs":[[-22,79,80,-75,81]]}
任何想法为什么它可能会忽略 csv 文件,我已经测试过移动它以查看它是否无法访问或其他什么?
提前致谢。
【问题讨论】: