Skip to content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

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.

⚠️ Known Issue in USGSCSM v2.1: Your ISD must include an 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.
ℹ️ Generate ISD files using ALE

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:

  1. Loading Camera Models
  2. Load sensor models from ISD (Image Support Data) JSON
  3. Support for Frame, Line Scanner, and SAR models
  4. Example model loading

  5. Image to Ground Conversion

  6. Convert pixel coordinates (line, sample) to Body-Fixed ground coordinates
  7. Specify height above reference ellipsoid
  8. Real-time coordinate transformation

  9. Ground to Image Conversion

  10. Convert Body-Fixed coordinates to pixel coordinates
  11. Determine which pixels image a given ground point

  12. Sensor Position & Velocity

  13. Query camera position at any pixel location
  14. Get sensor velocity vectors (useful for line scanners)

  15. Model Metadata & Illumination

  16. View model information (type, image ID, sensor, platform)
  17. Get image dimensions and starting coordinates
  18. Calculate sun direction for lighting/shadow analysis

  19. Export Model State

  20. View the optimized internal model representation
  21. Copy the state for use in other applications