【发布时间】:2016-11-07 16:45:31
【问题描述】:
使用sudo npm install -g topojson 安装topojson 后,我无法将shapfile (.shp) 和geojson 文件转换为topojson 文件。
Alexanders-MacBook-Pro:topojson alexander$ geo2topo Parcel11_projected.geojson > Parcel11_topo.json
buffer.js:495
throw new Error('"toString()" failed');
^
Error: "toString()" failed
at Buffer.toString (buffer.js:495:11)
at Object.parse (native)
at ReadStream.<anonymous> (/usr/local/lib/node_modules/topojson/bin/geo2topo:107:46)
at emitNone (events.js:91:20)
at ReadStream.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Alexanders-MacBook-Pro:topojson alexander$ topojson -q 1e4 -o out.json --Parcel11Cert.shp
-bash: topojson: command not found
似乎代码是在第一种情况下执行的,但是geojson太大而无法转换。在第二种情况下,该命令无法识别。
我正在使用以下command line reference
知道这里可能出了什么问题吗?
【问题讨论】:
标签: json command-line npm topojson