Function Repository Resource:

GeoCirclePoints

Source Notebook

Get geo coordinates equally spaced around a circle centered at a GeoLocation

Contributed by: Jon McLoone

ResourceFunction["GeoCirclePoints"][loc,dist,n]

gives the positions of n points equally spaced at a distance dist around the GeoLocation loc.

ResourceFunction["GeoCirclePoints"][loc,{dist1,dist2},n]

gives the positions of n points at equal angles around the ellipse with semiaxes of lengths dist1 and dist2 around the GeoLocation loc.

ResourceFunction["GeoCirclePoints"][loc,{dist1,dist2,align},n]

gives the positions of n points on the ellipse whose major axis is at the angle align.

Examples

Basic Examples (1) 

Find 10 points at a 10 mile radius from Oxford:

In[1]:=
ResourceFunction["GeoCirclePoints"][GeoPosition[{51.752, -1.255}], Quantity[10, "Miles"], 10]
Out[1]=
In[2]:=
GeoListPlot[%]
Out[2]=

Scope (3) 

GeoCirclePoints can accept an Entity with a geo position property:

In[3]:=
ResourceFunction["GeoCirclePoints"][
 Entity["City", {"Oxford", "Oxfordshire", "UnitedKingdom"}], Quantity[10, "Miles"], 10]
Out[3]=

Provide two semiaxes lengths to generate points on an ellipse:

In[4]:=
ResourceFunction["GeoCirclePoints"][
 GeoPosition[{51.752, -1.255}], {Quantity[10, "Miles"], Quantity[20, "Miles"]}, 10]
Out[4]=
In[5]:=
GeoListPlot[%]
Out[5]=

Ellipses are aligned to the equator unless you provide an alignment angle:

In[6]:=
ResourceFunction["GeoCirclePoints"][
 GeoPosition[{51.752, -1.255}], {Quantity[10, "Miles"], Quantity[20, "Miles"], \[Pi]/8}, 10]
Out[6]=
In[7]:=
GeoListPlot[%]
Out[7]=

Properties and Relations (2) 

All points have equal geodesic distance from the circle center:

In[8]:=
gpts = ResourceFunction["GeoCirclePoints"][
   Entity["City", {"Oxford", "Oxfordshire", "UnitedKingdom"}], Quantity[5, "Kilometers"], 10];
In[9]:=
GeoDistance[
   Entity["City", {"Oxford", "Oxfordshire", "UnitedKingdom"}], #] & /@ gpts
Out[9]=

All points are at equal distances from their neighbors:

In[10]:=
Normal@GeoDistanceList[gpts]
Out[10]=

Publisher

Jon McLoone

Version History

  • 1.1.0 – 08 August 2022
  • 1.0.0 – 11 January 2022

License Information