> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ploterr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Georeference

> Convert between longitude and latitude and local metres.

## Import

```typescript theme={null}
import { lngLatToLocal, localToLngLat } from '@opengeometry/floorkit';
```

## lngLatToLocal

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

```typescript theme={null}
function lngLatToLocal(anchor: GeoAnchor, lng: number, lat: number, trueNorthDeg?: number): PointXZ;
```

## localToLngLat

Inverse of lngLatToLocal: site-local metres → `[lng, lat]`.

```typescript theme={null}
function localToLngLat(
  anchor: GeoAnchor,
  x: number,
  z: number,
  trueNorthDeg?: number,
): [lng: number, lat: number];
```

## Related

* [`GeoAnchor`](/floorkit/api/world/site#geoanchor)
* [`PointXZ`](/floorkit/api/primitives/polygon-maths#pointxz)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.