RandomGeoPosition
✖
RandomGeoPosition
gives a pseudorandom geo position uniformly distributed on the surface of the Earth.
gives a pseudorandom geo position uniformly distributed in the given geo bounding box.
gives a list of n pseudorandom geo positions uniformly distributed in the geo region g.
Details and Options

- The geo region g in RandomPosition[g,…] can be given as a geo primitive like GeoDisk[…] or GeoBoundsRegion[…] or as an extended geo Entity object.
- Possible options for RandomGeoPosition include:
-
GeoModel Automatic model of the generated geo positions GeoProjection None projection in which locations are uniform - RandomGeoPosition[] is equivalent to RandomGeoPosition["World"] and RandomGeoPosition[{{-90,-180},{90,180}}].
- RandomGeoPosition gives a different sequence of pseudorandom geo positions whenever you run the Wolfram Language. You can start with a particular seed using SeedRandom.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Generate a pseudorandom geo position on the Earth:

https://wolfram.com/xid/0mldc8qyy4eq-9lcxgo

Restrict the generated geo position to a given bounding box:

https://wolfram.com/xid/0mldc8qyy4eq-ilc2zo

Generate a pseudorandom point on Mars:

https://wolfram.com/xid/0mldc8qyy4eq-y7izch

Generate a list of pseudorandom geo positions in the US:

https://wolfram.com/xid/0mldc8qyy4eq-vm8dby


https://wolfram.com/xid/0mldc8qyy4eq-go99wa

Generate geo locations uniformly distributed in the Mercator projection:

https://wolfram.com/xid/0mldc8qyy4eq-9nf221


https://wolfram.com/xid/0mldc8qyy4eq-br41rl

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

https://wolfram.com/xid/0mldc8qyy4eq-kqq208

Scope (7)Survey of the scope of standard use cases
Generate a random geo position on the Earth:

https://wolfram.com/xid/0mldc8qyy4eq-uvahgw

Generate 100 random geo positions uniformly distributed on the Earth:

https://wolfram.com/xid/0mldc8qyy4eq-r60ubv

Generate a random geo position in a given bounding box:

https://wolfram.com/xid/0mldc8qyy4eq-w9qyi2

Generate random geo positions in France:

https://wolfram.com/xid/0mldc8qyy4eq-g7q5t8


https://wolfram.com/xid/0mldc8qyy4eq-b4c7d7


https://wolfram.com/xid/0mldc8qyy4eq-qtwidq

Generate random geo positions in different geo variants of a country:

https://wolfram.com/xid/0mldc8qyy4eq-nc5l3q


https://wolfram.com/xid/0mldc8qyy4eq-b0vk62


https://wolfram.com/xid/0mldc8qyy4eq-zkef0u


https://wolfram.com/xid/0mldc8qyy4eq-gdvm0i

Generate random geo positions in the interior of a geo primitive:

https://wolfram.com/xid/0mldc8qyy4eq-mprdgq


https://wolfram.com/xid/0mldc8qyy4eq-kd1gb8

Generate a random geo position array:

https://wolfram.com/xid/0mldc8qyy4eq-3berp8

Options (2)Common values & functionality for each option
GeoModel (1)
By default, RandomGeoPosition generates locations on the Earth using the "ITRF00" datum:

https://wolfram.com/xid/0mldc8qyy4eq-5pyam2

Use the GeoModel option to specify other models of the Earth or other celestial globes:

https://wolfram.com/xid/0mldc8qyy4eq-c9vcrt


https://wolfram.com/xid/0mldc8qyy4eq-rvogb9

GeoProjection (1)
Generate random geo positions uniformly distributed in the Albers projection:

https://wolfram.com/xid/0mldc8qyy4eq-qso82m

Check that they are homogeneously distributed in that projection:

https://wolfram.com/xid/0mldc8qyy4eq-bn3s2f

They are not homogeneously distributed in other projections:

https://wolfram.com/xid/0mldc8qyy4eq-86nc83

Properties & Relations (5)Properties of the function, and connections to other functions
Use SeedRandom to get repeatable random values:

https://wolfram.com/xid/0mldc8qyy4eq-1k87ey


https://wolfram.com/xid/0mldc8qyy4eq-ouigj4


https://wolfram.com/xid/0mldc8qyy4eq-gdzh1y


https://wolfram.com/xid/0mldc8qyy4eq-zsfu8q

Use BlockRandom to block one use of RandomGeoPosition from affecting others:

https://wolfram.com/xid/0mldc8qyy4eq-sfco5m


https://wolfram.com/xid/0mldc8qyy4eq-vptj4y

Take 200 geo locations uniformly distributed in a geo bounding box:

https://wolfram.com/xid/0mldc8qyy4eq-i3erh7

The central feature and spatial median locations are close to the center of that bounding box:

https://wolfram.com/xid/0mldc8qyy4eq-52wi46


https://wolfram.com/xid/0mldc8qyy4eq-s82e3i

Take 2000 geo locations uniformly distributed on the surface of the Earth:

https://wolfram.com/xid/0mldc8qyy4eq-rrgp0o
Select those geo locations in Africa:

https://wolfram.com/xid/0mldc8qyy4eq-ud7vro

https://wolfram.com/xid/0mldc8qyy4eq-pundyy

Compute the relative fraction and compare with the relative area of Africa with respect to the world:

https://wolfram.com/xid/0mldc8qyy4eq-l4cq8s


https://wolfram.com/xid/0mldc8qyy4eq-0pgqki

Geo locations uniformly distributed in an area look uniform in equal-area projections:

https://wolfram.com/xid/0mldc8qyy4eq-xh7noy


https://wolfram.com/xid/0mldc8qyy4eq-kw60bw


https://wolfram.com/xid/0mldc8qyy4eq-isgjl8

They do not look uniform in other types of geo projections, like conformal projections:

https://wolfram.com/xid/0mldc8qyy4eq-4fpsjt


https://wolfram.com/xid/0mldc8qyy4eq-788j0q

Possible Issues (1)Common pitfalls and unexpected behavior
Take 1000 pseudorandom geo positions uniformly distributed over the world in a given projection:

https://wolfram.com/xid/0mldc8qyy4eq-21ft4

The geo positions look uniform in a GeoGraphics map if the same geo range is chosen:

https://wolfram.com/xid/0mldc8qyy4eq-heyop9


https://wolfram.com/xid/0mldc8qyy4eq-v22ok9

They may not look uniform in other geo ranges, including the default choice in GeoGraphics:

https://wolfram.com/xid/0mldc8qyy4eq-06gg3b


https://wolfram.com/xid/0mldc8qyy4eq-53bwwe

Wolfram Research (2019), RandomGeoPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomGeoPosition.html.
Text
Wolfram Research (2019), RandomGeoPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomGeoPosition.html.
Wolfram Research (2019), RandomGeoPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/RandomGeoPosition.html.
CMS
Wolfram Language. 2019. "RandomGeoPosition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RandomGeoPosition.html.
Wolfram Language. 2019. "RandomGeoPosition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RandomGeoPosition.html.
APA
Wolfram Language. (2019). RandomGeoPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RandomGeoPosition.html
Wolfram Language. (2019). RandomGeoPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RandomGeoPosition.html
BibTeX
@misc{reference.wolfram_2025_randomgeoposition, author="Wolfram Research", title="{RandomGeoPosition}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/RandomGeoPosition.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_randomgeoposition, organization={Wolfram Research}, title={RandomGeoPosition}, year={2019}, url={https://reference.wolfram.com/language/ref/RandomGeoPosition.html}, note=[Accessed: 16-April-2025
]}