cesium-geopose
v0.0.1
Published
Cesium integration helpers for OGC GeoPose.
Maintainers
Readme
cesium-geopose
Cesium integration helpers for OGC GeoPose. This package is the home for a
lightweight adapter API and a GeoPoseController wrapper for Cesium. It also
re-exports GeoPose types from geopose-lib so downstream projects can share
common types.
Install
npm install cesium geopose-lib cesium-geoposeTypes
import type { GeoPose, GeoPoseBYPR } from "cesium-geopose";Adapter usage
import {
getCameraGeoPose,
setCameraGeoPose,
getEntityGeoPose,
setEntityGeoPose,
createEntityFromGeoPose
} from "cesium-geopose";
const pose = getCameraGeoPose(viewer.camera);
setCameraGeoPose(viewer.camera, pose);
const entityPose = getEntityGeoPose(entity);
if (entityPose) {
setEntityGeoPose(entity, entityPose);
}
const { position, orientation } = createEntityFromGeoPose(pose);
viewer.entities.add({ position, orientation });Controller usage
import { GeoPoseController } from "cesium-geopose";
const geo = new GeoPoseController(viewer);
const cameraPose = geo.getCameraPose();
geo.flyCameraToPose(cameraPose, 2);License
MIT
