This tool generates random GPS coordinate pairs in decimal degrees for seeding maps, exercising geospatial queries, and demoing location features. Unlike naive generators, it samples latitude in a way that distributes points evenly across the surface of the globe, and it can roughly constrain results to land, ocean, polar regions, or a custom rectangle.
How it works
A common mistake is to pick latitude uniformly between -90 and 90 degrees. Because the circumference of each latitude circle shrinks toward the poles, that approach crowds points near the poles. The correct method samples latitude from the arcsine distribution:
u = random(0, 1)
lat = asin(2u - 1) // in radians, then convert to degrees
lon = random(-180, 180)
Land and ocean modes use rejection sampling against a small set of continental bounding boxes: a candidate point is kept only if it falls inside (land) or outside (ocean) those boxes. Polar mode restricts latitude to beyond the Arctic and Antarctic circles, and bounding-box mode draws directly inside your chosen rectangle.
Understanding coordinate precision
The number of decimal places in a decimal-degree coordinate determines how precise the location is. This matters when seeding test data: too few decimals puts multiple points at the same location; too many gives false precision.
| Decimal places | Approximate precision |
|---|---|
| 1 | About 11 km — coarse city level |
| 2 | About 1.1 km — neighbourhood |
| 3 | About 110 m — street level |
| 4 | About 11 m — building plot |
| 5 | About 1.1 m — within a building |
| 6 | About 0.11 m — roughly 10 cm, GPS accuracy |
For most map demo and testing purposes, 4–5 decimal places is the right level of precision. Six decimals is common in GPS hardware output but rarely meaningful for application-layer testing.
What each region mode generates
Anywhere: Correct spherical sampling — points are distributed evenly across the entire Earth’s surface, including oceans (about 71% of the globe). Useful for stress-testing systems that need to handle any valid coordinate.
Approximate land: Points biased toward continental bounding boxes. Most will fall on land, though some may land on lakes or inland seas, and small islands are not well-covered. Good enough for most UI demos where you want pins that look like they are on a map.
Ocean: Points that fall outside the continental bounding boxes. Useful for testing edge cases like coordinates at sea, which some address-lookup or reverse-geocoding APIs handle differently.
Polar: Latitude beyond roughly 66.5° North or South. Useful for testing how your map handles extreme latitudes, where projection distortion is largest on Mercator projections (which most web maps use).
Custom bounding box: Constrain points to your own latitude/longitude min–max rectangle. This is the most useful mode for generating test data for a specific region — for example, all points within the United Kingdom (approximately 49–61° N, 8° W–2° E).
Common testing use cases
- Map clustering: Generate 500–1000 points in a region to test how your clustering algorithm handles overlapping markers.
- Distance calculation: Generate a pair of points and use a distance calculator to verify your geospatial distance function gives the correct result.
- Bounding-box queries: Generate points that straddle a bounding box boundary to test edge cases in
WHERE latitude BETWEEN x AND y AND longitude BETWEEN a AND bqueries. - Timezone and locale lookup: Generate points in different parts of the world to exercise timezone detection and localisation features.
Tips and notes
- For evenly distributed world points, leave the mode on “Anywhere” — it uses the correct spherical sampling.
- The land/ocean classifier is intentionally coarse; treat its results as plausible, not authoritative.
- Increase the decimal places when you need street-level precision; six decimals is roughly 0.1 metre at the equator.
- All generation happens in your browser — no map tiles or API calls are made.