Support GeoJSON Point representation
VinceBT opened this issue · 5 comments
VinceBT commented
In GeoJSON format, point coordinates are represented by an array like this: [longitude, latitude]
A support would increase the use cases of this library
dcousens commented
@VinceBT the implementation wouldn't be difficult.
Array.isArray
check, then unpack.
Is it worth using the same export though, or an overload? (e.g harversine-distance/geojson
)
VinceBT commented
I think that it does not need a different export. Handling all kinds of representation in the same function seems more user friendly.
dcousens commented
@VinceBT my only concern, is that this continue to happen for every possible syntax of lat
and lon
?
VinceBT commented
I don't see any other very popular representations that could be added, in my opinion.