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

Error while CONVERTING to TopoJSON #21

Closed ciukstar closed 5 years ago

ciukstar commented 5 years ago
$ minify-geojson -t orig_admin_level_4.geojson 
CONVERTING to TopoJSON
/home/sergiu/.npm-global/lib/node_modules/minify-geojson/dist/minify-geojson.js:104
            topology = topojson_1.prune(topology, { verbose: options.verbose });
                                  ^

TypeError: topojson_1.prune is not a function
    at MinifyGeoJSON.processGeoJSON (/home/sergiu/.npm-global/lib/node_modules/minify-geojson/dist/minify-geojson.js:104:35)
    at /home/sergiu/.npm-global/lib/node_modules/minify-geojson/dist/minify-geojson.js:42:27
    at /home/sergiu/.npm-global/lib/node_modules/minify-geojson/dist/minify-geojson.js:71:17
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
erikvullings commented 5 years ago

Sorry for the late reply, but would it be possible to share the original file with me? Otherwise it's difficult to debug. Thanks.

erikvullings commented 5 years ago

@ciukstar the topojson library that I used was changed in more recent versions, removing the prune command. I've updated my dependencies and now it works again (on my sample). If you still face problems, please feel free to open this issue again. It is released in v1.4.0.