A coordinate system gives positions a shared spatial reference. A sensor’s local coordinates can locate it within a home, but they do not by themselves place it on a map or in a real-world 3D scene. Aligning coordinate systems lets measurements, models, and imagery refer to the same physical locations. section 2.7 section 7.3.1 section 7.3.2
Choose the reference needed for the decision:
- For a floor plan, position readings in the plan’s (x,y) coordinate system so users can see where a condition occurs. section 6.2.4
- For a real-world 3D scene, georeference the model and transform locally recorded positions into global coordinates before overlaying readings. section 7.3.1 section 7.3.2
- For datasets from different sources, use a shared spatial reference frame. GeoJSON and KML define geometry using global coordinates. section 7.3.1
Placing a home sensor reading
Record a sensor’s position relative to the home. On a floor plan, use its placement coordinates to put the reading beside its physical location. In a georeferenced 3D model, transform that local position into a global one before placing the reading in the scene. Correct positioning gives an abstract measurement physical context; attaching it to a particular building element may still require reconciling identifiers and metadata. section 6.2.4 section 7.3.2
Listing 7.4 Transforming local to global coordinates in JavaScript
<script>
const matrix = (lon, lat, height, scaleFactor, rotationZDeg = 0) => #1
Cesium.Matrix4.multiply(
Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.
fromDegrees(lon, lat, height)),
Cesium.Matrix4.multiply(
Cesium.Matrix4.fromScale(new Cesium.Cartesian3(scaleFactor,
scaleFactor, scaleFactor)),
Cesium.Matrix4.fromRotation(Cesium.Matrix3.fromRotationZ(
rotationZDeg * Math.PI / 180)),
new Cesium.Matrix4()
),
new Cesium.Matrix4()
);
const localToGeographic = (localCartesian) => { #2
const worldPoint = Cesium.Matrix4.multiplyByPoint(
BASE_TRANSFORM_MATRIX,
localCartesian,
new Cesium.Cartesian3()
);
const { longitude, latitude, height } = Cesium.Cartographic.
fromCartesian(worldPoint);
return {
longitude: Cesium.Math.toDegrees(longitude),
latitude: Cesium.Math.toDegrees(latitude),
height
};
};
const BASE_TRANSFORM_MATRIX = matrix(
115.868492,
-31.961505,
-39,
1,
-20
);
</script>
The JavaScript listing shows a CesiumJS transform built from longitude, latitude, height, scale, and rotation, then applied to a local point before converting it to geographic coordinates. section 7.3.2



