ted-piotrowski/mapbox-gl-shadow-simulator

sun exposure rasters sometimes contain cells with value 255

Closed this issue · 2 comments

Since 255 is 25.5 hours' sunlight, something's not right at these points. Since, so far at least, I've noticed 255s on northern aspects near winter solstice I'm guessing what's happening is no direct sunlight is getting reported using 255 as a no data value instead of being written as zero. Mouseover in the browser shows zero hours in these areas, so probably it's some type of data handling issue when marshalling to GeoTIFF.

Here's an example using Mount Rainier National Park.

If the diagnosis is correct it's not hard to work around this by setting 255 as a no data value and changing no data symbology to the zero hour color. Or just recalculating rasters to convert 255 to 0. But it'd be nice if such steps weren't needed.

The fix for this is now deployed. Thanks for catching this.

Just had a chance to check, looks good.