trevorDashDash trevorDashDash - 1 year ago 135
Node.js Question

How to run TopoJSON?

I need to convert a geojson file to topojson and possibly simplify the topojson file. I've managed to install Node.js and the topojson package. But I have no idea how to run topojson.

The wiki lists a bunch of command line options, but where do I run those commands? I've tried running them both in the command prompt and the node shell. Node, GDAL, ogr2ogr and TopoJSON are all new concepts for me, so I'm a bit confused and overwhelmed.

I'm running on Windows by the way.

Answer Source

this should work fine on windows too

  1. install nodejs
  2. install npm
  3. run npm install -g topojson in your command prompt
  4. use the command prompt to cd to the geojson file
  5. run topojson -o myNewTopojsonFile.json myOldGeojsonFile.json


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download