From charlesreid1

Revision as of 04:10, 12 February 2015 by Admin (talk | contribs)

Installing

First step was prerequisites.

Prerequisites

I had to install GDAL (software for converting different geographic formats) and NPM (node package manager):

brew install gdal
brew install npm

Next, I used npm to install TopoJSON:

npm -g topojson

Then I checked that the installations went ok with:

which ogr2ogr
which topojson

Converting

GeoJson to TopoJson

To convert a GeoJson to a TopoJson and preserve properties:

topojson in.geojson -o out.json -p