The Geospatial API is the part of Google ARCore that gives an augmented reality session a global pose: the device position as latitude, longitude and altitude plus its heading, accurate enough to place virtual content at real-world locations. In XR development it is the standard tool for world-scale outdoor AR, because it combines GNSS, inertial tracking and a Visual Positioning System (VPS) that matches camera images against a large 3D model built from Street View imagery.
Developers often call it the ARCore Geospatial API. It differs from local tracking, where a session only knows positions relative to where it started, and it complements a Spatial anchor, which stores a pose relative to features in a mapped room rather than to the Earth.
How the Geospatial API localizes a device
The Geospatial API localizes a device by fusing three sources of information into one estimate. GNSS provides a rough position, usually within several meters to tens of meters in cities. The compass and inertial sensors give an initial orientation. The camera then supplies images that are compared with a localization model derived from billions of Street View images, which corrects both position and heading.
Once VPS finds a match, the session reports a Geospatial pose in the WGS84 coordinate system together with accuracy estimates. ARCore keeps refining this pose as the user moves, while normal visual-inertial odometry handles frame-to-frame motion. The result is a pose that stays stable locally and is tied to the globe at the same time.
The following table lists the inputs the API combines and what each contributes to the final pose.
| Input | What it provides | Main weakness |
|---|---|---|
| GNSS receiver | Coarse latitude, longitude and altitude | Multipath errors near tall buildings |
| Magnetometer and IMU | Initial heading and fast motion | Magnetic interference and drift |
| Camera with VPS | Precise position and heading correction | Needs coverage, light and visible structures |
| Visual-inertial tracking | Smooth local motion between corrections | Accumulates drift without global reference |
Anchor types and the pose data they use
The Geospatial API places content through three anchor types that differ in how altitude is expressed. Choosing the wrong type is the most frequent reason content appears to float or sink. Each anchor still needs a heading or rotation, usually given as a quaternion in the east-up-south frame.
| Anchor type | Altitude reference | Typical use |
|---|---|---|
| WGS84 anchor | Height above the WGS84 ellipsoid | Surveyed points with known altitude |
| Terrain anchor | Meters above the ground surface | Signs, markers and characters at street level |
| Rooftop anchor | Meters above a building rooftop | Content on top of buildings |
Terrain and rooftop anchors are resolved asynchronously: the API queries elevation data and returns a state that the application must check before rendering. Ellipsoid heights also differ from heights above mean sea level by tens of meters in many regions, so a value taken from a map application cannot be used as a WGS84 altitude without conversion.
Beyond anchors, the API family includes Streetscape Geometry, which returns simplified 3D meshes of nearby buildings and terrain for occlusion and physics, and Scene Semantics, which labels outdoor pixels as sky, road, building or vegetation. These features belong to the same outdoor toolkit but solve different problems than localization.
Accuracy, coverage and availability
Geospatial accuracy depends mainly on VPS coverage and viewing conditions. Where Street View imagery exists and the camera sees buildings, horizontal error is often around one to a few meters and heading error a few degrees or less. Without VPS, the pose falls back to GNSS and compass quality, which is rarely enough for precise placement.
The API exposes horizontal, vertical and orientation accuracy values with each pose. A robust application waits until these values cross a chosen threshold before placing anchors, and it can call a VPS availability check for a location before the user travels there. The table shows typical conditions and their effect.
| Condition | Effect on pose | Practical response |
|---|---|---|
| Dense city street with coverage | Best horizontal and heading accuracy | Place anchors after a short scan |
| Open field or park | Few features for VPS matching | Use larger content and tolerance |
| Night or heavy rain | Image matching degrades | Warn users and delay placement |
| Indoors | VPS is not designed for interiors | Switch to local anchors |
| Recently changed streetscape | Model mismatch causes errors | Test on site before launch |
How it compares with related XR positioning tools
The Geospatial API is the Earth-referenced option among several ways to persist AR content. ARKit offers location anchors with similar goals but coverage limited to selected cities, while cloud and persistent anchors store poses relative to scanned features rather than geographic coordinates.
| Approach | Reference frame | Best suited for |
|---|---|---|
| Geospatial API | Global WGS84 coordinates | Outdoor content at known places |
| ARKit location anchors | Global coordinates in supported cities | iOS-only outdoor experiences |
| Cloud anchors | Scanned feature map of a space | Shared indoor or small-area content |
| Local session anchors | Origin of the current session | Single-user tabletop AR |
| Image tracking | A known printed target | Posters, packaging and exhibits |
The API is available through native Android, the ARCore SDK for iOS and AR Foundation extensions for Unity. Authoring tools such as Geospatial Creator let designers preview content against photorealistic 3D tiles before visiting the site, which shortens iteration for location-based projects.
Limitations and common implementation mistakes
The most important limitation is that the Geospatial API is a cloud-dependent service. It requires network access, an authorized Google Cloud project and usage within quota, and the localization model is not available offline. Privacy reviews should note that camera-derived data is sent for localization.
- Placing anchors too early, before accuracy values have converged, which causes visible jumps later.
- Confusing ellipsoid and sea-level heights, which places WGS84 anchors far above or below the ground.
- Ignoring the anchor state of terrain and rooftop anchors and rendering them before resolution succeeds.
- Assuming indoor support, although VPS targets outdoor streetscapes.
- Skipping on-site testing, even though construction and seasonal changes alter what the camera sees.
Explained without jargon
Phone GPS knows roughly where you are. It often misses by the width of a street. It also does not know exactly which way the camera points. The Geospatial API fixes that by having the phone look around and compare what it sees with a huge library of street photos.
Once the match is found, the phone knows where it is and where it faces. That is enough to pin a virtual object to a real spot, such as an arrow on a particular doorway. Anyone standing there later sees the object in the same place.
A typical use case
A city tourism office builds an Android and iOS walking tour with Unity and AR Foundation. Designers place twelve historical reconstructions as terrain anchors at points along a two-kilometer route, previewing each one against 3D tiles before any site visit.
In the app, visitors raise the phone for a few seconds at each stop. The tour shows content only after horizontal accuracy falls below about two meters and heading accuracy below a few degrees. Field tests on the old town streets show reconstructions landing on the correct building facades, while one stop in an open square needs a larger model and a looser threshold. The outcome is a tour that works without printed markers and needs no scanning by staff.