Question

I'm making a new private android app to take a picture, get your current location in WGS84, and at last send it all in an e-mail to your self.

I have send the mail with the content from the textfields, but I have made a button to get the your current location, but didn't know how to get your location and in same way also convert it to WGS84. I need to get it in this coordinatesystem, because it is used in a special sparetime activity, which uses this coordinatesystem.

Just forget the picture, the coordinate is more important.

Thanks in advance

Greetings Aksel

Was it helpful?

Solution

I'm not 100% sure if I got your question right. But you want to convert the location you get into WGS84 coordinatesm right? I'll guess you get your position via the Android LocationManager using something like: LocationManager.getLastPosition(). What you get is a Location . This location can be formated in different ways.

The questions is what exactly do you want? WGS84 is a reference system and does not say anything about the way coordinates are represented. A common representation are sphereical coordinates (also called Lat/Lon coordinates): Spherical Coordinates.

Another representation would be Cartesian coordinates. Maybe thats what you are looking for. To get cartesian coordinates you should use a 3rd party library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top