Skip to content

"Invalid string length" when merge a large files #33

@anphanngocvn

Description

@anphanngocvn

I have a few *.json files (some of them about 750Mb) need to be merged into one *.geofile. However when I run this command to merge them. geojson-merge folder/*.geojson > combined.geojson. I have following errors:

`/geojson-merge/geojson-merge:17
process.stdout.write(JSON.stringify(merge(argv._.map(function(n) {
^

RangeError: Invalid string length
at JSON.stringify ()
at Object. (/geojson-merge/geojson-merge:17:29)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)`

How do you tackle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions