5

I got a similar problem as described here: Using multiple line fill patterns with common base point in QGIS

I want two layers with the same symbology to overlap seamlessly. However, it looks like this:

enter image description here

However, in my case, the symbologies are on two or more different layers, so a geometry-generator doesn't seem to do the trick.

Any suggestions?

3
  • 2
    The cartographer asks "why on Earth would you wanna do that?!".
    – Erik
    Commented Jul 16, 2021 at 9:14
  • 2
    You can use a geometry generator that adds a common point to all geometries, so all patterns have the same origin: union($geometry, make_point(-180,-90)). The coordinates used in make_point need to be to the south west of all of your features.
    – Jake
    Commented Jul 16, 2021 at 9:32
  • @jake: Thank you! That was it! :)
    – Propeller
    Commented Jul 16, 2021 at 9:48

2 Answers 2

3

I did solve it with the solution from @jake:

You can use a geometry generator that adds a common point to all geometries, so all patterns have the same origin: union($geometry, make_point(-180,-90)). The coordinates used in make_point() need to be to the south west of all of your features.

2

You can aggregate the geometries of each layer and than combine them using collect_geometries(). The final expression could look like this - replace 'poly1', 'poly2' etc. with the names of your polygon layers:

collect_geometries( 
    aggregate('poly1', 'collect', $geometry),
    aggregate('poly2', 'collect', $geometry),
    aggregate('poly3', 'collect', $geometry)
)

Screenshot 1: original polygons (3 layers): enter image description here

Screenshot 2: the collected polygons with a common line-pattern: enter image description here

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.