How to merge TopoJSON features?

You can use topojson.merge to do this, as shown in bl.ocks.org/5416405:

merging states

There are a few limitations to this approach (such as its dependence on an exact topology and lack of detection of holes), but it might for you as-is or with a few adjustments.

There is also the simpler approach of drawing the set of polygons for each region twice, once with a stroke and once with a fill, as shown in bl.ocks.org/5416440:

merging states ii

See also a very similar question on Stack Overflow.


The problem is that, for the moment, QGIS does not recognize the TopoJSON format (too recent). The solution is to transform the TopoJSON file into GeoJSON format:

  • online GeoJSON - TopoJSON conversion
  • in Python Sean Gillies TopoJSON with Python and Calving Metcalf topojson.py

and you can import the GeoJSON file in QGIS