trevorDashDash trevorDashDash - 19 days ago 6
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

this should work fine on windows too

  1. install nodejs http://nodejs.org/
  2. install npm https://npmjs.org/doc/README.html
  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

origin http://gis.stackexchange.com/questions/45138/convert-geojson-to-topojson