# geosimplify-js **Repository Path**: mirrors_mapbox/geosimplify-js ## Basic Information - **Project Name**: geosimplify-js - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2025-11-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## geosimplify-js This module simplifies sequences of [longitude,latitude] pairs using geography-aware measurement thresholds. Based on https://github.com/mourner/simplify-js, `geosimplify-js` fixes the problem that the simple pythagorean measure used in `simplify-js` changes size if you simply give it longitude/latitude sequences to simplify. Usage: ```javascript simplify([[lon,lat],[lon,lat],[lon,lat]], offsetThresholdInMetres, gapThresholdInMetres); ``` **path** - an array of `longitude,latitude` pairs **offsetThreshold** - how far outside the straight line a point needs to be for it to be "kept" **gapThreshold** - if removing a point would create a segment longer than this, do not remove it Example: ```javascript var geosimplify = require('@mapbox/geosimplify-js'); var coords = [ [ 15.603332, 78.227070 ], [ 15.606422, 78.226824 ], [ 15.608782, 78.226667 ], [ 15.610799, 78.226535 ] ]; var result = geosimplify(coords, 5, 50); ```