TNOCS / minify-geojson

Minifies (compresses) a GeoJSON file, i.e. by removing properties or using fewer decimals for coordinates.
MIT License
26 stars 3 forks source link

RangeError: Invalid string length #20

Closed resuly closed 5 years ago

resuly commented 6 years ago

Command minify-geojson -c 7 s.json

Ouputs

minify-geojson\node_modules\_ogr-json-stream@0.3.0@ogr-json-stream\index.js:39
      this.leftovers += chunk;
                        ^

RangeError: Invalid string length
    at OgrJsonStream._transform (C:\Users\resuly\AppData\Roaming\npm\node_modules\minify-geojson\node_modules\_ogr-json-stream@0.3.0@ogr-json-stream\index.js:39:25)
    at OgrJsonStream.Transform._read (C:\Users\resuly\AppData\Roaming\npm\node_modules\minify-geojson\node_modules\_readable-stream@2.3.5@readable-stream\lib\_stream_transform.js:184:10)
    at OgrJsonStream.Transform._write (C:\Users\resuly\AppData\Roaming\npm\node_modules\minify-geojson\node_modules\_readable-stream@2.3.5@readable-stream\lib\_stream_transform.js:172:83)
    at doWrite (C:\Users\resuly\AppData\Roaming\npm\node_modules\minify-geojson\node_modules\_readable-stream@2.3.5@readable-stream\lib\_stream_writable.js:418:64)
    at writeOrBuffer (C:\Users\resuly\AppData\Roaming\npm\node_modules\minify-geojson\node_modules\_readable-stream@2.3.5@readable-stream\lib\_stream_writable.js:407:5)
    at OgrJsonStream.Writable.write (C:\Users\resuly\AppData\Roaming\npm\node_modules\minify-geojson\node_modules\_readable-stream@2.3.5@readable-stream\lib\_stream_writable.js:334:11)
    at ReadStream.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at ReadStream.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
erikvullings commented 5 years ago

@resuly Sorry for not responding earlier, but I've not been very active with this project. If you can send me the offending s.json file, I'm happy to have a look at it, but for now, I'll close this issue as I have no possibility to reproduce it.