It might sounds a bit weird but it is nonetheless true, I always think whether the first item in the coordinates is latitude or longitude
const position = '0101000020E61000003333333333331F409A99999999D94A40'
const buffer = Buffer.from(position, "hex")
const geometry = wkx.Geometry.parse(buffer)
const transformedPosition = geometry.toGeoJSON()
console.log(
'lat': transformedPosition.coordinates[0],
'lng': transformedPosition.coordinates[1]
)
So I really appreciate it if you could mention it in the doc and answer me here. Is my assumption correct.
*I know in google map it is [lat, lng]
*But in PostGIS which is my DB too it is the other way around, [lng, lat]. Also there it says:
In web mapping APIs like Google Maps, spatial coordinates are 🔴often🔴 in order of latitude then longitude.
*And in mongodb it is also `[lat, lng]
It might sounds a bit weird but it is nonetheless true, I always think whether the first item in the coordinates is latitude or longitude
So I really appreciate it if you could mention it in the doc and answer me here. Is my assumption correct.
*I know in google map it is
[lat, lng]*But in PostGIS which is my DB too it is the other way around,
[lng, lat]. Also there it says:*And in mongodb it is also `[lat, lng]