Core Package Overview
The @spatialdata/core package provides a TypeScript/JavaScript interface for reading and working with SpatialData Zarr stores. It mostly mirrors the Python library's API design while adapting to TypeScript idioms and the asynchronous nature of browser-based data loading. Hot-paths should make use of WASM with safe and ergonomic TypeScript interfaces where appropriate.
Element Classes
Each element type in a SpatialData store is represented by a typed class that provides access to metadata, coordinate transformations, and data loading methods.
Coordinate Transformations
Coordinate transformations are fundamental to SpatialData, allowing different elements to be placed in shared coordinate systems. The @spatialdata/core package aims to provide a comprehensive implementation of transformation classes that can be represented in the standard.
Error Handling
The @spatialdata/core package uses a Result type pattern inspired by Rust for explicit error handling. This approach makes error cases visible in the type system and avoids unexpected exceptions.
Internals & Architecture
This page documents internal implementation details of @spatialdata/core. These APIs are not part of the public interface and may change without notice.