Skip to main content
lngLatToLocal and localToLngLat convert between WGS84 longitude and latitude and the local metres of a site. The site’s geoAnchor is the local origin, and its trueNorthDeg turns the frame.

Import

Example

Notes

  • trueNorthDeg is the angle from project north (−Z) to true north, in degrees, positive clockwise viewed from above.
  • A saved site takes any finite angle and stores it in −180 to 180: replace-site and an opened project turn 720 into 0 and 270 into −90. A NaN angle is refused with its path.

lngLatToLocal

Project a WGS84 point to site-local metres [x, z] (+X east, −Z north).

localToLngLat

Inverse of lngLatToLocal: site-local metres → [lng, lat].
Last modified on October 25, 2026