rafaqz / Rasters.jl

Raster manipulation for the Julia language
MIT License
209 stars 36 forks source link

fix extract `missing` from a `Raster` #691

Closed tiemvanderdeure closed 2 months ago

tiemvanderdeure commented 3 months ago

Yet another fix for extract.

This fixes a bug that occurs when extracting from a Raster, the value extracted is missing, and skipmissing = true. Since we were mapping over extracted values to determine whether or not to throw them out, this throws an error in this case, as we cannot map over missing.

We had a test for this (a Raster with a cell with value missing), but didn't actually extract from that cell, which I now also fixed :).