Open stevage opened 5 years ago
Hmm, I think the problem is specific to multi polygons. That file contains all 47 federal electoral districts in NSW, Australia, each represented as a multipolygon. (Most contain a single polygon, one contains 95).
This file contains the same data, but as 276 individual polygons, with the properties duplicated on them. geobuf.encode processes it just fine.
I now see that my input GeoJSON is actually defective, and this is the cause of the failure. There is one Multi-MultiPolygon.
@stevage thanks for the update! Still marking this as a bug because it should error instead of going out of memory. If you're up to fixing this, I'll welcome a PR :)
I'm having a weird problem where geobuf.encode is failing due to insufficient heap memory. At first, I assumed it was just an inherent problem with a huge file, but actually my input file is not that big. The JSON I'm converting is only 13MB minified, well below the 256MB string limit, and miles below various other limits of 1.6GB or 8GB I've heard of.
My code:
Running like this:
It fails similarly with json2geobuf, even after modifying the shebang to increase max_old_space_size.
The source file elb.json is here: https://www.dropbox.com/s/0wakul4l5n3zihv/elb.json?dl=1