@opengeoweb/webmap-react 19.0.0 → 19.1.1
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/README.md +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +12712 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/lib/components/Clock/Clock.d.ts +23 -0
- package/dist/src/lib/components/Clock/ClockContainer.d.ts +9 -0
- package/dist/src/lib/components/Clock/clockContainerUtils.d.ts +1 -0
- package/dist/src/lib/components/Clock/index.d.ts +1 -0
- package/dist/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.d.ts +2 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoButton.d.ts +8 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +18 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoLegend.d.ts +7 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoList.d.ts +10 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoText.d.ts +16 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoUtils.d.ts +9 -0
- package/dist/src/lib/components/LayerInfo/index.d.ts +6 -0
- package/dist/src/lib/components/Legend/Legend.d.ts +8 -0
- package/dist/src/lib/components/Legend/LegendButton.d.ts +5 -0
- package/dist/src/lib/components/Legend/LegendDialog.d.ts +16 -0
- package/dist/src/lib/components/Legend/LegendLayout.d.ts +10 -0
- package/dist/src/lib/components/Legend/index.d.ts +4 -0
- package/dist/src/lib/components/MapControls/MapControlButton.d.ts +10 -0
- package/dist/src/lib/components/MapControls/MapControls.d.ts +7 -0
- package/dist/src/lib/components/MapControls/ZoomControls.d.ts +8 -0
- package/dist/src/lib/components/MapControls/index.d.ts +3 -0
- package/dist/src/lib/components/MapDimensionSelect/DimensionSelectButton.d.ts +8 -0
- package/dist/src/lib/components/MapDimensionSelect/DimensionSelectDialog.d.ts +14 -0
- package/dist/src/lib/components/MapDimensionSelect/DimensionSelectSlider.d.ts +14 -0
- package/dist/src/lib/components/MapDimensionSelect/MapDimensionSelect.d.ts +12 -0
- package/dist/src/lib/components/MapDimensionSelect/index.d.ts +6 -0
- package/dist/src/lib/components/MapDimensionSelect/utils.d.ts +18 -0
- package/dist/src/lib/components/MapMeasure/MapMeasure.d.ts +5 -0
- package/dist/src/lib/components/MapMeasure/index.d.ts +1 -0
- package/dist/src/lib/components/MapMousePosition/MapMousePosition.d.ts +2 -0
- package/dist/src/lib/components/MapMousePosition/index.d.ts +1 -0
- package/dist/src/lib/components/MapTime/MapTime.d.ts +11 -0
- package/dist/src/lib/components/MapTime/index.d.ts +1 -0
- package/dist/src/lib/components/MapWarning/MapWarningProperties.d.ts +22 -0
- package/dist/src/lib/components/MapWarning/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/OlColors.d.ts +5 -0
- package/dist/src/lib/components/OpenLayers/OlStyles.d.ts +52 -0
- package/dist/src/lib/components/OpenLayers/OpenLayersConstants.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/component/OpenLayersMapView.d.ts +13 -0
- package/dist/src/lib/components/OpenLayers/context/MapContext.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/context/TimeContext.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/controls/index.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +29 -0
- package/dist/src/lib/components/OpenLayers/draw/geojsonShapes.d.ts +19 -0
- package/dist/src/lib/components/OpenLayers/draw/index.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/mapDrawUtils.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/polygonCleanDangling.d.ts +35 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/EditModeButton.d.ts +7 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/FeatureLayers.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/GeoJSONTextField.d.ts +11 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/IntersectionSelect.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/SelectField.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/StoryLayout.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/StoryLayoutGrid.d.ts +4 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/ToolButton.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/geojsonExamples.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/index.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/storyUtils.d.ts +48 -0
- package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawTool.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolIntersection.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolMultipleDrawTools.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/types.d.ts +43 -0
- package/dist/src/lib/components/OpenLayers/draw/useMapDrawTool.d.ts +61 -0
- package/dist/src/lib/components/OpenLayers/draw/utils.d.ts +84 -0
- package/dist/src/lib/components/OpenLayers/index.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +16 -0
- package/dist/src/lib/components/OpenLayers/layers/GeoTIFFLayer.d.ts +13 -0
- package/dist/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +16 -0
- package/dist/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +20 -0
- package/dist/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayer.d.ts +17 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayerUtils.d.ts +20 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareWMTSLayer.d.ts +17 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +18 -0
- package/dist/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/layers/fakeApiWmtsQueries.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/layers/index.d.ts +11 -0
- package/dist/src/lib/components/OpenLayers/layers/utils.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/storyComponents/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/styles/useIconStyle.d.ts +25 -0
- package/dist/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/tools/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/types/Timespan.d.ts +11 -0
- package/dist/src/lib/components/OpenLayers/types/WorkerQueue.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/useProjectionDropDown.d.ts +17 -0
- package/dist/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +44 -0
- package/dist/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +68 -0
- package/dist/src/lib/components/OpenLayers/utils/WorkerQueue.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/utils/constants.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +26 -0
- package/dist/src/lib/components/OpenLayers/utils/projections.d.ts +16 -0
- package/dist/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/utils/types.d.ts +19 -0
- package/dist/src/lib/components/OpenLayers/utils/viewUtils.d.ts +11 -0
- package/dist/src/lib/components/Providers/Providers.d.ts +2 -0
- package/dist/src/lib/components/Providers/index.d.ts +1 -0
- package/dist/src/lib/components/TanStackDemo/storyUtils.d.ts +6 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSDimTimeYearSelector.d.ts +18 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSLayerSelector.d.ts +9 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSStyleSelector.d.ts +8 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSTimeSlider.d.ts +8 -0
- package/dist/src/lib/components/index.d.ts +9 -0
- package/dist/src/lib/edr-layer-api/api.d.ts +7 -0
- package/dist/src/lib/edr-layer-api/colormaps/colormaps.d.ts +9 -0
- package/dist/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +32 -0
- package/dist/src/lib/edr-layer-api/colormaps/index.d.ts +2 -0
- package/dist/src/lib/edr-layer-api/fakeApi.d.ts +1 -0
- package/dist/src/lib/edr-layer-api/hooks.d.ts +14 -0
- package/dist/src/lib/edr-layer-api/index.d.ts +3 -0
- package/dist/src/lib/edr-layer-api/utils/coverageCollectionToFeatureCollection.d.ts +2 -0
- package/dist/src/lib/edr-layer-api/utils/useEDRWMLayer.d.ts +11 -0
- package/dist/src/lib/geotiff-layer-api/api.d.ts +92 -0
- package/dist/src/lib/geotiff-layer-api/fakeApi.d.ts +1 -0
- package/dist/src/lib/geotiff-layer-api/hooks.d.ts +5 -0
- package/dist/src/lib/geotiff-layer-api/index.d.ts +3 -0
- package/dist/src/lib/geotiff-layer-api/utils/stacColormapToOlStyle.d.ts +25 -0
- package/dist/src/lib/geotiff-layer-api/utils/stacTimeStepUtils.d.ts +18 -0
- package/dist/src/lib/geotiff-layer-api/utils/useGetStacGeoTIFFLayerInstance.d.ts +11 -0
- package/dist/src/lib/hooks/index.d.ts +4 -0
- package/dist/src/lib/hooks/useAnimationForLayer.d.ts +9 -0
- package/dist/src/lib/hooks/useHooksGetCapabilities.d.ts +63 -0
- package/dist/src/lib/hooks/useSetInterValWhenVisible.d.ts +1 -0
- package/dist/src/lib/hooks/useViewFromLayer.d.ts +7 -0
- package/dist/src/lib/index.d.ts +8 -0
- package/dist/src/lib/layers/defaultLayers.d.ts +15 -0
- package/dist/src/lib/layers/defaultStorybookSettings.d.ts +9 -0
- package/dist/src/lib/layers/index.d.ts +3 -0
- package/dist/src/lib/layers/profileLayers.d.ts +19 -0
- package/dist/src/lib/layers/publicLayers.d.ts +310 -0
- package/dist/src/lib/layers/publicServices.d.ts +90 -0
- package/dist/src/lib/types/index.d.ts +1 -0
- package/dist/src/lib/types/types.d.ts +64 -0
- package/dist/src/lib/utils/i18n.d.ts +8 -0
- package/dist/src/lib/utils/index.d.ts +1 -0
- package/dist/src/lib/utils/utils.d.ts +4 -0
- package/package.json +2 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Style } from 'ol/style';
|
|
2
|
+
import type { Options } from 'ol/style/Icon';
|
|
3
|
+
type IconSVG = string | {
|
|
4
|
+
path: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
interface IconParameters {
|
|
9
|
+
render?: {
|
|
10
|
+
fillStyle?: string | CanvasGradient | CanvasPattern;
|
|
11
|
+
strokeStyle?: string | CanvasGradient | CanvasPattern;
|
|
12
|
+
lineWidth?: number;
|
|
13
|
+
};
|
|
14
|
+
icon?: Omit<Options, 'img'>;
|
|
15
|
+
}
|
|
16
|
+
interface UseIconStyleProps {
|
|
17
|
+
svgPath: string;
|
|
18
|
+
options: IconParameters;
|
|
19
|
+
}
|
|
20
|
+
interface IconStyle {
|
|
21
|
+
icon: Style;
|
|
22
|
+
}
|
|
23
|
+
export declare const createIconStyle: ((input: IconSVG, options: IconParameters) => Style) & import("lodash").MemoizedFunction;
|
|
24
|
+
export declare const useIconStyle: ({ svgPath, options, }: UseIconStyleProps) => IconStyle;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StyleLike } from 'ol/style/Style';
|
|
2
|
+
export interface ClickOnMapToolProps {
|
|
3
|
+
isActive: boolean;
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
layerZIndex?: number;
|
|
6
|
+
pointStyle: StyleLike;
|
|
7
|
+
pointSelected: (coords: number[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ClickOnMapTool: React.FC<ClickOnMapToolProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ClickOnMapTool } from './ClickOnMapTool';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RefTimeDimensionModes } from '@opengeoweb/webmap';
|
|
2
|
+
export interface Timespan {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
step: number;
|
|
6
|
+
}
|
|
7
|
+
export interface TimeContextType {
|
|
8
|
+
isAnimating: boolean;
|
|
9
|
+
prefetchList: number[];
|
|
10
|
+
refTimeDimensionModes?: RefTimeDimensionModes;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { View } from 'ol';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { EPSGCode } from '@opengeoweb/shared';
|
|
4
|
+
import type { Bbox } from '@opengeoweb/webmap';
|
|
5
|
+
export interface BboxAndSrs {
|
|
6
|
+
srs: EPSGCode;
|
|
7
|
+
bbox: Bbox;
|
|
8
|
+
}
|
|
9
|
+
export interface SrsSelectComponentProps {
|
|
10
|
+
srsAndBBOX: BboxAndSrs;
|
|
11
|
+
setSrs: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const SrsSelectComponent: React.FC<SrsSelectComponentProps>;
|
|
14
|
+
export declare const useProjectionDropDown: (initCRS?: string) => {
|
|
15
|
+
view: View;
|
|
16
|
+
selectComponent: React.ReactElement;
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type ImageLayer from 'ol/layer/Image';
|
|
2
|
+
import type { WMLayer } from '@opengeoweb/webmap';
|
|
3
|
+
import type { TimeawareImageSource } from './TimeawareImageSource';
|
|
4
|
+
export interface ShowTimeAwareLayerInfoProps {
|
|
5
|
+
wmLayer: WMLayer;
|
|
6
|
+
stepsToCheck: number[];
|
|
7
|
+
layer: ImageLayer<TimeawareImageSource>;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ShowTimeAwareLayerInfo: React.FC<ShowTimeAwareLayerInfoProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Extent } from 'ol/extent';
|
|
2
|
+
import ImageWrapper from 'ol/Image';
|
|
3
|
+
import type { Projection } from 'ol/proj';
|
|
4
|
+
import type { WMImage } from '@opengeoweb/webmap';
|
|
5
|
+
import { WMImageStore } from '@opengeoweb/webmap';
|
|
6
|
+
export declare const openLayersGetMapImageStore: WMImageStore;
|
|
7
|
+
export declare const clearImageCacheForAllMaps: () => void;
|
|
8
|
+
interface TimeAwareGeoreferencedImageSrc {
|
|
9
|
+
src: string;
|
|
10
|
+
extent: Extent;
|
|
11
|
+
resolution: number;
|
|
12
|
+
}
|
|
13
|
+
interface TimeAwareGeoreferencedImage {
|
|
14
|
+
el: HTMLImageElement;
|
|
15
|
+
extent: Extent;
|
|
16
|
+
resolution: number;
|
|
17
|
+
isLoaded: boolean;
|
|
18
|
+
hasError: boolean;
|
|
19
|
+
isLoadedWithoutErrors: boolean;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare class TimeAwareImageWrapper extends ImageWrapper {
|
|
23
|
+
private _extentToLoad;
|
|
24
|
+
private _resolutionToLoad;
|
|
25
|
+
private _pixelRatioToLoad;
|
|
26
|
+
private _paramsToLoad;
|
|
27
|
+
private _dimPropsToLoad;
|
|
28
|
+
private _getMapUrl;
|
|
29
|
+
private projection;
|
|
30
|
+
private _resolvers;
|
|
31
|
+
private _styleName;
|
|
32
|
+
private _layerName;
|
|
33
|
+
constructor(extent: Extent, resolution: number, pixelRatio: number);
|
|
34
|
+
getWMSGetMapRequestURL(extentToLoad: Extent, resolutionToLoad: number, __pixelRatio: number, projection: Projection | null, getMapUrl: string | null, params: Record<string, string>, layerName: string | null, styleName: string, dimProps: Record<string, string>): TimeAwareGeoreferencedImageSrc;
|
|
35
|
+
getAlternativeImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimsProps: Record<string, string>): TimeAwareGeoreferencedImage | false;
|
|
36
|
+
hasImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimsProps: Record<string, string>): TimeAwareGeoreferencedImage | false;
|
|
37
|
+
setGeoReferencedImage(image: TimeAwareGeoreferencedImage): void;
|
|
38
|
+
load(): void;
|
|
39
|
+
setState(state: number): void;
|
|
40
|
+
private _rejectAll;
|
|
41
|
+
private _resolveAll;
|
|
42
|
+
loadAndResolve(extentToLoad: Extent, resolutionToLoad: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimProps: Record<string, string>): Promise<WMImage>;
|
|
43
|
+
}
|
|
44
|
+
export default TimeAwareImageWrapper;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Extent } from 'ol/extent';
|
|
2
|
+
import type ImageWrapper from 'ol/Image';
|
|
3
|
+
import type { Projection } from 'ol/proj';
|
|
4
|
+
import ImageSource from 'ol/source/Image';
|
|
5
|
+
import type { WMImage } from '@opengeoweb/webmap';
|
|
6
|
+
import TimeAwareImageWrapper from './TimeAwareImageWrapper';
|
|
7
|
+
export declare const initImageWrapper: () => TimeAwareImageWrapper;
|
|
8
|
+
interface TimeawareImageSourceOptions {
|
|
9
|
+
wmsUrl: string;
|
|
10
|
+
params?: Record<string, string>;
|
|
11
|
+
layerName: string;
|
|
12
|
+
layerId: string;
|
|
13
|
+
dimProps?: Record<string, string>;
|
|
14
|
+
styleName?: string | undefined;
|
|
15
|
+
timeStampsToPrefetch?: string[];
|
|
16
|
+
visible?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class TimeawareImageSource extends ImageSource {
|
|
19
|
+
private _wmsUrl;
|
|
20
|
+
private _extraWMSParams;
|
|
21
|
+
private _timeStampsToPrefetch;
|
|
22
|
+
private _prefetchWorkers;
|
|
23
|
+
private _lastRequestedExtent;
|
|
24
|
+
private _lastRequestedResolution;
|
|
25
|
+
private _lastRequestedPixelRatio;
|
|
26
|
+
private _lastRequestedProjection;
|
|
27
|
+
private _loadedExtent;
|
|
28
|
+
private _loadedResolution;
|
|
29
|
+
private _loadedPixelRatio;
|
|
30
|
+
private _loadedProjection;
|
|
31
|
+
private _previousPrefetchExtent;
|
|
32
|
+
private _dimProperties;
|
|
33
|
+
private _imWrapperEmptyButLoading;
|
|
34
|
+
private _imWrapperForOlSource;
|
|
35
|
+
private _imWrapperForAltImage;
|
|
36
|
+
private _styleName;
|
|
37
|
+
private _layerName;
|
|
38
|
+
private throttledPrefetch;
|
|
39
|
+
private throttledImageLoad;
|
|
40
|
+
private _layerId;
|
|
41
|
+
constructor({ wmsUrl, timeStampsToPrefetch, layerName, layerId, styleName, dimProps, params, visible, }: TimeawareImageSourceOptions);
|
|
42
|
+
private _conditionalPrefetch;
|
|
43
|
+
private _loadImagery;
|
|
44
|
+
private prefetch;
|
|
45
|
+
triggerPrefetch(): void;
|
|
46
|
+
cancelPrefetch(): void;
|
|
47
|
+
getImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection): ImageWrapper;
|
|
48
|
+
setDimProps(params: Record<string, string>): void;
|
|
49
|
+
/**
|
|
50
|
+
* Check if an image is available and loaded for requested date. Used for showlayerinfo to proceed.
|
|
51
|
+
* @param isoTime
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
hasImageLoadedForTimeValue(isoTime: string): boolean;
|
|
55
|
+
getAltGeoReferencedImages(isoTime: string): WMImage[];
|
|
56
|
+
/**
|
|
57
|
+
* This function can be used to determine if the animation can proceed to the next step.
|
|
58
|
+
* @param isoTime ISO8601 string formatat like `YYYY-MM-DDTHH:MM:SSZ`
|
|
59
|
+
* @returns Only specic case it returns false: when a image is available and is loading. That means we wait till it is loaded.
|
|
60
|
+
* This function returns true if an image is not available in the store. Or true if it is available and already loaded.
|
|
61
|
+
*/
|
|
62
|
+
isImageLoadingForTimestep(isoTime: string): boolean;
|
|
63
|
+
setImageForTimeValue(timeStampsToPrefetch: string): void;
|
|
64
|
+
setStyle(styleName: string): void;
|
|
65
|
+
setLayerName(layerName: string): void;
|
|
66
|
+
setTimeValuesValuesToPrefetch(timeStampsToPrefetch: string[]): void;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkerQueueJob } from '../types/WorkerQueue';
|
|
2
|
+
export declare class WorkerQueue {
|
|
3
|
+
maxConcurrency: number;
|
|
4
|
+
tasksInProcess: WorkerQueueJob[];
|
|
5
|
+
taskQueue: WorkerQueueJob[];
|
|
6
|
+
private disposed;
|
|
7
|
+
constructor(concurrency: number);
|
|
8
|
+
dispose(): void;
|
|
9
|
+
ensureWork(): void;
|
|
10
|
+
clearJobs(): void;
|
|
11
|
+
addJobs(work: WorkerQueueJob[]): void;
|
|
12
|
+
addJobsWithoutReorder(work: WorkerQueueJob[]): void;
|
|
13
|
+
private _startJob;
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const MAX_NUMBER_TO_PREFETCH = 200;
|
|
2
|
+
export declare const MAX_NUMBER_STEPS_IN_TIME_SLIDER_TO_PREFETCH = 10000;
|
|
3
|
+
export declare const NUMBER_PREFETCH_WORKERS = 4;
|
|
4
|
+
export declare const ENABLE_PREFETCH = true;
|
|
5
|
+
export declare const ADD_SHOW_DIMS_OPTION = false;
|
|
6
|
+
export declare const NUM_IMAGES_TO_CACHE = 10000;
|
|
7
|
+
export declare const WMS_EXTENT_RATIO_TO_VIEWPORT = 1.2;
|
|
8
|
+
export declare const TIMEAWAREIMAGEWRAPPER_IMAGEDIDNOTLOADSUCCESFULLY = "Image did not load succesfully";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { WMJSDimension, Dimension, WMLayer } from '@opengeoweb/webmap';
|
|
2
|
+
import type { Timespan } from '../types/Timespan';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param wmTimeDim WMDimension time containing dimension values
|
|
6
|
+
* @param stepsToCheck Array with timestamps as posix timestamps to check
|
|
7
|
+
* @param isAnimating If the application is running an animation loop
|
|
8
|
+
* @returns A string list with ISO8601 values to fetch
|
|
9
|
+
*/
|
|
10
|
+
export declare const makeDimValuesToPrefetch: (wmTimeDim: WMJSDimension, stepsToCheck: number[], isAnimating: boolean) => string[];
|
|
11
|
+
export declare const extendPrefetchListWithModelRunTimeSteps: (wmLayer: WMLayer, stepsToCheck: number[]) => number[];
|
|
12
|
+
/**
|
|
13
|
+
* We use the WMLayer dimension logic to obtain the dimension value to use in the WMS GetMap request. The input is the dimensions array which is typically the properties set for the layer component.
|
|
14
|
+
* The input time is descretized to the closest value which is available in the WMS layer.
|
|
15
|
+
*
|
|
16
|
+
* @param dimensions Array of dimension key/values to use as input
|
|
17
|
+
* @param wmLayer The layer for which we would like to do the request
|
|
18
|
+
* @returns A map which returns a key/value to use
|
|
19
|
+
*/
|
|
20
|
+
export declare const getDimensionParamsForWMS: (dimensions: Dimension[], wmLayer: WMLayer | null) => Record<string, string> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Calculates number of timesteps for given timespan
|
|
23
|
+
* @param timespan Object of Timespan, with start/stop/end in milliseconds
|
|
24
|
+
* @returns Timestams array in milliseconds
|
|
25
|
+
*/
|
|
26
|
+
export declare const makeTimeList: ((timespan: Timespan) => number[]) & import("lodash").MemoizedFunction;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LayerProps } from '@opengeoweb/webmap';
|
|
2
|
+
export declare const initializeOpenLayersProjections: () => void;
|
|
3
|
+
/**
|
|
4
|
+
* Returns a preferred projection to use with a particular layer. It will search the layer props for
|
|
5
|
+
* a supported srs that either matches the current view srs or an srs that geoweb has reprojection math
|
|
6
|
+
* for. The first priority is the view srs and then any of the other supported srs. If no shared SRS
|
|
7
|
+
* is found, the function will return EPSG:3857 since that is almost always supported. There may be
|
|
8
|
+
* layers for which we do not have LayerProps for (for example layers not visible in a GetCapabilities
|
|
9
|
+
* document for a service) and thus defaulting to EPSG:3857 makes sense.
|
|
10
|
+
*
|
|
11
|
+
* @param viewSrs
|
|
12
|
+
* @param layerProps
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const selectPreferredWMSProjection: (viewSrs: string, layerProps: LayerProps | null) => string;
|
|
16
|
+
export declare const useProjection: () => string | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Feature } from 'ol';
|
|
2
|
+
import type { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
export interface HoverSelect {
|
|
4
|
+
onHover?: (f: Feature | undefined) => void;
|
|
5
|
+
active: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ClickOnFeature {
|
|
8
|
+
onClick: (f: Feature[], isShiftClick?: boolean) => void;
|
|
9
|
+
hitTolerance?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface BoxSelect {
|
|
12
|
+
onBoxSelect: (features: Feature[], addToSelection: boolean) => void;
|
|
13
|
+
active: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface OnInitializeLayerProps {
|
|
16
|
+
layerId: string;
|
|
17
|
+
style: string;
|
|
18
|
+
dimensions: Dimension[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FeatureCollection, Geometry, GeoJsonProperties } from 'geojson';
|
|
2
|
+
import { View } from 'ol';
|
|
3
|
+
import type { Bbox } from '@opengeoweb/webmap';
|
|
4
|
+
export declare const setViewFromExtent: (view: View, bbox: Bbox) => void;
|
|
5
|
+
export declare const setViewFromFeature: (view: View, geojsonFeature: FeatureCollection<Geometry, GeoJsonProperties> | undefined) => void;
|
|
6
|
+
export declare const makeView: (projectionCode?: string) => View;
|
|
7
|
+
export declare const viewUtils: {
|
|
8
|
+
setViewFromExtent: (view: View, bbox: Bbox) => void;
|
|
9
|
+
setViewFromFeature: (view: View, geojsonFeature: FeatureCollection<Geometry, GeoJsonProperties> | undefined) => void;
|
|
10
|
+
makeView: (projectionCode?: string) => View;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Providers';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum TimeMode {
|
|
3
|
+
YEAR = 0,
|
|
4
|
+
MONTH = 1,
|
|
5
|
+
DAY = 2,
|
|
6
|
+
HOUR = 3,
|
|
7
|
+
MINUTE = 4,
|
|
8
|
+
SECOND = 5
|
|
9
|
+
}
|
|
10
|
+
interface WMSDimTimeYearSelectorProps {
|
|
11
|
+
selectedISOTime: string;
|
|
12
|
+
layerId: string;
|
|
13
|
+
onSelectTime: (time: string) => void;
|
|
14
|
+
mode: TimeMode;
|
|
15
|
+
}
|
|
16
|
+
export declare const increaseTime: (selectedISOTime: string, timeRes: string) => string;
|
|
17
|
+
declare const WMSDimTimeYearSelector: ({ selectedISOTime, layerId, onSelectTime, mode, }: WMSDimTimeYearSelectorProps) => React.ReactElement<WMSDimTimeYearSelectorProps> | null;
|
|
18
|
+
export default WMSDimTimeYearSelector;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LayerProps, LayerFoundation } from '@opengeoweb/webmap';
|
|
3
|
+
interface WMSLayerSelectorProps {
|
|
4
|
+
layer: LayerFoundation;
|
|
5
|
+
layers: LayerProps[];
|
|
6
|
+
onSelectLayer: (layer: LayerProps) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const WMSLayerSelector: ({ layer, layers, onSelectLayer, }: WMSLayerSelectorProps) => React.ReactElement<WMSLayerSelectorProps>;
|
|
9
|
+
export default WMSLayerSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LayerFoundation } from '@opengeoweb/webmap';
|
|
3
|
+
interface WMSStyleSelectorProps {
|
|
4
|
+
layer: LayerFoundation;
|
|
5
|
+
onSelectStyle: (layer: LayerFoundation) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const WMSStyleSelector: ({ layer, onSelectStyle, }: WMSStyleSelectorProps) => React.ReactElement<WMSStyleSelectorProps> | null;
|
|
8
|
+
export default WMSStyleSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface WMSTimeSliderProps {
|
|
3
|
+
selectedISOTime: string;
|
|
4
|
+
layerId: string;
|
|
5
|
+
onSelectTime: (time: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const WMSTimeSlider: ({ selectedISOTime, layerId, onSelectTime, }: WMSTimeSliderProps) => React.ReactElement<WMSTimeSliderProps> | null;
|
|
8
|
+
export default WMSTimeSlider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './Legend';
|
|
2
|
+
export * from './MapTime';
|
|
3
|
+
export * from './MapControls';
|
|
4
|
+
export * from './MapWarning';
|
|
5
|
+
export * from './MapDimensionSelect';
|
|
6
|
+
export * from './LayerInfo';
|
|
7
|
+
export * from './OpenLayers';
|
|
8
|
+
export * from './MapMeasure';
|
|
9
|
+
export * from './Clock';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Coverage, CoverageCollection, EDRInstance, PointDomain, PointSeriesDomain } from '@opengeoweb/shared';
|
|
2
|
+
export declare const handleResponse: (response: Response) => Promise<unknown>;
|
|
3
|
+
export declare const joinUrlParams: (params: string[]) => string;
|
|
4
|
+
export declare const fetchEDRCollectionDetails: (edrBaseUrlWithCollection: string, instanceId?: string) => Promise<EDRInstance>;
|
|
5
|
+
export declare const fetchEDRCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain>>;
|
|
6
|
+
export declare const fetchEDRArea: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, coords?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain>>;
|
|
7
|
+
export declare const fetchEDRParameter: (collection: EDRInstance | undefined, edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain> | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ColorMap = string[];
|
|
2
|
+
export declare const temperatureLegendColorsWoW: ColorMap;
|
|
3
|
+
export declare const precipitationMMLegendColorsWoW: ColorMap;
|
|
4
|
+
export declare const temperatureLegendColorsCWK: ColorMap;
|
|
5
|
+
export declare const colorMaps: {
|
|
6
|
+
temperatureLegendColorsWoW: ColorMap;
|
|
7
|
+
precipitationMMLegendColorsWoW: ColorMap;
|
|
8
|
+
temperatureLegendColorsCWK: ColorMap;
|
|
9
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { FeatureLike } from 'ol/Feature';
|
|
2
|
+
import { Circle, Style } from 'ol/style';
|
|
3
|
+
import type { ColorMap } from './colormaps';
|
|
4
|
+
export interface EdrMapLegendEntry {
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
color: string;
|
|
8
|
+
image: Circle;
|
|
9
|
+
}
|
|
10
|
+
export interface EdrOlColorLegend {
|
|
11
|
+
legend: EdrMapLegendEntry[];
|
|
12
|
+
}
|
|
13
|
+
export declare const makeLegendFromStyleName: (styleName: string) => EdrOlColorLegend | null;
|
|
14
|
+
export declare const makeLegendFromColorMap: (props: {
|
|
15
|
+
colors: ColorMap;
|
|
16
|
+
min: number;
|
|
17
|
+
max: number;
|
|
18
|
+
}) => EdrOlColorLegend;
|
|
19
|
+
export declare const generateImageFromLegend: (edrColorLegend: EdrOlColorLegend, ctx: CanvasRenderingContext2D, opacity?: number) => number;
|
|
20
|
+
export declare const getLegendClass: (edrColorLegend: EdrOlColorLegend, value: number, clip?: boolean) => EdrMapLegendEntry | undefined;
|
|
21
|
+
export declare const makeFeatureStyleWind: (feature: FeatureLike) => Style[];
|
|
22
|
+
export declare const makeFeatureStyleMultiParam: (feature: FeatureLike) => Style[];
|
|
23
|
+
export declare const makeFeatureStyleMultiParamLoading: () => Style;
|
|
24
|
+
export declare const makeFeatureStyleDisc: (feature: FeatureLike, legend: EdrOlColorLegend) => Style;
|
|
25
|
+
export declare const makeFeatureStyleLoading: (feature: FeatureLike) => Style;
|
|
26
|
+
export declare const styleNameToStyleLike: ((styleName: string, multiParam?: boolean) => ((feature: FeatureLike) => Style | Style[])) & import("lodash").MemoizedFunction;
|
|
27
|
+
export declare const defaultEdrStyles: {
|
|
28
|
+
name: string;
|
|
29
|
+
title: string;
|
|
30
|
+
abstract: string;
|
|
31
|
+
legendURL: string;
|
|
32
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fakeEdrLayerApiHandlers: import("msw").HttpHandler[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { EDRInstance } from '@opengeoweb/shared';
|
|
3
|
+
export declare const webmapEDRQueryOptions: {
|
|
4
|
+
readonly getCollectionDetailsQuery: (edrBaseUrlWithCollection: string, enabled: boolean, instanceId?: string) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<EDRInstance, Error, EDRInstance, string[]>, "queryFn"> & {
|
|
5
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<EDRInstance, string[], never> | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
queryKey: string[] & {
|
|
8
|
+
[dataTagSymbol]: EDRInstance;
|
|
9
|
+
[dataTagErrorSymbol]: Error;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const useEDRGetCollectionDetails: (edrBaseUrlWithCollection: string, instanceId?: string, enabled?: boolean) => UseQueryResult<EDRInstance>;
|
|
14
|
+
export declare const useEDRGetParameterData: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string) => UseQueryResult<GeoJSON.FeatureCollection | undefined>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Coverage, CoverageCollection, PointDomain, PointSeriesDomain } from '@opengeoweb/shared';
|
|
2
|
+
export declare const coverageCollectionToFeatureCollection: (cov: CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain> | undefined, parameterNames: string) => GeoJSON.FeatureCollection;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WMLayer } from '@opengeoweb/webmap';
|
|
2
|
+
import type { OnInitializeLayerProps } from '../../components/OpenLayers/utils/types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns WMLayer instance in EDR mode. The layer will contains parsed dimensions and styles and keeps a state for these properties.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} serviceUrl
|
|
7
|
+
* @param {string} name
|
|
8
|
+
* @returns {(WMLayer | null)}
|
|
9
|
+
*/
|
|
10
|
+
export declare const useCreateEDRWMLayer: (serviceUrl: string, name: string, id?: string, onLayerError?: (layerId: string, message: string) => void) => WMLayer | null;
|
|
11
|
+
export declare const useEDRWMLayer: (edrBaseUrl: string, parameter: string, layerId?: string, onInitializeLayer?: (payload: OnInitializeLayerProps) => void) => WMLayer | null;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Geometry } from 'geojson';
|
|
2
|
+
import type { LayerProps } from '@opengeoweb/webmap';
|
|
3
|
+
interface Properties {
|
|
4
|
+
datetime: string | null;
|
|
5
|
+
'proj:wkt2'?: string;
|
|
6
|
+
}
|
|
7
|
+
interface STACAsset {
|
|
8
|
+
href: string;
|
|
9
|
+
type: string;
|
|
10
|
+
created: string;
|
|
11
|
+
}
|
|
12
|
+
export interface STACExtent {
|
|
13
|
+
spatial?: {
|
|
14
|
+
bbox?: number[][];
|
|
15
|
+
};
|
|
16
|
+
temporal?: {
|
|
17
|
+
interval?: (string | null)[][];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface STACLink {
|
|
21
|
+
href: string;
|
|
22
|
+
rel: string;
|
|
23
|
+
}
|
|
24
|
+
export interface STACItem {
|
|
25
|
+
type: 'Feature';
|
|
26
|
+
stac_version: string;
|
|
27
|
+
id: string;
|
|
28
|
+
geometry: Geometry | null;
|
|
29
|
+
bbox: number[];
|
|
30
|
+
properties: Properties;
|
|
31
|
+
links: STACLink[];
|
|
32
|
+
assets: Record<string, STACAsset>;
|
|
33
|
+
}
|
|
34
|
+
export type STACColormapEntry = [number, number, number, number];
|
|
35
|
+
export interface STACRenderEntry {
|
|
36
|
+
title?: string;
|
|
37
|
+
assets: string[];
|
|
38
|
+
rescale?: number[][];
|
|
39
|
+
colormap?: Record<string, STACColormapEntry>;
|
|
40
|
+
}
|
|
41
|
+
export interface STACCollection {
|
|
42
|
+
type: 'Collection';
|
|
43
|
+
stac_version: string;
|
|
44
|
+
id: string;
|
|
45
|
+
description: string;
|
|
46
|
+
license: string;
|
|
47
|
+
keywords?: string[];
|
|
48
|
+
properties?: Record<string, unknown>;
|
|
49
|
+
extent: STACExtent;
|
|
50
|
+
links: STACLink[];
|
|
51
|
+
features: STACItem[];
|
|
52
|
+
renders?: Record<string, STACRenderEntry>;
|
|
53
|
+
}
|
|
54
|
+
export declare const STAC_ITEM_PAGE_LIMIT = 1000;
|
|
55
|
+
export declare const STAC_TEMPORAL_STEP_SAMPLE_LIMIT = 11;
|
|
56
|
+
export declare const getStacItemsUrl: (stacBaseUrlWithCollection: string, startDate?: string, endDate?: string) => string;
|
|
57
|
+
export declare const fetchStacCollection: (stacBaseUrlWithCollection: string) => Promise<STACCollection>;
|
|
58
|
+
export declare const fetchStacItem: (stacItemUrl: string) => Promise<STACItem>;
|
|
59
|
+
export declare const fetchStacItems: (collectionUrl: string) => Promise<STACItem[]>;
|
|
60
|
+
export declare const fetchStacItemsPage: (baseUrl: string, itemLimit?: number, offset?: number) => Promise<STACItem[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Fetches STAC items with pagination support to handle cases where results exceed limit.
|
|
63
|
+
* Uses STAC next links when available, otherwise falls back to offset pagination
|
|
64
|
+
* until a page returns fewer items than the limit.
|
|
65
|
+
*
|
|
66
|
+
* @param baseUrl - Base URL with collection and query params (without offset/limit)
|
|
67
|
+
* @param itemLimit - Max items per page (default: 1000)
|
|
68
|
+
* @returns Array of all fetched STAC items
|
|
69
|
+
*/
|
|
70
|
+
export declare const fetchStacItemsWithPagination: (baseUrl: string, itemLimit?: number) => Promise<STACItem[]>;
|
|
71
|
+
export interface STACCatalogCollection {
|
|
72
|
+
id: string;
|
|
73
|
+
title?: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
extent?: STACExtent;
|
|
76
|
+
keywords?: string[];
|
|
77
|
+
links: STACLink[];
|
|
78
|
+
renders?: Record<string, STACRenderEntry>;
|
|
79
|
+
}
|
|
80
|
+
export interface STACCatalogRoot {
|
|
81
|
+
type?: string;
|
|
82
|
+
stac_version?: string;
|
|
83
|
+
id?: string;
|
|
84
|
+
title?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
links: STACLink[];
|
|
87
|
+
conformsTo?: string[];
|
|
88
|
+
}
|
|
89
|
+
export declare const fetchStacCatalogRoot: (url: string) => Promise<STACCatalogRoot>;
|
|
90
|
+
export declare const fetchStacCatalogCollections: (baseUrl: string) => Promise<STACCatalogCollection[]>;
|
|
91
|
+
export declare const stacCatalogCollectionToLayerProps: (collection: STACCatalogCollection) => LayerProps;
|
|
92
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fakeStacApiHandlers: import("msw").HttpHandler[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { STACCollection, STACItem } from './api';
|
|
3
|
+
export declare const useStacCollection: (stacBaseUrlWithCollection: string, instanceId?: string, enabled?: boolean) => UseQueryResult<STACCollection, Error>;
|
|
4
|
+
export declare const useStacItems: (stacBaseUrlWithCollection: string, startDate?: string, endDate?: string) => UseQueryResult<STACItem[], Error>;
|
|
5
|
+
export declare const useStacTemporalStepItems: (stacBaseUrlWithCollection: string, startDate?: string, endDate?: string, enabled?: boolean) => UseQueryResult<STACItem[], Error>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Style } from '@opengeoweb/webmap';
|
|
2
|
+
import type { STACColormapEntry, STACRenderEntry } from '../api';
|
|
3
|
+
/**
|
|
4
|
+
* Converts a STAC render extension colormap to an OpenLayers WebGLTile palette style.
|
|
5
|
+
*
|
|
6
|
+
* The STAC colormap maps pixel values (0–255) to RGBA arrays where each channel is 0–255.
|
|
7
|
+
* The returned object is suitable for use as the `style` option of `ol/layer/WebGLTile`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const stacColormapToOlStyle: (colormap: Record<string, STACColormapEntry>) => object;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a grayscale WebGLTile style where band-1 value maps from black (0)
|
|
12
|
+
* to white (255). Used as a safe default when no STAC render colormap exists.
|
|
13
|
+
*/
|
|
14
|
+
export declare const stacGrayscaleOlStyle: () => object;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a grayscale style for normalized GeoTIFF samples where `['band', 1]`
|
|
17
|
+
* is expected in [0, 1]. This avoids white-only output when raw data range is
|
|
18
|
+
* not strictly 0-255.
|
|
19
|
+
*/
|
|
20
|
+
export declare const stacNormalizedGrayscaleOlStyle: () => object;
|
|
21
|
+
/**
|
|
22
|
+
* Converts a STAC render extension `renders` map to an array of `Style` objects
|
|
23
|
+
* compatible with the Layer Manager style selector.
|
|
24
|
+
*/
|
|
25
|
+
export declare const getRendersAsStyles: (renders: Record<string, STACRenderEntry>) => Style[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { STACCollection, STACItem } from '../api';
|
|
2
|
+
/**
|
|
3
|
+
* Infers the temporal step (time resolution) from STAC collection metadata and items.
|
|
4
|
+
* Attempts multiple strategies:
|
|
5
|
+
* 1. Look for 'temporal-resolution' in collection properties
|
|
6
|
+
* 2. Calculate from actual item timestamps
|
|
7
|
+
* 3. Fall back to PT1H if unable to determine
|
|
8
|
+
*
|
|
9
|
+
* @param collection - STAC collection with metadata and items
|
|
10
|
+
* @returns ISO 8601 duration string (e.g., 'PT5M', 'PT1H', 'P1D')
|
|
11
|
+
*/
|
|
12
|
+
export declare const inferTemporalStep: (collection: STACCollection | undefined, items?: STACItem[]) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Converts milliseconds to ISO 8601 duration string
|
|
15
|
+
* @param ms - Duration in milliseconds
|
|
16
|
+
* @returns ISO 8601 duration string
|
|
17
|
+
*/
|
|
18
|
+
export declare const millisecondsToISO8601Duration: (ms: number) => string;
|