Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hitting limits with large GeoJSON file #35

Open
pmgh1 opened this issue Nov 26, 2018 · 1 comment
Open

hitting limits with large GeoJSON file #35

pmgh1 opened this issue Nov 26, 2018 · 1 comment

Comments

@pmgh1
Copy link

pmgh1 commented Nov 26, 2018

I have a large hexagon grid that I thought would be a perfect candidate for topojson.

But I seem to be hitting the limits of ndjson and geo2topo.

There are a few million (3 or 4) hexagons in the GeoJSON file and the file is about 1GB.

Thanks!

Can anything be done ?
Running on Windows 7
node: 10.13
npm: 5.6
ndjson-split 0.3.1
geo2topo 3.0.0

D:>ndjson-split 'd.features' < output_hexgrid_oneline.json > hexgrid.ndjson
readline.js:421
string = this._line_buffer + string;
^
RangeError: Invalid string length
at Interface._normalWrite (readline.js:421:32)
at ReadStream.ondata (readline.js:149:10)
at ReadStream.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at ReadStream.Readable.push (_stream_readable.js:219:10)
at lazyFs.read (internal/fs/streams.js:181:12)
at FSReqWrap.wrapper [as oncomplete] (fs.js:460:17)

D:>geo2topo tracts=output_hexgrid_oneline.json > hex_topo.json
buffer.js:646
return this.utf8Slice(0, this.length);
^
Error: Cannot create a string longer than 0x3fffffe7 characters
at Buffer.toString (buffer.js:646:17)
at JSON.parse ()
at ReadStream. (C:\Users\steve.o'brien\AppData\Roaming\npm\node_modules\topojson\node_modules\topojson-server\bin\geo2topo:107:46)
at ReadStream.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

@dfrankow
Copy link

dfrankow commented Apr 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants