Skip to content

Convert GeoJSON to TopoJSON

Chafic Najjar edited this page Feb 11, 2017 · 1 revision

Convert GeoJSON to TopoJSON

Method 1: mapshaper

mapshaper is a web application you can use to convert a GeoJSON file to a TopoJSON file.

  1. Visit mapshaper.org
  2. Click on "select".
  3. Select your GeoJSON file.
  4. Click on "Export", select "TopoJSON" under "File Format" and click on "Export".

You can also use mapshaper to simplify borders and decrease the size of the TopoJSON file before exporting.

Method 2: topojson

TopoJSON is command line tool you can also use to convert a GeoJSON file to a TopoJSON file. Start by installing TopoJSON and use the following command:

topojson subunits.json -o geodata.json --properties name

This will convert the GeoJSON file subunits.json to a TopoJSON file geodata.json.