4 ms·
Show HN: geojson-shave, a tool for reducing the size of GeoJSON files
geojson-shave reduces the size of GeoJSON files by:
- Truncating latitude/longitude coordinates to the specified decimal places.
- Eliminating unnecessary whitespace.
- (Optionally) replacing the properties key's value with null/empty dictionary.
- matteason 2y agoHave you thought about adding a simplification algorithm such as Ramer-Doublas-Peucker [0] or Visvalingam–Whyatt [1]? I've used https://mapshaper.org/ https://mapshaper.org/ to do GeoJSON path simplification before and those seem to work very well. For applications which want to maintain path accuracy while reducing the number of waypoints that may be more effective than truncating the decimal places [0] https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93... [1] https://en.wikipedia.org/wiki/Visvalingam%E2%80%93Whyatt_algorithm https://en.wikipedia.org/wiki/Visvalingam%E2%80%93Whyatt_alg...