Cadmeo

Random Coordinates

Coordinates

41.9028, 12.4964

41.903
Latitude
12.496
Longitude
Northern and Eastern
Hemispheres
Land
Probably
Degrees, minutes, seconds

41° 54′ 10.1″ N 12° 29′ 47.0″ E

Land or water is a rough guess

The land check uses a handful of bounding boxes around the continents, not a coastline. It will call a point in the Mediterranean or Hudson Bay land. Paste the coordinates into a map to see what is actually there.

The generator produces a random point on the Earth's surface, in decimal degrees and in degrees, minutes and seconds. The latitude is not drawn uniformly, doing that would cluster points near the poles, so the result is genuinely spread evenly over the sphere.

How it works

Picking a latitude uniformly between -90 and 90 seems obviously right and is wrong. Lines of latitude near the poles enclose far less surface area than lines near the equator, so uniform latitude piles points into the Arctic and Antarctic.

latitude = asin(2u - 1), where u is uniform in [0, 1)

u
a uniform random value between 0 and 1
asin
the inverse sine, which stretches the distribution toward the equator in proportion to the area actually there
  • Longitude is drawn uniformly from -180 to 180, which is correct, meridians divide the sphere into equal wedges.
  • The result is shown in decimal degrees and converted to degrees, minutes and seconds.
  • About 71% of the surface is ocean, so most unfiltered points land in water.
  • The optional land filter redraws until the point falls inside one of a handful of coarse bounding boxes around the continents.

That land filter is a rough approximation, not a coastline. It uses bounding boxes, so it will call a point in the Mediterranean or the Gulf of Mexico land, and it will miss islands entirely. The page says so rather than implying a precision it does not have.

Examples

An unfiltered point

Filter

None

Result

Roughly 71% of the time, open water

That is simply what the Earth looks like. A generator that produced land most of the time would not be uniform over the surface.

Why uniform latitude is wrong

Method

Uniform latitude

Result

Points bunch toward the poles

The band between 80 and 90 degrees covers about 1.5% of the surface but would receive 11% of the points.

Degrees, minutes, seconds

Decimal

41.9028, 12.4964

Result

41° 54′ 10.1″ N 12° 29′ 47.0″ E

The same point in the notation navigation and mapping tools still use. One second of latitude is about 31 metres.

Frequently asked questions

Why do I keep getting ocean?

Because about 71% of the Earth's surface is water, and an even draw over the surface reflects that. It is working correctly. Turn on the land filter if you want points on continents, at the cost of the draw no longer being uniform.

How accurate is the land or water guess?

Rough. It tests the point against about ten bounding boxes around the continents, so enclosed seas such as the Mediterranean and the Gulf of Mexico read as land, and islands outside the boxes read as water. Paste the coordinates into a map for the real answer.

Why not just pick latitude uniformly?

Because it produces a distribution that is wrong in a way that is easy to miss. A degree of latitude near the pole covers far less area than one at the equator, so uniform latitude concentrates points in the polar regions. The arcsine transform corrects for exactly that.

How precise are the coordinates?

Five decimal places, which is about a metre at the equator. That is more precision than a random point warrants, but it means the value can be pasted into a mapping tool without being silently rounded to a different spot.

Can I restrict it to a country or region?

Not here, that needs real boundary data, which is a substantial dataset and a different kind of tool. For a country rather than a point, the random country and city picker draws from a list of 78 countries.