【发布时间】:2017-02-14 18:49:50
【问题描述】:
我从 U.S. Census 下载了一个 shape 文件并将其传递给 http://mapshaper.org/,它为我提供了一个可以在 D3 中使用的工作 topojson 文件。
但是,我意识到 topojson 文件中的所有功能标签都被剥离了。因此无法识别链接到 CSV 数据的特征。
我安装了topojson,但是topojson 版本2 没有与版本1 相同的命令来将shape 文件转换为topojson 并保留功能。之前topojson -o output.json input.shp这是当前topojson github参考https://github.com/topojson/topojson。
所以我的问题是将 shapefile 转换为 topojson 并保留特征属性的最佳方法是什么。
【问题讨论】:
标签: javascript d3.js shapefile topojson mapshaper