I have been working on a project that has multiple repos, all of which have to convert between multiple map coordinate types, so I made an NPM module that allows you to parse and convert between Decimal Degrees, Degrees-Minutes, and Degrees-Minutes-Seconds coordinate types. Niche? Yes. Useful? Also yes (I hope)!
Comments
pheelicks•1h ago
Nice library. Without trying to start the classic geo-flamewar, do you consider returning the DD coordinates as [longitude, latitude]? This is in line with a number of formats out there, including the popular GeoJSON that is often used in JavaScript apps.
Getting these backwards is a common frustration, so my vote would be for Lon/lat ordering.
Regardless of which you choose, I find DD to be quite cryptic and it would be nicer to spell out the order, eg parseToLonLat - then the order is clear to the user
pheelicks•1h ago
Getting these backwards is a common frustration, so my vote would be for Lon/lat ordering.
Regardless of which you choose, I find DD to be quite cryptic and it would be nicer to spell out the order, eg parseToLonLat - then the order is clear to the user