【问题标题】:failed conversion with TopoJSON使用 TopoJSON 转换失败
【发布时间】: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


    【解决方案1】:

    已在Large geoJSON to TopoJSON 中回复。总结:文件太大,js引擎无法处理,报错很遗憾。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-28
      • 1970-01-01
      • 2014-05-12
      • 2017-10-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多