mapbox-gl-shadow-simulator
mapbox-gl-shadow-simulator copied to clipboard
sun exposure during polar day is always 12 hours
ShadeMap should be finding 24 hours' sun on higher elevations and less on south facing aspects. Instead, a flat 12 hours is returned. Easy repro here, for example. I get 120 for saved GeoTIFF cell values, consistent with the sun exposure mouseover but inconsistent with the shademap. The shadows with the sun in the north look reasonably correct for the topography at this site.
ShadeMap does find zero hours' sun exposure during polar night. However, the hovertext consistently said 0.3 hours the first time I flipped the render from summer to winter solstice. This cleared after zooming and repeatedly flipping between solstices consistently gives zero and 12 hours.
Another repro is here and the behavior's the same along the Arctic Cordillera in the Canadian high arctic. If one isn't already present it probably wouldn't be a bad idea to include an Antarctic site in the sun exposure unit tests as well.