Geometry Generator - Line pattern fill to a buffer of x metres
Starting polygon:
Use the geometry generator to create a line that is the outside of the polygon with the area around the vertices removed.
difference( boundary( $geometry),buffer( nodes_to_points( $geometry),50))
Here's what the geometry generated line looks like with the default "simple line" style:
Add a symbol level with angled markers:
If the markers overlap, adjust the buffer distance in the geometry generator expression.
Add other symbol layers. Here's what it looks like with the "simple line" removed from the geometry generated symbol layer, and a simple fill polygon added as a bottom layer:
There is two way to get close to what you're looking for.
The first one is a symbol with three layer (bottom to top):
- original polygon
- line fill
- negative buffer (geom generator) to mask the line inside the original polygon
this solution let you create some nice effect, for example using a gradient going to transparent to let the line fade slowly...
The second one create a donuts and is only the result of a geometry generator with a two layer symbol (simple fill below, line fill on top)
None of these solution will give you the 45° angled line relative to your polygon border, I don't know how it could be done without looking bad at the corner
I hope the following screen grab are clear enough (I use a (negative) buffer size of 100 relative to my polygon, you'll have to adjust the value to your need)
buffer($geometry,-100)
1
2
difference($geometry,buffer($geometry,-100))