# Thread: How do I create a pair of longitude and latitudes to show a 2 mile radius of a partic

1. Member
Join Date
Feb 2014
Posts
18
Rep Power
0

## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

Originally Posted by Norm
Are you asking: given a center point, how to determine a large number of points that are on the circumference of a circle centered on that center point and that are the radius distance from the center point?
Sounds right. I'm asking how I can determine the longitude and latitude coordinates that create a 1 mile radius around the user's location within android java. I don't mind how many coordinates it takes, but I'd like to create a circular radius around one location.

2. ## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

The 4 points in the cardinal directions: N,E,S,W are the easy ones. (One minute of latitude = 1 nautical mile) Longitude distances are changed by the cosine??? of the latitude. 1 minute of long = 1 nm at the equator with the distance being reduced as the lat increases. For example at lat 33, one minute of long might be .78 nm
The other points will take some trigonometry.

There might be methods to do all that.
Last edited by Norm; 02-24-2014 at 06:51 PM.

3. Member
Join Date
Feb 2014
Posts
18
Rep Power
0

## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

Could you please suggest a method which can accomplish the task defined earlier? Thanks :-)

4. ## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

I'd do some research in the API doc to see what classes and methods might be useful.
If there aren't any that do what you want, then you might have to come up with some trig equations.

For an easy test, try creating the 4 cardinal points (N,E,S,W) at the radius distance from the center point and draw a line through those points. That should give you a diamond.

5. Member
Join Date
Feb 2014
Posts
18
Rep Power
0

## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

The api doesn't seem to offer much help in that regard.
I mean no disrespect. Although what has been mentioned within this thread, has been insightful. As of yet no one has suggested any Java code which could help me solve this problem. I don't expect anyone to do all the work for me, but I hoped someone would be able to help with the coding. Which is why I've come to a Java forum, is anyone able to help in this fashion?

6. ## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

What do you know how to code now? Can you draw a PolyLine between two LatLng points?
Here's some code that might do part of that. I don't have a test machine setup to see what it does.
Java Code:
```	        LatLng coxFord = new LatLng(35.8671, -84.43983);
LatLng schellKnob = new LatLng(34.61009, -83.607);
PolylineOptions plo = new PolylineOptions().color(Color.YELLOW).width(routeWidth);

Polyline pl = gMap.addPolyline(plo);```
Once you can draw some lines, then move to drawing the 4 lines around the center point between the 4 cardinal points that were mentioned.
Last edited by Norm; 02-25-2014 at 07:14 PM.

7. Member
Join Date
Feb 2014
Posts
18
Rep Power
0

## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

Originally Posted by Norm
What do you know how to code now? Can you draw a PolyLine between two LatLng points?
Here's some code that might do part of that. I don't have a test machine setup to see what it does.
Java Code:
```	        LatLng coxFord = new LatLng(35.8671, -84.43983);
LatLng schellKnob = new LatLng(34.61009, -83.607);
PolylineOptions plo = new PolylineOptions().color(Color.YELLOW).width(routeWidth);

Polyline pl = gMap.addPolyline(plo);```
Once you can draw some lines, then move to drawing the 4 lines around the center point between the 4 cardinal points that were mentioned.
Yes, I know how to code. I thought my coding example was evidence enough of that, the code you just posted is useless. It has nothing to do with what I'm asking.
I'm not asking how to draw lines or polygons etc. I've been asking how I can generate the appropriate longitude and latitudes to form a 2 mile radius around a particular location (longitude and latitude), which the above code does nothing to achieve.

8. ## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

This thread has been a waste of time.
Ask a search engine how to draw a circle and a simple, direct, easy solution is shown.
Last edited by Norm; 02-26-2014 at 02:43 PM.

9. ## Re: How do I create a pair of longitude and latitudes to show a 2 mile radius of a pa

Page 2 of 2 First 12

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•