We are working on a project where we want to make a route planner that takes into account the amount of sun on the route. The goal would be to calculate 'solar car' friendly routes. We are using PostGIS, because of the pgRouting extension for the route finding.
We have building polygons with a height attribute available. So far we have not been able to find PostGIS functions that could deal with calculating shadows.
How do you calculate polygon shadows in PostGIS?
Using PostGIS to generate building shades seem to be simply wrong (correct us if we're missing anything). The answer suggests extruding a 3D polyhedral from a 2D surface. That does not seem to generate a shadow. Only if you visualize it in 2D.
This is what we want as result (picture from H2GIS):