diff --git a/src/composables/useSettings.ts b/src/composables/useSettings.ts index 042de79..c310d4b 100644 --- a/src/composables/useSettings.ts +++ b/src/composables/useSettings.ts @@ -166,9 +166,9 @@ export const get_global_pmtiles_url = (year: number) => { } export const AREA_OVERVIEW_COG = - 'https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/m-mohr/ftw-confidence-layers/prue_v1_field_area_500m_fieldsonly.tif' + 'https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/m-mohr/ftw-confidence-layers/prue_v1_field_area_500m_fieldsonly_uint8_3857.tif' export const CONFIDENCE_OVERVIEW_COG = - 'https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/m-mohr/ftw-confidence-layers/prue_v1_confidence_global.tif' + 'https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/m-mohr/ftw-confidence-layers/prue_v1_confidence_global_uint8_3857.tif' export default function useSettings() { return { diff --git a/src/layers/Global-Overview-Layers.ts b/src/layers/Global-Overview-Layers.ts index bd0e169..da4cf62 100644 --- a/src/layers/Global-Overview-Layers.ts +++ b/src/layers/Global-Overview-Layers.ts @@ -38,12 +38,16 @@ export const createGlobalOverviewLayer = (settings: Settings) => { source: new GeoTIFF({ sources: [ { - // todo: try https://tiles.rdnt.io/tiles/{z}/{x}/{y}@2x?url= url: settings.aggregate === 'confidence' ? CONFIDENCE_OVERVIEW_COG : AREA_OVERVIEW_COG, + nodata: 255, min: 0, - max: settings.aggregate === 'confidence' ? 1 : 2500, + max: 200, }, ], + interpolate: false, + sourceOptions: { + blockSize: 512 * 1024, // 512KB: capture all IFDs in 1-2 requests instead of 100+ + }, }), minZoom: 0, maxZoom: GLOBAL_DATA_MAP_FIELD_START_ZOOM_LEVEL,