Geospatial API

Also known as: ARCore Geospatial API

On this page 7

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.

InputWhat it providesMain weakness
GNSS receiverCoarse latitude, longitude and altitudeMultipath errors near tall buildings
Magnetometer and IMUInitial heading and fast motionMagnetic interference and drift
Camera with VPSPrecise position and heading correctionNeeds coverage, light and visible structures
Visual-inertial trackingSmooth local motion between correctionsAccumulates drift without global reference
Inputs fused into the Geospatial pose

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 typeAltitude referenceTypical use
WGS84 anchorHeight above the WGS84 ellipsoidSurveyed points with known altitude
Terrain anchorMeters above the ground surfaceSigns, markers and characters at street level
Rooftop anchorMeters above a building rooftopContent on top of buildings
Geospatial anchor types compared

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.

ConditionEffect on posePractical response
Dense city street with coverageBest horizontal and heading accuracyPlace anchors after a short scan
Open field or parkFew features for VPS matchingUse larger content and tolerance
Night or heavy rainImage matching degradesWarn users and delay placement
IndoorsVPS is not designed for interiorsSwitch to local anchors
Recently changed streetscapeModel mismatch causes errorsTest on site before launch
Conditions that affect Geospatial accuracy

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.

ApproachReference frameBest suited for
Geospatial APIGlobal WGS84 coordinatesOutdoor content at known places
ARKit location anchorsGlobal coordinates in supported citiesiOS-only outdoor experiences
Cloud anchorsScanned feature map of a spaceShared indoor or small-area content
Local session anchorsOrigin of the current sessionSingle-user tabletop AR
Image trackingA known printed targetPosters, packaging and exhibits
Geospatial API and alternative positioning approaches

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.