This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var roundPrecision = 1e6; | |
fs.readFile("/dev/stdin", "utf-8", function(error, input) { | |
var collection = JSON.parse(input); | |
switch (collection.type) { | |
case "FeatureCollection": return cleanupFeatureCollection(collection); | |
case "GeometryCollection": return cleanupGeometryCollection(collection); | |
default: throw "unknown type: " + collection.type; |