@developmentseed/deck.gl-geotiff 0.6.1 → 0.7.0
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/dist/cog-layer.d.ts +6 -5
- package/dist/cog-layer.d.ts.map +1 -1
- package/dist/cog-layer.js.map +1 -1
- package/dist/geotiff/render-pipeline.js +8 -7
- package/dist/geotiff/render-pipeline.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mosaic-layer/mosaic-layer.d.ts +57 -4
- package/dist/mosaic-layer/mosaic-layer.d.ts.map +1 -1
- package/dist/mosaic-layer/mosaic-layer.js +76 -8
- package/dist/mosaic-layer/mosaic-layer.js.map +1 -1
- package/dist/mosaic-layer/mosaic-tileset-2d.d.ts +37 -7
- package/dist/mosaic-layer/mosaic-tileset-2d.d.ts.map +1 -1
- package/dist/mosaic-layer/mosaic-tileset-2d.js +55 -30
- package/dist/mosaic-layer/mosaic-tileset-2d.js.map +1 -1
- package/dist/multi-cog-layer.d.ts +27 -64
- package/dist/multi-cog-layer.d.ts.map +1 -1
- package/dist/multi-cog-layer.js +70 -173
- package/dist/multi-cog-layer.js.map +1 -1
- package/package.json +10 -10
- package/dist/geotiff-layer.d.ts +0 -90
- package/dist/geotiff-layer.d.ts.map +0 -1
- package/dist/geotiff-layer.js +0 -81
- package/dist/geotiff-layer.js.map +0 -1
- package/dist/geotiff-reprojection.d.ts +0 -12
- package/dist/geotiff-reprojection.d.ts.map +0 -1
- package/dist/geotiff-reprojection.js +0 -26
- package/dist/geotiff-reprojection.js.map +0 -1
package/dist/geotiff-layer.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { CompositeLayerProps, UpdateParameters } from "@deck.gl/core";
|
|
2
|
-
import { CompositeLayer } from "@deck.gl/core";
|
|
3
|
-
import { RasterLayer } from "@developmentseed/deck.gl-raster";
|
|
4
|
-
import type { DecoderPool, GeoTIFF } from "@developmentseed/geotiff";
|
|
5
|
-
import type { EpsgResolver, ProjectionDefinition } from "@developmentseed/proj";
|
|
6
|
-
import { epsgResolver } from "@developmentseed/proj";
|
|
7
|
-
import type { ReprojectionFns } from "@developmentseed/raster-reproject";
|
|
8
|
-
export interface GeoTIFFLayerProps extends CompositeLayerProps {
|
|
9
|
-
/**
|
|
10
|
-
* GeoTIFF input.
|
|
11
|
-
*
|
|
12
|
-
* - {@link URL} or `string` pointing to a GeoTIFF
|
|
13
|
-
* - {@link ArrayBuffer} containing the GeoTIFF data
|
|
14
|
-
* - An instance of the {@link GeoTIFF} class.
|
|
15
|
-
*/
|
|
16
|
-
geotiff: GeoTIFF | string | URL | ArrayBuffer;
|
|
17
|
-
/**
|
|
18
|
-
* A function callback for parsing numeric EPSG codes to projection
|
|
19
|
-
* information (as returned by `wkt-parser`).
|
|
20
|
-
*
|
|
21
|
-
* The default implementation:
|
|
22
|
-
* - makes a request to epsg.io to resolve EPSG codes found in the GeoTIFF.
|
|
23
|
-
* - caches any previous requests
|
|
24
|
-
* - parses PROJJSON response with `wkt-parser`
|
|
25
|
-
*/
|
|
26
|
-
epsgResolver?: EpsgResolver;
|
|
27
|
-
/**
|
|
28
|
-
* Decoder pool for decoding image chunks.
|
|
29
|
-
*
|
|
30
|
-
* If none is provided, a default DecoderPool will be created and shared
|
|
31
|
-
* between all COGLayer and GeoTIFFLayer instances.
|
|
32
|
-
*/
|
|
33
|
-
pool?: DecoderPool;
|
|
34
|
-
/**
|
|
35
|
-
* Maximum reprojection error in pixels for mesh refinement.
|
|
36
|
-
* Lower values create denser meshes with higher accuracy.
|
|
37
|
-
* @default 0.125
|
|
38
|
-
*/
|
|
39
|
-
maxError?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Enable debug visualization showing the triangulation mesh
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
debug?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Opacity of the debug mesh overlay (0-1)
|
|
47
|
-
* @default 0.5
|
|
48
|
-
*/
|
|
49
|
-
debugOpacity?: number;
|
|
50
|
-
/**
|
|
51
|
-
* Called when the GeoTIFF metadata has been loaded and parsed.
|
|
52
|
-
*/
|
|
53
|
-
onGeoTIFFLoad?: (geotiff: GeoTIFF, options: {
|
|
54
|
-
projection: ProjectionDefinition;
|
|
55
|
-
/**
|
|
56
|
-
* Bounds of the image in geographic coordinates (WGS84) [minLon, minLat,
|
|
57
|
-
* maxLon, maxLat]
|
|
58
|
-
*/
|
|
59
|
-
geographicBounds: {
|
|
60
|
-
west: number;
|
|
61
|
-
south: number;
|
|
62
|
-
east: number;
|
|
63
|
-
north: number;
|
|
64
|
-
};
|
|
65
|
-
}) => void;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* GeoTIFFLayer renders a GeoTIFF file from an arbitrary projection.
|
|
69
|
-
*
|
|
70
|
-
* The GeoTIFFLayer differs from the COGLayer in that it doesn't assume any
|
|
71
|
-
* internal tiling. Rather, it fetches the entire full-resolution image and
|
|
72
|
-
* displays it directly.
|
|
73
|
-
*/
|
|
74
|
-
export declare class GeoTIFFLayer extends CompositeLayer<GeoTIFFLayerProps> {
|
|
75
|
-
static layerName: string;
|
|
76
|
-
static defaultProps: {
|
|
77
|
-
epsgResolver: typeof epsgResolver;
|
|
78
|
-
};
|
|
79
|
-
state: {
|
|
80
|
-
reprojectionFns?: ReprojectionFns;
|
|
81
|
-
imageData?: ImageData;
|
|
82
|
-
height?: number;
|
|
83
|
-
width?: number;
|
|
84
|
-
};
|
|
85
|
-
initializeState(): void;
|
|
86
|
-
updateState(params: UpdateParameters<this>): void;
|
|
87
|
-
_parseGeoTIFF(): Promise<void>;
|
|
88
|
-
renderLayers(): RasterLayer | null;
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=geotiff-layer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-layer.d.ts","source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B,SAAS,SAAkB;IAC3C,OAAgB,YAAY;;MAAgB;IAEpC,KAAK,EAAE;QACb,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEO,eAAe,IAAI,IAAI;IAIvB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAe7C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAwCpC,YAAY;CAsBb"}
|
package/dist/geotiff-layer.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { CompositeLayer } from "@deck.gl/core";
|
|
2
|
-
import { RasterLayer } from "@developmentseed/deck.gl-raster";
|
|
3
|
-
import { epsgResolver, parseWkt } from "@developmentseed/proj";
|
|
4
|
-
import proj4 from "proj4";
|
|
5
|
-
import { fetchGeoTIFF, getGeographicBounds } from "./geotiff/geotiff.js";
|
|
6
|
-
import { extractGeotiffReprojectors } from "./geotiff-reprojection.js";
|
|
7
|
-
const defaultProps = {
|
|
8
|
-
epsgResolver,
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* GeoTIFFLayer renders a GeoTIFF file from an arbitrary projection.
|
|
12
|
-
*
|
|
13
|
-
* The GeoTIFFLayer differs from the COGLayer in that it doesn't assume any
|
|
14
|
-
* internal tiling. Rather, it fetches the entire full-resolution image and
|
|
15
|
-
* displays it directly.
|
|
16
|
-
*/
|
|
17
|
-
export class GeoTIFFLayer extends CompositeLayer {
|
|
18
|
-
static layerName = "GeoTIFFLayer";
|
|
19
|
-
static defaultProps = defaultProps;
|
|
20
|
-
initializeState() {
|
|
21
|
-
this.setState({});
|
|
22
|
-
}
|
|
23
|
-
updateState(params) {
|
|
24
|
-
super.updateState(params);
|
|
25
|
-
const { props, oldProps, changeFlags } = params;
|
|
26
|
-
const needsUpdate = Boolean(changeFlags.dataChanged) ||
|
|
27
|
-
props.geotiff !== oldProps.geotiff ||
|
|
28
|
-
props.maxError !== oldProps.maxError;
|
|
29
|
-
if (needsUpdate) {
|
|
30
|
-
this._parseGeoTIFF();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async _parseGeoTIFF() {
|
|
34
|
-
const geotiff = await fetchGeoTIFF(this.props.geotiff);
|
|
35
|
-
const crs = geotiff.crs;
|
|
36
|
-
const sourceProjection = typeof crs === "number"
|
|
37
|
-
? await this.props.epsgResolver(crs)
|
|
38
|
-
: parseWkt(crs);
|
|
39
|
-
// @ts-expect-error proj4 has incomplete types that don't support wkt-parser
|
|
40
|
-
// output
|
|
41
|
-
const converter = proj4(sourceProjection, "EPSG:4326");
|
|
42
|
-
if (this.props.onGeoTIFFLoad) {
|
|
43
|
-
const geographicBounds = getGeographicBounds(geotiff, converter);
|
|
44
|
-
this.props.onGeoTIFFLoad(geotiff, {
|
|
45
|
-
projection: sourceProjection,
|
|
46
|
-
geographicBounds,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
// @ts-expect-error unused variable
|
|
50
|
-
// biome-ignore lint/correctness/noUnusedVariables: not implemented
|
|
51
|
-
const reprojectionFns = await extractGeotiffReprojectors(geotiff, sourceProjection);
|
|
52
|
-
// Our GeoTIFF implementation doesn't currently support reading the full
|
|
53
|
-
// image; it only supports reading tiles.
|
|
54
|
-
throw new Error("Loading GeoTIFF image data not yet implemented");
|
|
55
|
-
// const { texture, height, width } = await loadRgbImage(image);
|
|
56
|
-
// this.setState({
|
|
57
|
-
// reprojectionFns,
|
|
58
|
-
// imageData: texture,
|
|
59
|
-
// height,
|
|
60
|
-
// width,
|
|
61
|
-
// });
|
|
62
|
-
}
|
|
63
|
-
renderLayers() {
|
|
64
|
-
const { reprojectionFns, imageData, height, width } = this.state;
|
|
65
|
-
if (!reprojectionFns || !imageData || !height || !width) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
const { maxError, debug, debugOpacity } = this.props;
|
|
69
|
-
return new RasterLayer(this.getSubLayerProps({
|
|
70
|
-
id: "raster",
|
|
71
|
-
width,
|
|
72
|
-
height,
|
|
73
|
-
reprojectionFns,
|
|
74
|
-
maxError,
|
|
75
|
-
texture: imageData,
|
|
76
|
-
debug,
|
|
77
|
-
debugOpacity,
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=geotiff-layer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-layer.js","sourceRoot":"","sources":["../src/geotiff-layer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAuEvE,MAAM,YAAY,GAAG;IACnB,YAAY;CACb,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,OAAO,YAAa,SAAQ,cAAiC;IACjE,MAAM,CAAU,SAAS,GAAG,cAAc,CAAC;IAC3C,MAAM,CAAU,YAAY,GAAG,YAAY,CAAC;IASnC,eAAe;QACtB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IAEQ,WAAW,CAAC,MAA8B;QACjD,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAE1B,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAEhD,MAAM,WAAW,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC;YAChC,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO;YA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CAAC,eAAe,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YACxD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAErD,OAAO,IAAI,WAAW,CACpB,IAAI,CAAC,gBAAgB,CAAC;YACpB,EAAE,EAAE,QAAQ;YACZ,KAAK;YACL,MAAM;YACN,eAAe;YACf,QAAQ;YACR,OAAO,EAAE,SAAS;YAClB,KAAK;YACL,YAAY;SACb,CAAC,CACH,CAAC;IACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Affine } from "@developmentseed/affine";
|
|
2
|
-
import type { GeoTIFF } from "@developmentseed/geotiff";
|
|
3
|
-
import type { ProjectionDefinition } from "@developmentseed/proj";
|
|
4
|
-
import type { ReprojectionFns } from "@developmentseed/raster-reproject";
|
|
5
|
-
import type { PROJJSONDefinition } from "proj4/dist/lib/core";
|
|
6
|
-
import type Projection from "proj4/dist/lib/Proj";
|
|
7
|
-
export declare function extractGeotiffReprojectors(geotiff: GeoTIFF, sourceProjection: string | PROJJSONDefinition | ProjectionDefinition, outputCrs?: string | PROJJSONDefinition | Projection): Promise<ReprojectionFns>;
|
|
8
|
-
export declare function fromAffine(geotransform: Affine): {
|
|
9
|
-
forwardTransform: (x: number, y: number) => [number, number];
|
|
10
|
-
inverseTransform: (x: number, y: number) => [number, number];
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=geotiff-reprojection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-reprojection.d.ts","sourceRoot":"","sources":["../src/geotiff-reprojection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAMlD,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,MAAM,GAAG,kBAAkB,GAAG,oBAAoB,EACpE,SAAS,GAAE,MAAM,GAAG,kBAAkB,GAAG,UAAwB,GAChE,OAAO,CAAC,eAAe,CAAC,CAc1B;AAED,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG;IAChD,gBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7D,gBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9D,CAQA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as affine from "@developmentseed/affine";
|
|
2
|
-
import proj4 from "proj4";
|
|
3
|
-
// Derived from existing work here:
|
|
4
|
-
// https://github.com/developmentseed/lonboard/blob/35a1f3d691604ad9e083bf10a4bfde4158171486/src/cog-tileset/claude-tileset-2d-improved.ts#L141
|
|
5
|
-
//
|
|
6
|
-
// TODO: return a RasterReprojector instance, given the IFD and tile of interest?
|
|
7
|
-
export async function extractGeotiffReprojectors(geotiff, sourceProjection, outputCrs = "EPSG:4326") {
|
|
8
|
-
// @ts-expect-error - proj4 type definitions are incomplete and don't include
|
|
9
|
-
// support for wkt-parser output
|
|
10
|
-
const converter = proj4(sourceProjection, outputCrs);
|
|
11
|
-
const { forwardTransform, inverseTransform } = fromAffine(geotiff.transform);
|
|
12
|
-
return {
|
|
13
|
-
forwardTransform,
|
|
14
|
-
inverseTransform,
|
|
15
|
-
forwardReproject: (x, y) => converter.forward([x, y], false),
|
|
16
|
-
inverseReproject: (x, y) => converter.inverse([x, y], false),
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export function fromAffine(geotransform) {
|
|
20
|
-
const inverseGeotransform = affine.invert(geotransform);
|
|
21
|
-
return {
|
|
22
|
-
forwardTransform: (x, y) => affine.apply(geotransform, x, y),
|
|
23
|
-
inverseTransform: (x, y) => affine.apply(inverseGeotransform, x, y),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=geotiff-reprojection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geotiff-reprojection.js","sourceRoot":"","sources":["../src/geotiff-reprojection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAIlD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,mCAAmC;AACnC,+IAA+I;AAC/I,EAAE;AACF,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAAgB,EAChB,gBAAoE,EACpE,YAAsD,WAAW;IAEjE,6EAA6E;IAC7E,gCAAgC;IAChC,MAAM,SAAS,GAAG,KAAK,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACrD,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAE7E,OAAO;QACL,gBAAgB;QAChB,gBAAgB;QAChB,gBAAgB,EAAE,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CACzC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC;QAClC,gBAAgB,EAAE,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CACzC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,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