如何将多个 topojson 文件合并为单个 topojson 文件

How can I merge multiple topojson files into single topojson file

我有美国州的 topojson 和加拿大州的 topojson 我想将它们合并到一个文件中。有人能告诉我如何将两个文件合并到单个 topojson 文件中吗?我在创建地图时使用墨卡托投影

我遇到了类似的问题,最终将 topojson 文件转换为 geojson,将它们与 geojson-merge 合并,最后转换为 topojson。

由于加拿大和美国共享一些边界(arcs in topojson),它应该会减少总文件大小。

for item in "us" "ca"
do
    topo2geo tracts=$item-geo.json < $item-topo.json
done
geojson-merge *-geo.json > combined-geo.json
geo2topo tracts=combined-geo.json > combined-topo.json