2

I'm having unexpected results using geometry generator with the following expression:

 buffer(collect($geometry),0)

…which was an answer given in this topic. I have used this previously with the expected result, but now something is strange. It appears that the geometry is being collected (and buffered) not once, but over and over—see the attached screencast.enter image description here It's not infinite; it will do this about 20-25 times and then stop.

I can't tell which part of the function is the problem. If I just call collect($geometry), I'll get the same result (but rendered faster as it's not buffering). If I just call buffer($geometry, 0), then it renders some features only once, and others a varying multiple of times (see screenshot).enter image description here

I'm sure it's data related because it doesn't happen on all layers. What can I look for that would cause this multiple rendering?

  • What happens if you use a very small, non-zero buffer? – csk Jan 15 at 19:49
  • Same result, but with a small, non-zero buffer applied. – Nathan Jan 17 at 18:42
  • Did you check for invalid geometries? – csk Jan 17 at 19:50
  • Yes, valid geometries are required under digitizing settings. – Nathan Jan 18 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.