0

How to know if topojson is well installed and working normally?

An example tiny file to convert will be appreciate. with both the source and expected result

chrki
  • 6,143
  • 6
  • 35
  • 55
Hugolpz
  • 17,296
  • 26
  • 100
  • 187

2 Answers2

1

If you haven't stumbled across this yet I found it to be a great walkthrough of the entire process: http://bost.ocks.org/mike/map/

The above link also includes the command to run to check if topojson is installed:

$which topojson

If topojson is installed correctly this will print out the directory where it's installed, which might look something like this (but could be different):

/usr/local/bin/topojson

If the command doesn't print anything then you'll have to double check your install.

If you visit the link I posted you can also find example shapefiles under the heading #Finding Data.

Good luck!

AllenSH
  • 1,462
  • 1
  • 13
  • 9
  • **Edit:** $Which topojson > /usr/local/bin/topojson This is a single link toward `/usr/local/lib/node_modules/topojson/bin/topojson`, a valid JS script. `/usr/local/lib/node_modules/topojson` is the folder which really contain all topojson folders and files. However, my command `topojson -o output.json input.shp` and others still doesn't print/output anything. – Hugolpz Jun 26 '13 at 08:39
0

Seems I had a corrupted version of nodejs. I first cleaned up my mess:

sudo apt-get remove --purge nodejs npm topojson

Then the following consoles allowed a clean reinstall:

sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
--
sudo npm install -g topojson

Then my file merging worked fine :

cd /myfolder/
topojson -o output.json input1.json input2.json   
Hugolpz
  • 17,296
  • 26
  • 100
  • 187