tags:

views:

39

answers:

2

Hi all I am developing an iphone application which uses google API's.I have a set of latitudes and logitudes .I need to find the South west and North East points from these points .How can i do this?

thanks in advance

A: 

Given:

  A point (LAT, LNG)
  A distance or radius DIST
  1° of latitude ~= 69 miles ~= 111 kms
  1° of longitude ~= cos(latitude)*69 ~= cos(latitude)*111

The SW point is:

lng_sw = LNG - (DIST / abs(cos(radians(LAT))) * 111)
lat_sw = LAT - (DIST / 111)

The NE point is:

lng_ne = LNG + (DIST / abs(cos(radians(LAT))) * 111)
lat_ne = LAT + (DIST / 111)

If you use miles as your unit of measure use 69 instead of 111.

Lucia
A: 

hi Sreelal i have the same problem as you. Can you please tell me how did you solved it???

Can you PLEASE tell me how to determine southwest and northeast points for rectangle/bounds from array of latitude and longitude.

Regards