nens / lizard-catalogue

Lizard Catalogue
https://demo.lizard.net/catalogue/
0 stars 0 forks source link

Export rasters - configure what value the "no data" value has. #287

Closed Derryrover closed 2 years ago

Derryrover commented 3 years ago

When exporting raster tiffs the backend now supports that you can choose the value of your "no-data" value. https://github.com/nens/lizard-nxt/issues/3621

In the catalog you should also be able to choose the value of your "no-data" value.

For example

If the user chooses as "no data value" the value "-9999" (often used for 3di), then all empty values in the raster will have the value -9999.

Derryrover commented 3 years ago

@lexvand @joeriverheijden

FYI: I made this ticket. Please move to the correct sprint, release and epic.

lexvand commented 3 years ago

@hoanphungt Be aware: The backend checks if the input nodata corresponds with the data type of the raster. Integer stores should get an integer nodata (within the data range) and same goes for float. The API will return a 40x error when it doesn't match. I guess there is no way to prevent bad input clientside, so focus on handling these errors correctly.

hoanphungt commented 3 years ago

@Derryrover Hi Tom,

Could you review the connected PR?

Kr, Hoan

Derryrover commented 3 years ago

@hoanphungt

Hi Hoan, Looks good. I think it is a bit hard to make this into something perfect, but I think this solution is good enough. kr Tom

lexvand commented 2 years ago

Tested on staging. It all works: