Product Launch
anonymous
8 points
2 comments
Posted2 months agoActiveabout 2 months ago
Show HN: CoordConversions NPM Module for Map Coordinate Conversions
github.comNPM modulecoordinate conversiongeospatial dataJavaScript
Discussion (2 comments)
Showing 2 comments
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
about 2 months ago
Sorry for the late reply! To be honest I hadn't considered it because when I wrote this it was originally to solve a specific problem and that situation always has them in lat/lon rather than lon/lat, but what I'll add to the future to do list is maybe a toggle so if you have them in lon/lat order you can society that and feed them in that way.
I get your point on "DD" being cryptic, I will consider that. Maybe rather than DD, DM, DMS, DecDeg, DegMin, DegMinSec or something slightly more descriptive. Hm.