How to know if topojson is installed and working normally?

北城余情 提交于 2019-12-30 14:49:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!