Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Question

How do you convert GeoJSON data to TopoJSON?

Why

Topojson files are often smaller than geojson and the conversion allows you to incrementally simplify a dataset, if you wish.

share|improve this question
    
Why the gdal tag? –  blah238 Jan 3 '13 at 18:28
    
Gosh, good question. Not sure what I was thinking on that one :) Removed. –  Jeff Jan 3 '13 at 20:53
    
Step 3: Convert the data: topojson -o output_file.json input_file.json not working!!!!!!!!!!!! –  user21773 Sep 6 '13 at 17:00
1  
topojson -o output_file.json input_file.json works for me under 1.1.0 and 1.4.0. Perhaps you can ask a formal question on here with more info on the problem you're having? Cheers! –  Jeff Sep 6 '13 at 18:09
add comment

1 Answer

up vote 18 down vote accepted

Glad you asked, oh handsome OP.

Install topojson

From the command line (Mac OSX 10.8, assumes homebrew installed):

brew install node.js
npm install -g topojson

Convert The Data

topojson -o output.json input.json
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.