问题
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
回答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!
回答2:
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
来源:https://stackoverflow.com/questions/17310692/how-to-know-if-topojson-is-installed-and-working-normally