Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nodata values in the GeoTIFF headers for fill value #12846

Merged
merged 2 commits into from
Oct 1, 2021
Merged

Use nodata values in the GeoTIFF headers for fill value #12846

merged 2 commits into from
Oct 1, 2021

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Oct 1, 2021

We currently use the nodata value from a source config object when reading rasters with geotiff.js. If this config property is set, it is passed as the fillValue property to readRasters - so areas outside the image extent get filled with the user-configured nodata value.

We can make it easier to provide the appropriate fillValue by using the header-parsed nodata values. This means people shouldn't need to configure a source with nodata unless the value is not provided in the image headers.

See #12838 for some more detail.

Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @tschaub! I think it could make sense to add a note to the nodata documentation that the value from the geotiff metadata is used by default.

@tschaub tschaub enabled auto-merge October 1, 2021 19:50
@tschaub tschaub merged commit 243b21a into openlayers:main Oct 1, 2021
@tschaub tschaub deleted the extract-fill-values branch November 6, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants