1

For shading analysis I buffer my objects (buildings, trees, etc. They are polygons) with a 40 m buffer.

Since in the northern hemispehre the sun is never shinning from the north I thought about a buffer without the southern part i.e. maybe just 200° (east, south and west)

So instead of this:

enter image description here

rather something like that:

enter image description here

There is no shade in southern area of the polygon because the sun is never shining from the north.

How to do this?

7
  • Shadows tend to fall in the direction opposite of the sun. So... maybe flip your shadows around.
    – Erik
    Sep 4, 2022 at 13:50
  • yeah, you are right of course!
    – BAE_23
    Sep 4, 2022 at 14:02
  • There are specialized tools for such tasks . Did you habe a Look what Grass offers?
    – Babel
    Sep 4, 2022 at 14:17
  • not yet. no experience with GIS outside of QGIS. But I will look it up
    – BAE_23
    Sep 4, 2022 at 14:26
  • Grass tools are available inside QGIS
    – Babel
    Sep 4, 2022 at 14:47

2 Answers 2

2

With QGIS expressions, you can achieve that (change buffer distance 100 and 300 and degrees 0 and 200 to fit your use case):

intersection (
    buffer ($geometry, 100),
    wedge_buffer( 
        centroid ($geometry),
        0,
        200,
        300
    )
)

A regular buffer (light blue) around the buildings (yellow) is intersected with a wedge buffer (light red) to produce the result you're looking for: dark blue buffer polygons: enter image description here

0

A better approach then a 200 degrees buffer would be:

  1. Create a horizontal line in the south
  2. Determine the surface of the buildings oriented towards this line (towards south), creating a polygon from the south line to the westmost and the easternmost points of the building
  3. Create the intersection of this polygon with a buffer around your buildings.

Black line = south line (step 1); blue: polygon (step 2), red: intersection = the solution (step 3): enter image description here

You can achieve that using QGIS expressions:

with_variable (
    'south',
    geometry (get_feature_by_id ('south', 1)),
    difference (
        intersection (
            buffer ($geometry, 30),
            make_polygon ( 
                make_line (
                    closest_point (
                        $geometry,
                        extend (
                            make_line (
                                closest_point(
                                    @south,
                                    make_point (
                                        x_max (bounds ($geometry)), 
                                        y_min( bounds( $geometry))
                                    )
                                ),
                                make_point (
                                    x_max (bounds( $geometry)), 
                                    y_min (bounds( $geometry))
                                )
                            ),
                            0,
                            1000
                        )
                    ),
                    closest_point(
                        $geometry,
                        extend (
                            make_line (
                                closest_point(
                                    @south,
                                    make_point (
                                        x_min (bounds( $geometry)), 
                                        y_min (bounds( $geometry))
                                    )
                                ),
                                make_point (
                                    x_min (bounds( $geometry)), 
                                    y_min (bounds( $geometry))
                                )
                            ),
                            0,
                            1000
                        )
                    ), 
                    start_point (@south), 
                    end_point(@south)
                )
            )
        )
    ,
    $geometry
))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.