在安装带有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
你知道这里会出什么问题吗?
发布于 2019-01-04 23:55:54
已在Large geoJSON to TopoJSON中应答。摘要:文件太大,js引擎无法处理,错误消息令人遗憾。
https://stackoverflow.com/questions/40470259
复制相似问题