USGSCSM WASM Interactive Demo¶
This page provides an interactive demonstration of the USGSCSM WebAssembly bindings running directly in your browser.
Live Demo¶
1. Load Camera Model
Load a camera model from ISD (Image Support Data). The model type is automatically determined from the ISD.
image_identifier field. Standard ISDs from ALE don't have this - add it manually as a workaround. This will be fixed in a future version.
2. Image to Ground Conversion
3. Ground to Image Conversion
4. Sensor Position & Velocity
5. Model Metadata & Illumination
6. Export Model State
View the optimized model state representation (useful for debugging or saving).
WASM Files Included
The USGSCSM WASM files (usgscsm.js, usgscsm.wasm, usgscsm.d.ts) from release 2.1.0 are included in this repository, so the demo works immediately without additional setup.
What the Demo Shows¶
The interactive demo demonstrates:
- Loading Camera Models
- Load sensor models from ISD (Image Support Data) JSON
- Support for Frame, Line Scanner, and SAR models
-
Example model loading
-
Image to Ground Conversion
- Convert pixel coordinates (line, sample) to Body-Fixed ground coordinates
- Specify height above reference ellipsoid
-
Real-time coordinate transformation
-
Ground to Image Conversion
- Convert Body-Fixed coordinates to pixel coordinates
-
Determine which pixels image a given ground point
-
Sensor Position & Velocity
- Query camera position at any pixel location
-
Get sensor velocity vectors (useful for line scanners)
-
Model Metadata & Illumination
- View model information (type, image ID, sensor, platform)
- Get image dimensions and starting coordinates
-
Calculate sun direction for lighting/shadow analysis
-
Export Model State
- View the optimized internal model representation
- Copy the state for use in other applications
Related Documentation¶
- Using USGSCSM WASM Bindings - Installation and setup guide
- USGSCSM GitHub Repository - Full source code and documentation
- CSM Sandbox Tutorial - Python-based CSM examples