deduplicateClosePoints

fun deduplicateClosePoints(features: List<Feature>, maxDistanceKilometers: Double): List<Feature>

Removes features that are within thresholdMeters of each other, optimized with a spatial index.

This version approximates proximity checks using Euclidean distance in degrees for performance. For precise calculations, replace the approxDistance block with Turf distance.