# [ACCEPTED]-GPS coordinates: 1km square around a point-coordinates

If the world were a perfect sphere, according 29 to basic trigonometry...

Degrees of latitude 28 have the same linear distance anywhere in 27 the world, because all lines of latitude 26 are the same size. So 1 degree of latitude 25 is equal to 1/360th of the circumference 24 of the Earth, which is 1/360th of 40,075 23 km.

The length of a lines of longitude depends 22 on the latitude. The line of longitude at 21 latitude l will be cos(l)*40,075 km. One 20 degree of longitude will be 1/360th of that.

So 19 you can work backwards from that. Assuming 18 you want something very close to one square 17 kilometre, you'll want 1 * (360/40075) = 0.008983 16 degrees of latitude.

At your example latitude 15 of 53.38292839, the line of longitude will 14 be cos(53.38292839)*40075 = [approx] 23903.297 13 km long. So 1 km is 1 * (360/23903.297) = 0.015060 12 degrees.

In reality the Earth isn't a perfect 11 sphere, it's fatter at the equator. And 10 the above gives a really good answer for 9 most of the useful area of the world, but 8 is prone to go a little odd near the poles 7 (where rectangles in long/lat stop looking 6 anything like rectangles on the globe). If 5 you were on the equator, for example, the 4 hypothetical line of longitude is 0 km long. So 3 how you'd deal with a need to count degrees 2 on that will depend on why you want the 1 numbers.

Here is something from my notes to be used 11 on Android with its decimal GPS.

Lat Long: NY 10 City 40N 47 73W 58 40.783333 73.966667

Wash 9 DC 38N 53 77W 02 38.883333 77.033333

yields 8 = 209 miles !! VERY CLOSE

Distance (miles) (x) = 69.1 7 (lat2-lat1) Distance(miles) (y) = 53.0 6 (long2 - long1) As crow flys sqrt (x2 + y2) ... duh!@

delta(LAT) / Mile 5 = .014472 delta(LONG) / Mile = .018519

Using 4 a box as approximation To find someone within 3 100 miles (100 north / 100 south, 100 E 2 / 100 W) From 0,0 -14.472 / + 14.472 , -18.519 1 / 18.519

A simpler way of generating a gps square 13 given the centre would be to use the indirect 12 Vincenty algorithm.The Javascript code here 11 shows how to do it http://www.movable-type.co.uk/scripts/latlong.html. Creating a square 10 using a circle isn't to hard. Squares are 9 equal distance to each point. So given a 8 centre point, distance from the centre, change 7 the bearing from 0 or any number depending 6 on rotation of the square and increment 5 by 90 degrees or PI/2 radians. By incrementing 4 by 90 degrees each time and you will up 3 with a square in circular space.

I use this 2 myself for generating GPS points around 1 a centre point with a given distance .---. --/- --0-- -/-- .---.

## TL;DR

`10 km`

= `0.08999`

radius from a certain `geopoint`

. This calculation 10 is only based on latitude values and applies 9 only to geopoints with WGS84 projection.

### More details

If 8 you want a more accurate answer you must 7 have to calculate it by building a function 6 of some sort. However it still don't guarantee 5 because people even quarrel for the degrees 4 of error. Taking altitude into account, mercator 3 or not, etc.

### Caution

The value above is just a **rule of a thumb** so 2 don not use it for critical applications.

### Reference

GIS 1 StackExchange, *How do I calculate the bounding box for given a distance and latitude/longitude*, answer by David the Australian developer

More Related questions

We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.