官术网_书友最值得收藏!

Optimizing geographic data files with TopoJSON

The topojson is a command-line utility used to create files in the TopoJSON-serialized format. The TopoJSON format will be discussed in detail in Chapter 6, Finding and Working with Geographic Data. The topojson utility is also installed via npm.

Note

Note that we will use the syntax TopoJSON to refer to the JSON format and topojson to indicate the command-line utility.

We already have installed Node.JS and npm, so enter the following on the command line:

npm install -g topojson

Once the installation is complete, you should check the version of topojson installed on your machine just as we did with Node.js:

topojson –version

If you see Version 1.x, it means you have successfully installed topojson.

Tip

topojson uses node-gyp that has several dependencies based on the operating system. Please go to http://github.com/TooTallNate/node-gyp for details.

If you're using Windows, the basic steps are as follows:

  • Install Python 2.x (3.x not supported at the time of writing this book)
  • Install Microsoft Visual Studio C++ 2012 for Desktop (Express)
主站蜘蛛池模板: 邓州市| 浙江省| 礼泉县| 射洪县| 沁水县| 社旗县| 东源县| 贺兰县| 墨玉县| 永嘉县| 松溪县| 方城县| 东平县| 万宁市| 德化县| 长汀县| 介休市| 鲁甸县| 白河县| 高密市| 芦山县| 宜兰市| 城步| 华阴市| 来凤县| 峡江县| 玉田县| 刚察县| 盐边县| 灵丘县| 白河县| 永安市| 昂仁县| 崇仁县| 都匀市| 霍山县| 台中市| 沅江市| 北京市| 虹口区| 平果县|