RandomGeoPosition

RandomGeoPosition[]

gives a pseudorandom geo position uniformly distributed on the surface of the Earth.

RandomGeoPosition[{{latmin,lonmin},{latmax,lonmax}}]

gives a pseudorandom geo position uniformly distributed in the given geo bounding box.

RandomGeoPosition[g]

gives a pseudorandom geo position uniformly distributed in the geo region g.

RandomGeoPosition[g,n]

gives a list of n pseudorandom geo positions uniformly distributed in the geo region g.

RandomGeoPosition[g,{n1,n2,}]

gives an n1× n2× pseudorandom geo position array.

Details and Options

Examples

open all close all

Basic Examples  (4)

Generate a pseudorandom geo position on the Earth:

In[1]:=
Click for copyable input
Out[1]=

Restrict the generated geo position to a given bounding box:

In[2]:=
Click for copyable input
Out[2]=

Generate a pseudorandom point on Mars:

In[1]:=
Click for copyable input
Out[1]=

Generate a list of pseudorandom geo positions in the US:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Generate geo locations uniformly distributed in the Mercator projection:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

They are not uniformly distributed in an equal-area projection like Mollweide:

In[3]:=
Click for copyable input
Out[3]=

Scope  (7)

Options  (2)

Properties & Relations  (5)

Possible Issues  (2)

Introduced in 2019
(12.0)