How to merge multiple topojson files into one topojson file

I have a state of Topoyson and Canada topojson. I want to combine them into one file. Can someone tell me how to merge two files into one topojson file. I use the Mercator projection when creating a map

+4
source share
1 answer

I ran into a similar problem and finished converting topojson files to geojson, combining them with geojson-merge , finally converting topojson.

Since Canada and the US share some boundaries ( arcsin topojson), this should reduce the overall file size.

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
0
source

Source: https://habr.com/ru/post/1613478/


All Articles