alex
alex

Reputation: 7905

How to determine if Latitude is North or South, or Longitude West or East from decimal coordinate?

lets say i have this position : 32.709237, 51.627789 I need to know if its latitude is W or E and longitude is N or S .

Upvotes: 1

Views: 7285

Answers (2)

Tanuj Yadav
Tanuj Yadav

Reputation: 1277

Latitude is positive in north and negative in south.
Similarly, Longitude is positive in east and negative in west.

if(value<0)
//value is negative

Upvotes: 5

Halil Sahin
Halil Sahin

Reputation: 603

If 1st value = positive the mean you are in East
If 1st value = negative the mean you are in West
If 2nd value = positive the mean you are in North
If 2nd value = negative the mean you are in South

Upvotes: 3

Related Questions