-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
023b92d
commit a2c4c66
Showing
11 changed files
with
68 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { GetResourceResponse, RequestParameters } from 'maplibre-gl'; | ||
import { TileJSON } from '@/types'; | ||
import { TileJSON } from './types'; | ||
export declare const TILE_SIZE = 256; | ||
declare const cogProtocol: (params: RequestParameters) => Promise<GetResourceResponse<TileJSON | ImageBitmap>>; | ||
export default cogProtocol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import cogProtocol from '@/cogProtocol'; | ||
import { colorScale, colorSchemeNames } from '@/render/colorScale'; | ||
import locationValues from '@/read/locationValues'; | ||
import cogProtocol from './cogProtocol'; | ||
import { colorScale, colorSchemeNames } from './render/colorScale'; | ||
import locationValues from './read/locationValues'; | ||
export { cogProtocol, colorScale, colorSchemeNames, locationValues }; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Location } from '@/types'; | ||
import { Location } from '../types'; | ||
declare const locationValues: (url: string, { latitude, longitude }: Location, zoom?: number) => Promise<Array<number>>; | ||
export default locationValues; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { CogMetadata, ImageRenderer } from '@/types'; | ||
import { CogMetadata, ImageRenderer } from '../types'; | ||
type Options = CogMetadata; | ||
declare const renderTerrain: ImageRenderer<Options>; | ||
export default renderTerrain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
export type TileJSON = { | ||
tilejson: '2.2.0'; | ||
tiles: Array<string>; | ||
name?: string; | ||
description?: string; | ||
version?: string; | ||
attribution?: string; | ||
template?: string; | ||
legend?: string; | ||
scheme?: string; | ||
grids?: Array<string>; | ||
data?: Array<string>; | ||
minzoom: number; | ||
maxzoom: number; | ||
bounds?: Array<number>; | ||
center?: Array<number>; | ||
}; | ||
export type TileIndex = { | ||
z: number; | ||
x: number; | ||
y: number; | ||
}; | ||
export type Bbox = [number, number, number, number]; | ||
export type CogMetadata = { | ||
offset: number; | ||
scale: number; | ||
noData?: number; | ||
photometricInterpretation?: number; | ||
bitsPerSample?: Array<number>; | ||
colorMap?: Array<number>; | ||
artist?: string; | ||
bbox?: Bbox; | ||
images: Array<ImageMetadata>; | ||
}; | ||
export type ImageMetadata = { | ||
zoom: number; | ||
isOverview: boolean; | ||
isMask: boolean; | ||
}; | ||
export type TypedArray = Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array; | ||
export type ImageRenderer<T extends object> = (data: TypedArray[], options: T) => Uint8ClampedArray; | ||
export type Location = { | ||
latitude: number; | ||
longitude: number; | ||
}; | ||
export type LatLonZoom = { | ||
latitude: number; | ||
longitude: number; | ||
zoom: number; | ||
}; | ||
export type TilePixel = { | ||
tileIndex: TileIndex; | ||
row: number; | ||
column: number; | ||
}; |