What is a topocentric reference?
A topocentric reference is a local, Cartesian coordinate reference that you can place anywhere in the world. It’s defined by a georeferenced point that specifies the origin of its coordinate system.
A topocentric reference has these properties:

The origin is defined by a geospatial point. This point can be anywhere in the world.

The Xaxis points East, the Yaxis points North, and the Zaxis points upwards.

The XYplane is tangential to the Earth ellipsoid, or symmetric with the tangential plane if the origin is not a point on the ellipsoid.

The Zaxis is perpendicular to the XYplane and denotes height.

The unit of measurement on all axes is meter.
Creating a topocentric reference
Program: Creating a topocentric reference illustrates how you define a custom origin point, and get a topocentric reference for that point from the ReferenceProvider
.
const wgs84 = getReference("CRS:84");
const originLLH = createPoint(wgs84, [122.39318, 37.78975, 0]);
const reference = createTopocentricReference({name: "TOPO", origin: originLLH});
Transforming points to and from a topocentric reference
Using LuciadRIA’s transformations API, you can transform point coordinates between topocentric references and any other geospatial coordinate reference. For example, you could transform WGS 84 point coordinates to local point coordinates:
const wgs84 = getReference("CRS:84");
const originLLH = createPoint(wgs84, [122.39318, 37.78975, 0]);
const localReference = createTopocentricReference({origin: originLLH});
const wgs84ToLocal = createTransformation(wgs84, localReference);
const lonLatCoordinate = createPoint(wgs84, [12, 34, 56]);
const localCoordinate = wgs84ToLocal.transform(lonLatCoordinate);