Skip to content

float16 as a supported datatype #3436

@snowman2

Description

@snowman2

Discussed in #3106

Originally posted by MaxLenormand June 21, 2024
Hey!

I've been tinkering around with trying to reduce file size of height & elevation data, and was wondering about the value (or not) of adding support for float16 in rasterio.

Reasoning for this:

  • Most height rasters are in meters. This means that realistically, on Earth, values will be between, taking at max: 9000 (Everest) and -13000 if we go underwater, to Marianna trench.
  • For most applications, the accuracy of any measurements would be pushing it to go beyond millimetres, i.e. 10^-3

This looks like float16 would be a dtype data fit for this type of raster. Benefits being able to store the same amount of information practically speaking as a float32 raster, but for a much smaller file.

I was surprised to see float16 not being implemented in rasterio actually, so am I missing something here? I also haven't found previous discussion about this hence why I'm opening this post

Genuinely curious!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions