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

  • Learning D3.js Mapping
  • Thomas Newton Oscar Villarreal
  • 174字
  • 2021-08-06 19:42:43

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)
主站蜘蛛池模板: 宜春市| 冕宁县| 邯郸县| 井陉县| 湄潭县| 白银市| 东丰县| 湖北省| 南阳市| 石狮市| 利津县| 浠水县| 台安县| 灌南县| 图们市| 鄂伦春自治旗| 株洲市| 屏山县| 新乡市| 宜兴市| 运城市| 商水县| 苗栗市| 赤水市| 突泉县| 都兰县| 通江县| 温州市| 陇川县| 开封市| 石嘴山市| 利津县| 内江市| 东海县| 思南县| 海兴县| 临江市| 砀山县| 沈丘县| 松桃| 彩票|