3

hi all i have latitude and longitude points now i have to covert into latitudeE6, longitudeE6.

how to convert it. pleae guide me.

M.A.Murali
  • 9,988
  • 36
  • 105
  • 182
  • possible duplicate of [convert wgs 84 to lat/long](http://stackoverflow.com/questions/5625386/convert-wgs-84-to-lat-long) – eldarerathis Apr 14 '11 at 14:54

2 Answers2

17

This is how you should do it:

int latE6 = (int) (lat * 1e6);
int lonE6 = (int) (lon * 1e6);
james
  • 26,141
  • 19
  • 95
  • 113
3

Maybe on that way?

latE6 = (int) (lat * 1000000)
lonE6 = (int) (lon * 1000000)

UPD:

If you having your values like that x° y' z'', then:

valueE6 = (int) ((x + y / 60 + z / 3600) * 1000000)
Tima
  • 12,765
  • 23
  • 82
  • 125