Fuzzy Tolerance

Screencast #17: Potpourri

Resources

// Assumes tmpdata has been set to your geojson file
$.each(tmpdata.features, function() {
    $.each(this.geometry.coordinates, function () {
            $.each(this, function() {
                this[0] = Math.round(this[0] * 100000)/ 100000;
                    this[1] = Math.round(this[1] * 100000)/ 100000;
            });
         });
});

JSON.stringify(tmpdata);

Comments