Skip to content

Instantly share code, notes, and snippets.

@tyohan
tyohan / removeduplicatevertice.js
Last active April 16, 2023 23:01
Remove duplicate vertice on mongodb geojson collection
#!/usr/bin/env node
var path=require('path');
var fs = require('fs');
if(process.argv.length<3)
throw new Error('You\'re not passing the geojson file');
var file=process.argv[2];
var gjFile=fs.statSync(file);
if(!gjFile.isFile())
throw new Error('File not found');