d3 v4 topojson@3 joining files like in topojson@1

39 views Asked by At

In topojson@1 if multiple files were to be added into one single object, the command used to be

$topojson -o main.json subunits.topojson places.topojson states.topojson

Is there an equivalent command for this in topojson@3 after doing the following steps

$shp2json -n ne_10m_admin_0_map_subunits.shp | ndjson-filter "['USA'].includes(d.properties.ADM0_A3, d.properties.iso_a2)" > subunits.ndjson

$shp2json -n ne_10m_populated_places.shp | ndjson-filter "['US'].includes(d.properties.ISO_A2)" > places.ndjson

$shp2json -n ne_10m_admin_1_states_provinces_lakes_shp.shp | ndjson-filter "['US'].includes(d.properties.iso_a2)" > states.ndjson

$ndjson-map "(d.id = d.properties.iso_a2, d)" < "C:\Users\USER\subunits.ndjson" > xsubunits.json"
$ndjson-map "(d.id = d.properties.iso_a2, d)" < "C:\Users\USER\places.ndjson" > xplaces.json"
$ndjson-map "(d.id = d.properties.iso_a2, d)" < "C:\Users\USER\states.ndjson" > xstates.json"

$geostitch -n < xsubunits.json > subunits.json
$geostitch -n < xplaces.json > places.json
$geostitch -n < xstates.json > states.json

$geo2topo -q 1e5 -n subunits=subunits.json > subunits.topojson

$geo2topo -q 1e5 -n places=places.json > places.topojson

$geo2topo -q 1e5 -n states=states.json > states.topojson
0

There are 0 answers