Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postprocess shade map to obtain shade at street level #8

Closed
Pakillo opened this issue May 6, 2022 · 5 comments
Closed

Postprocess shade map to obtain shade at street level #8

Pakillo opened this issue May 6, 2022 · 5 comments

Comments

@Pakillo
Copy link
Owner

Pakillo commented May 6, 2022

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

@Pakillo
Copy link
Owner Author

Pakillo commented May 13, 2022

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

@Pakillo
Copy link
Owner Author

Pakillo commented May 13, 2022

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.

@Pakillo
Copy link
Owner Author

Pakillo commented Jun 1, 2022

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

@Pakillo
Copy link
Owner Author

Pakillo commented Jun 8, 2022

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...)

@Pakillo
Copy link
Owner Author

Pakillo commented Oct 15, 2022

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

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

@Pakillo Pakillo closed this as completed Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant