Skip to content

fix: skip inferRenderPipeline when user provides custom getTileData/renderTile#260

Open
james-willis wants to merge 1 commit intodevelopmentseed:mainfrom
james-willis:fix/skip-infer-render-pipeline-with-custom-props
Open

fix: skip inferRenderPipeline when user provides custom getTileData/renderTile#260
james-willis wants to merge 1 commit intodevelopmentseed:mainfrom
james-willis:fix/skip-infer-render-pipeline-with-custom-props

Conversation

@james-willis
Copy link

Summary

  • COGLayer._parseGeoTIFF() unconditionally calls inferRenderPipeline(), which throws for non-uint SampleFormat (e.g. Float32, Int), even when the user provides both getTileData and renderTile props
  • This change skips the call when both custom callbacks are provided, since the inferred defaults are unused in that case

Problem

When using COGLayer with a Float32 COG and custom getTileData/renderTile:

Inferring render pipeline for non-unsigned integers not yet supported. Found SampleFormat: 3,3,3,3,3

There's no workaround — the user has no way to use COGLayer with non-uint COGs, even with fully custom rendering.

Fix

Guard inferRenderPipeline() behind a check for user-provided props. No behavior change for the default case (when either callback is missing, inference still runs as before).

Fixes #257

@github-actions github-actions bot added the fix label Feb 23, 2026
@james-willis james-willis force-pushed the fix/skip-infer-render-pipeline-with-custom-props branch from 050d9b4 to fef2fa6 Compare February 23, 2026 19:34
…enderTile

inferRenderPipeline() only supports unsigned integer SampleFormats and
throws for Float32/Int COGs, even when the user provides both getTileData
and renderTile props (making the inferred defaults unused).

Fixes developmentseed#257
@james-willis james-willis force-pushed the fix/skip-infer-render-pipeline-with-custom-props branch from fef2fa6 to a8ad44a Compare February 23, 2026 19:37
@james-willis james-willis marked this pull request as ready for review February 23, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COGLayer: inferRenderPipeline called unconditionally, breaks custom getTileData/renderTile for non-uint COGs

1 participant