@geospatial-sdk/core 0.0.5-dev.54 → 0.0.5-dev.55
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/model/map-context.d.ts +5 -1
- package/dist/model/map-context.d.ts.map +1 -1
- package/dist/utils/view.d.ts.map +1 -1
- package/dist/utils/view.js +27 -3
- package/lib/model/map-context.ts +7 -1
- package/lib/utils/view.ts +34 -3
- package/package.json +2 -2
- package/dist/model/map-style.d.ts +0 -1
- package/dist/model/map-style.d.ts.map +0 -1
- package/dist/model/map-style.js +0 -1
- package/dist/model/resolved-map-state.d.ts +0 -55
- package/dist/model/resolved-map-state.d.ts.map +0 -1
- package/dist/model/resolved-map-state.js +0 -1
|
@@ -62,6 +62,10 @@ export interface MapContextLayerMapLibreStyle extends MapContextBaseLayer {
|
|
|
62
62
|
styleUrl: string;
|
|
63
63
|
accessToken?: string;
|
|
64
64
|
}
|
|
65
|
+
export interface MapContextLayerGeotiff extends MapContextBaseLayer {
|
|
66
|
+
type: "geotiff";
|
|
67
|
+
url: string;
|
|
68
|
+
}
|
|
65
69
|
export interface MapContextLayerXyz extends MapContextBaseLayer {
|
|
66
70
|
type: "xyz";
|
|
67
71
|
url: string;
|
|
@@ -82,7 +86,7 @@ export type MapContextLayerGeojson = LayerGeojsonWithUrl | LayerGeojsonWithData;
|
|
|
82
86
|
/**
|
|
83
87
|
* A layer that can be used in a map context.
|
|
84
88
|
*/
|
|
85
|
-
export type MapContextLayer = MapContextLayerWms | MapContextLayerWmts | MapContextLayerWfs | MapContextLayerXyz | MapContextLayerGeojson | MapContextLayerOgcApi | MapContextLayerMapLibreStyle;
|
|
89
|
+
export type MapContextLayer = MapContextLayerWms | MapContextLayerWmts | MapContextLayerWfs | MapContextLayerXyz | MapContextLayerGeojson | MapContextLayerOgcApi | MapContextLayerMapLibreStyle | MapContextLayerGeotiff;
|
|
86
90
|
export type Coordinate = [number, number];
|
|
87
91
|
/**
|
|
88
92
|
* Array components are respectively: minX, minY, maxX, maxY
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-context.d.ts","sourceRoot":"","sources":["../../lib/model/map-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,W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ils/view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../lib/utils/view.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,eAAe,
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../lib/utils/view.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,eAAe,EAKf,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAK3B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAchC"}
|
package/dist/utils/view.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { transformExtent } from "ol/proj.js";
|
|
2
2
|
import { WfsEndpoint, WmsEndpoint, WmtsEndpoint } from "@camptocamp/ogc-client";
|
|
3
3
|
import { LONLAT_CRS_CODES } from "../constant/projections.js";
|
|
4
|
-
import { fromEPSGCode
|
|
4
|
+
import { fromEPSGCode } from "ol/proj/proj4.js";
|
|
5
5
|
import GeoJSON from "ol/format/GeoJSON.js";
|
|
6
6
|
import { extend } from "ol/extent.js";
|
|
7
|
-
import
|
|
7
|
+
import GeoTIFF from "ol/source/GeoTIFF.js";
|
|
8
8
|
const GEOJSON = new GeoJSON();
|
|
9
9
|
/**
|
|
10
10
|
* Creates a view from a layer by extracting its geographic extent. The returned extent is
|
|
@@ -41,6 +41,9 @@ export async function createViewFromLayer(layer) {
|
|
|
41
41
|
else if (layer.type === "wfs") {
|
|
42
42
|
return await getWfsLayerExtent(layer);
|
|
43
43
|
}
|
|
44
|
+
else if (layer.type === "geotiff") {
|
|
45
|
+
return await getGeotiffLayerExtent(layer);
|
|
46
|
+
}
|
|
44
47
|
else {
|
|
45
48
|
throw new Error(`Unsupported layer type: ${layer.type}`);
|
|
46
49
|
}
|
|
@@ -72,7 +75,6 @@ async function getWmsLayerExtent(layer) {
|
|
|
72
75
|
}
|
|
73
76
|
else {
|
|
74
77
|
const availableEPSGCode = Object.keys(boundingBoxes)[0];
|
|
75
|
-
register(proj4);
|
|
76
78
|
const proj = await fromEPSGCode(availableEPSGCode);
|
|
77
79
|
return {
|
|
78
80
|
extent: transformExtent(boundingBoxes[availableEPSGCode], proj, "EPSG:4326"),
|
|
@@ -100,3 +102,25 @@ async function getWfsLayerExtent(layer) {
|
|
|
100
102
|
extent: boundingBox,
|
|
101
103
|
};
|
|
102
104
|
}
|
|
105
|
+
async function getGeotiffLayerExtent(layer) {
|
|
106
|
+
const source = new GeoTIFF({
|
|
107
|
+
sources: [{ url: layer.url }],
|
|
108
|
+
});
|
|
109
|
+
return new Promise((resolve) => {
|
|
110
|
+
source.on("change", () => {
|
|
111
|
+
if (source.getState() === "ready") {
|
|
112
|
+
const tileGrid = source.getTileGrid();
|
|
113
|
+
const projection = source.getProjection();
|
|
114
|
+
if (!tileGrid || !projection) {
|
|
115
|
+
resolve(null);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const extent = transformExtent(tileGrid.getExtent(), projection, "EPSG:4326");
|
|
119
|
+
resolve({ extent });
|
|
120
|
+
}
|
|
121
|
+
else if (source.getState() === "error") {
|
|
122
|
+
resolve(null);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
}
|
package/lib/model/map-context.ts
CHANGED
|
@@ -76,6 +76,11 @@ export interface MapContextLayerMapLibreStyle extends MapContextBaseLayer {
|
|
|
76
76
|
accessToken?: string;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
export interface MapContextLayerGeotiff extends MapContextBaseLayer {
|
|
80
|
+
type: "geotiff";
|
|
81
|
+
url: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
export interface MapContextLayerXyz extends MapContextBaseLayer {
|
|
80
85
|
type: "xyz";
|
|
81
86
|
url: string;
|
|
@@ -106,7 +111,8 @@ export type MapContextLayer =
|
|
|
106
111
|
| MapContextLayerXyz
|
|
107
112
|
| MapContextLayerGeojson
|
|
108
113
|
| MapContextLayerOgcApi
|
|
109
|
-
| MapContextLayerMapLibreStyle
|
|
114
|
+
| MapContextLayerMapLibreStyle
|
|
115
|
+
| MapContextLayerGeotiff;
|
|
110
116
|
|
|
111
117
|
export type Coordinate = [number, number];
|
|
112
118
|
|
package/lib/utils/view.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { transformExtent } from "ol/proj.js";
|
|
2
2
|
import { WfsEndpoint, WmsEndpoint, WmtsEndpoint } from "@camptocamp/ogc-client";
|
|
3
3
|
import { LONLAT_CRS_CODES } from "../constant/projections.js";
|
|
4
|
-
import { fromEPSGCode
|
|
4
|
+
import { fromEPSGCode } from "ol/proj/proj4.js";
|
|
5
5
|
import GeoJSON from "ol/format/GeoJSON.js";
|
|
6
6
|
import { extend } from "ol/extent.js";
|
|
7
7
|
import type Feature from "ol/Feature.js";
|
|
8
|
-
import
|
|
8
|
+
import GeoTIFF from "ol/source/GeoTIFF.js";
|
|
9
9
|
import {
|
|
10
10
|
Extent,
|
|
11
11
|
MapContextLayer,
|
|
12
|
+
MapContextLayerGeotiff,
|
|
12
13
|
MapContextLayerWfs,
|
|
13
14
|
MapContextLayerWms,
|
|
14
15
|
MapContextLayerWmts,
|
|
@@ -52,6 +53,8 @@ export async function createViewFromLayer(
|
|
|
52
53
|
return computeExtentFromGeojson(layer.data);
|
|
53
54
|
} else if (layer.type === "wfs") {
|
|
54
55
|
return await getWfsLayerExtent(layer);
|
|
56
|
+
} else if (layer.type === "geotiff") {
|
|
57
|
+
return await getGeotiffLayerExtent(layer);
|
|
55
58
|
} else {
|
|
56
59
|
throw new Error(`Unsupported layer type: ${layer.type}`);
|
|
57
60
|
}
|
|
@@ -92,7 +95,6 @@ async function getWmsLayerExtent(
|
|
|
92
95
|
};
|
|
93
96
|
} else {
|
|
94
97
|
const availableEPSGCode = Object.keys(boundingBoxes)[0];
|
|
95
|
-
register(proj4);
|
|
96
98
|
const proj = await fromEPSGCode(availableEPSGCode);
|
|
97
99
|
return {
|
|
98
100
|
extent: transformExtent(
|
|
@@ -130,3 +132,32 @@ async function getWfsLayerExtent(
|
|
|
130
132
|
extent: boundingBox,
|
|
131
133
|
};
|
|
132
134
|
}
|
|
135
|
+
|
|
136
|
+
async function getGeotiffLayerExtent(
|
|
137
|
+
layer: MapContextLayerGeotiff,
|
|
138
|
+
): Promise<ViewByExtent | null> {
|
|
139
|
+
const source = new GeoTIFF({
|
|
140
|
+
sources: [{ url: layer.url }],
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
return new Promise((resolve) => {
|
|
144
|
+
source.on("change", () => {
|
|
145
|
+
if (source.getState() === "ready") {
|
|
146
|
+
const tileGrid = source.getTileGrid();
|
|
147
|
+
const projection = source.getProjection();
|
|
148
|
+
if (!tileGrid || !projection) {
|
|
149
|
+
resolve(null);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const extent = transformExtent(
|
|
153
|
+
tileGrid.getExtent(),
|
|
154
|
+
projection,
|
|
155
|
+
"EPSG:4326",
|
|
156
|
+
) as Extent;
|
|
157
|
+
resolve({ extent });
|
|
158
|
+
} else if (source.getState() === "error") {
|
|
159
|
+
resolve(null);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geospatial-sdk/core",
|
|
3
|
-
"version": "0.0.5-dev.
|
|
3
|
+
"version": "0.0.5-dev.55+475f057",
|
|
4
4
|
"description": "Core functions and models for the SDK",
|
|
5
5
|
"author": "Olivia <olivia.guyot@camptocamp.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "vitest",
|
|
23
23
|
"build": "tsc"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "475f057bccd243497d84db212b50812633e7398b",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"chroma-js": "^2.4.2",
|
|
28
28
|
"proj4": "^2.9.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=map-style.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-style.d.ts","sourceRoot":"","sources":["../../lib/model/map-style.ts"],"names":[],"mappings":""}
|
package/dist/model/map-style.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Coordinate, Extent, LayerDimensionValueRange, LayerDimensionValueSingle } from "./map-context.js";
|
|
2
|
-
export type MapLayerCreationStatus = {
|
|
3
|
-
created: true;
|
|
4
|
-
} | {
|
|
5
|
-
creationError: true;
|
|
6
|
-
creationErrorMessage: string;
|
|
7
|
-
};
|
|
8
|
-
export type MapLayerLoadingStatus = {
|
|
9
|
-
loaded: true;
|
|
10
|
-
} | {
|
|
11
|
-
loadingError: true;
|
|
12
|
-
loadingErrorMessage: string;
|
|
13
|
-
loadingErrorHttpStatus?: number;
|
|
14
|
-
} | {
|
|
15
|
-
loading: true;
|
|
16
|
-
};
|
|
17
|
-
export interface LayerDimension {
|
|
18
|
-
name: string;
|
|
19
|
-
isTime: boolean;
|
|
20
|
-
description?: string;
|
|
21
|
-
units: string;
|
|
22
|
-
supportsRange: boolean;
|
|
23
|
-
supportsNearest: boolean;
|
|
24
|
-
defaultValue?: LayerDimensionValueSingle | LayerDimensionValueRange;
|
|
25
|
-
availableValues: (LayerDimensionValueSingle | LayerDimensionValueRange)[];
|
|
26
|
-
}
|
|
27
|
-
export interface MapLayerDataInfo {
|
|
28
|
-
featuresCount?: number;
|
|
29
|
-
geometryTypes?: Array<"Point" | "LineString" | "Polygon">;
|
|
30
|
-
dimensions?: LayerDimension[];
|
|
31
|
-
}
|
|
32
|
-
export type ResolvedMapLayerState = MapLayerCreationStatus & MapLayerLoadingStatus & MapLayerDataInfo;
|
|
33
|
-
/**
|
|
34
|
-
* Describes the actual view state of a map
|
|
35
|
-
*/
|
|
36
|
-
export interface ResolvedMapViewState {
|
|
37
|
-
/** View center in longitude/latitude */
|
|
38
|
-
center: Coordinate;
|
|
39
|
-
/** Actual view extent in longitude/latitude */
|
|
40
|
-
extent: Extent;
|
|
41
|
-
/** Map units per pixel */
|
|
42
|
-
resolution: number;
|
|
43
|
-
/** Scale denominator (takes into account an estimated DPI) */
|
|
44
|
-
scaleDenominator: number;
|
|
45
|
-
/** Bearing in degrees; 90 is North (up) */
|
|
46
|
-
bearing: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Describes the actual state of a map after a context or context diff was applied to it.
|
|
50
|
-
*/
|
|
51
|
-
export interface ResolvedMapState {
|
|
52
|
-
layers: ResolvedMapLayerState[];
|
|
53
|
-
view: ResolvedMapViewState;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=resolved-map-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolved-map-state.d.ts","sourceRoot":"","sources":["../../lib/model/resolved-map-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,MAAM,EACN,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,sBAAsB,GAC9B;IACE,OAAO,EAAE,IAAI,CAAC;CACf,GACD;IACE,aAAa,EAAE,IAAI,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEN,MAAM,MAAM,qBAAqB,GAC7B;IACE,MAAM,EAAE,IAAI,CAAC;CACd,GACD;IACE,YAAY,EAAE,IAAI,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,GACD;IACE,OAAO,EAAE,IAAI,CAAC;CACf,CAAC;AAEN,MAAM,WAAW,cAAc;IAC7B,IAAI,EAA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