@nika-js/onlymap 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/THIRD-PARTY-LICENSES.md +238 -0
- package/dist/{LercDecode.es-C0sNWzF8.js → LercDecode.es-DgVQ-yzp.js} +1 -1
- package/dist/attribute-resolution.d.ts +27 -0
- package/dist/{basemap-8hhWmvHS.js → basemap-Q6WD4W1c.js} +1 -1
- package/dist/blosc-D1xNXZJs.js +719 -0
- package/dist/chunk-INHXZS53-DiyuLb3Z.js +14 -0
- package/dist/{geoparquet-DMnv5yzR.js → geoparquet-BUR3VCqE.js} +1 -1
- package/dist/{index-CZeGkc2B.js → index-B59kDhQV.js} +2 -2
- package/dist/{index--M5J0eSx.js → index-BtVjjBff.js} +1 -1
- package/dist/{index-COoJesma.js → index-DBsR-e_U.js} +1 -1
- package/dist/{index-CAlZChhH.js → index-DTRXxe7D.js} +11960 -11519
- package/dist/{index-BC-t0qL6.js → index-E2LluXDY.js} +1 -1
- package/dist/{lerc-CRVtSMWE.js → lerc-Bl4IMkfo.js} +2 -2
- package/dist/lz4-1Ws5oVWR.js +640 -0
- package/dist/onlymap.standalone.js +86791 -78874
- package/dist/onlymapjs.js +1 -1
- package/dist/programmatic.d.ts +4 -0
- package/dist/raster-B5dIvmBr.js +3614 -0
- package/dist/raster-pipeline-Dzo5h6YY.js +1585 -0
- package/dist/raster-pipeline.d.ts +44 -0
- package/dist/raster.d.ts +3 -42
- package/dist/version.d.ts +1 -1
- package/dist/zarr-DHOOSvXD.js +5506 -0
- package/dist/zarr.d.ts +87 -0
- package/dist/zstd-C4EcZnjq.js +603 -0
- package/llms.txt +2 -0
- package/onlymapjs.html-data.json +27 -0
- package/package.json +2 -1
- package/skills/onlymapjs/SKILL.md +3 -1
- package/skills/onlymapjs/references/syntax.md +42 -3
- package/dist/raster-7fiRE9GO.js +0 -5179
package/dist/zarr.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GeoZarr / Zarr raster layer (spec: issue — "Zarr format layers"). A LAZY
|
|
3
|
+
* chunk — dynamically imported the first time a manifest uses
|
|
4
|
+
* `type="ZarrLayer"` (the layer-registry `loadClass` seam), so the eager bundle
|
|
5
|
+
* carries none of zarrita / deck.gl-zarr. Built on
|
|
6
|
+
* `@developmentseed/deck.gl-zarr` (`ZarrLayer`) + `zarrita`, at the same 0.7.0
|
|
7
|
+
* as the COG stack, and it REUSES the shared raster GPU pipeline
|
|
8
|
+
* (raster-pipeline.ts) — colormap / rescale / nodata — that COGLayer uses.
|
|
9
|
+
*
|
|
10
|
+
* GeoZarr is chunked N-dimensional arrays. Two things differ from a COG:
|
|
11
|
+
* 1. The store is opened by US (zarrita FetchStore), not the layer — so this
|
|
12
|
+
* is a CompositeLayer that opens the store async and renders a child
|
|
13
|
+
* ZarrLayer once the variable array resolves.
|
|
14
|
+
* 2. It's N-dimensional: the author picks a `variable` and pins every
|
|
15
|
+
* non-spatial dimension via `select="time=0, level=3"`.
|
|
16
|
+
*
|
|
17
|
+
* Georeferencing: a GeoZarr-compliant store carries the spatial/geo-proj
|
|
18
|
+
* conventions and is used as-is. A plain (non-GeoZarr) store — common for
|
|
19
|
+
* real-world public Zarr, e.g. the ECMWF forecast archive — is georeferenced
|
|
20
|
+
* from author-supplied `bounds` + `crs` + `spatial-dims`, which we assemble
|
|
21
|
+
* into the same synthetic attrs `ZarrLayer`'s `metadata` prop accepts.
|
|
22
|
+
*/
|
|
23
|
+
import { CompositeLayer, type Layer, type LayersList } from "@deck.gl/core";
|
|
24
|
+
import * as zarr from "zarrita";
|
|
25
|
+
import { type RasterStyle } from "./raster-pipeline";
|
|
26
|
+
type AnyProps = Record<string, unknown>;
|
|
27
|
+
/** `select="time=0, level=3"` (or JSON) → the zarrita selection: one pinned index per non-spatial dim. */
|
|
28
|
+
export declare function parseZarrSelection(raw: string | undefined): Record<string, number>;
|
|
29
|
+
/**
|
|
30
|
+
* Build the synthetic GeoZarr attrs a NON-GeoZarr store needs, from the author's
|
|
31
|
+
* `bounds` + `crs` + `spatial-dims` and the array's own spatial shape (the last
|
|
32
|
+
* two dims). The affine follows @developmentseed/affine's `[a,b,c,d,e,f]` form:
|
|
33
|
+
* `x = a*col + b*row + c`, `y = d*col + e*row + f` — top-left origin.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildManualGeoZarrAttrs(bounds: [number, number, number, number], crs: string, spatialDims: [string, string], spatialShape: [number, number]): Record<string, unknown>;
|
|
36
|
+
export interface OmZarrLayerProps extends RasterStyle {
|
|
37
|
+
/** The Zarr store URL (a `.zarr` group). */
|
|
38
|
+
src?: string;
|
|
39
|
+
/** Path to the variable array within the store. */
|
|
40
|
+
variable?: string;
|
|
41
|
+
/** Non-spatial dimension pins, `"time=0, level=3"`. Every non-spatial dim must be pinned. */
|
|
42
|
+
select?: string;
|
|
43
|
+
/** Manual georeferencing for a non-GeoZarr store — `[west, south, east, north]`. */
|
|
44
|
+
bounds?: [number, number, number, number];
|
|
45
|
+
/** CRS for manual georeferencing, e.g. `"EPSG:4326"`. Required with `bounds`. */
|
|
46
|
+
crs?: string;
|
|
47
|
+
/** The two spatial dimension names for manual georeferencing, e.g. `"latitude longitude"`. */
|
|
48
|
+
spatialDims?: string;
|
|
49
|
+
}
|
|
50
|
+
interface ZarrState {
|
|
51
|
+
status: "loading" | "ready" | "error";
|
|
52
|
+
node?: zarr.Array<zarr.NumberDataType, zarr.Readable> | zarr.Group<zarr.Readable>;
|
|
53
|
+
variable?: string;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
selection: Record<string, number>;
|
|
56
|
+
loadKey: string;
|
|
57
|
+
/** deck's CompositeLayer state carries an index signature; mirror it so the override type-checks. */
|
|
58
|
+
[key: string]: unknown;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The manifest-facing class behind `<om-layer type="ZarrLayer">`. Opens the
|
|
62
|
+
* zarrita store, resolves the variable, and renders a child ZarrLayer with our
|
|
63
|
+
* colormap pipeline. Restretch/recolor (min/max/colormap/nodata) never reopen
|
|
64
|
+
* the store — they only rebuild the per-frame render pipeline.
|
|
65
|
+
*/
|
|
66
|
+
export declare class OmZarrLayer extends CompositeLayer<OmZarrLayerProps & AnyProps> {
|
|
67
|
+
static layerName: string;
|
|
68
|
+
static defaultProps: {
|
|
69
|
+
src: string;
|
|
70
|
+
variable: string;
|
|
71
|
+
select: string;
|
|
72
|
+
rescaleMin: null;
|
|
73
|
+
rescaleMax: null;
|
|
74
|
+
colormap: null;
|
|
75
|
+
nodataOverride: null;
|
|
76
|
+
};
|
|
77
|
+
state: ZarrState;
|
|
78
|
+
initializeState(): void;
|
|
79
|
+
updateState({ changeFlags }: {
|
|
80
|
+
changeFlags: {
|
|
81
|
+
propsChanged: boolean | string;
|
|
82
|
+
};
|
|
83
|
+
}): void;
|
|
84
|
+
private _load;
|
|
85
|
+
renderLayers(): LayersList | Layer | null;
|
|
86
|
+
}
|
|
87
|
+
export {};
|