2

I can't find anything on google or the QGIS changelog on this issue:

We're using a style for points which contains a point, a circle and an ellipse.

Point and circle (buffer($geometry,5,80)) work fine for everyone, but the ellipse (make_ellipse($geometry,15*2,15*1.5,135,80)) don't work for a colleague of mine, neither in QGIS 3.10 nor in 3.4.

Maybe the ellipse has different software dependencies or needs a setting enabled which I forgot about? Has someone an idea?

6
  • It should just work out of the box using the syntax you included in your question. How does it fail for you and your colleague? Do you get an error message in the expression editor?
    – Jake
    Commented Mar 26, 2020 at 8:27
  • It works for me, it just fails for him, as in "the ellipse simply isn't displayed w/o error message". Interestingly, this behaviour got "hardcoded" into the shapefiles he was working with - for those the ellipse didn't show for me also.
    – Erik
    Commented Mar 26, 2020 at 8:32
  • Perhaps there is something wrong with the geometry of that shapefile. Have you run the "Check validity" tool (in the "Vector"/"Geometry" menu)?
    – Jake
    Commented Mar 26, 2020 at 8:38
  • Nope, but since they're points and the circle is displayed, I think this highly unlikely.
    – Erik
    Commented Mar 26, 2020 at 8:45
  • Does the shapefile in question contain Multipoint features? In that case, buffer would work, but make_ellipse would not.
    – Jake
    Commented Mar 26, 2020 at 8:59

1 Answer 1

2

The make_ellipse function does not work on MultiPoint features, unlike the buffer function. To create ellipses, you first need to convert the MultiPoint layer to single points.

If your layer is MultiPoint but each feature actually only contains a single point, you can also use make_ellipse(start_point($geometry),15*2,15*1.5,135,80) to convert the features on the fly within your geometry generator.

1
  • That's a great hack, using start_point()to convert single-part multipoints to a single point.
    – she_weeds
    Commented Mar 26, 2020 at 12:51

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.