Pakillo/CityShadeMapper

Postprocess shade map to obtain shade at street level

Pakillo opened this issue · 5 comments

Remove pixels occupied by buildings. Probably water too
That is, leave pixels that are outdoors (streets, open spaces), either vegetated or not, to calculate shade statistics across districts, etc
We can do this using lidar points classes (see #2 (comment))
Vegetation <1m should probably be discarded

We could use OSM features (https://wiki.openstreetmap.org/wiki/Map_features) obtained with osmdata package to filter pixels that are streets, squares, cycleways, etc (ie open spaces where people can walk). That's where we want to calculate amount of shade by now

As rayshader gives shading on top of tree canopies, not below, we will probably have to assume that all pixels below high structures (trees, etc) are also shaded. That is, if the illuminated pixel is > 2m high, assume it will be shaded at ground level. (this would not be true if the structure is high above the ground and the sun elevation is low, so that rays pass below the structure. So not to worrying at first)

Regarding the amount of shading assigned to pixels below high structures (trees, etc), we could assign the higher shade value in the pixels just nearby the focal pixel.

Use lidR::normalize_height to obtain heights above gound level. If height > 1m, there's some object above ground, hence shade intensity at ground level must be assigned a posteriori

Ok now we can detect when there's some object above the surface projecting some shade onto the ground.

But how much to decrease light intensity in that pixel, ie to simulate shade at the ground level below the tree canopy?

Two quick ideas by now:

  • Take the maximum value from nearby pixels and substract the amount of rays intercepted vertically by the tree canopy? (just 1? more than 1? How many rays is ray_shade using??)

  • Divide each pixel into 3x3 subpixels, run ray_shade, get light at central [2,2] pixel and substract the canopy interception (isn't that same as above? But much more computationally intensive...)

Illumination below vegetation has been fixed to 5% by now (see

shademap.canopy[cover.ras == 4] <- 05 # fixed value by now
)