2

I have the range of azimuth defined in the data attribute table as you see below: enter image description here

And as a result, I want to have some visual section of the bearing, determined by the azimuth I and azimuth II values in my data attribute table.

Is it possible in QGIS?

2
  • Do you mean 'as depicted in the linked image' ?
    – Snaileater
    Jul 2 at 9:37
  • yes, i want something like shown in the image,
    – MKR
    Jul 2 at 9:44
7

You can use wedge_buffer() with Geometry generator or Geometry by expression and this expression:

wedge_buffer( 
    $geometry, 
    azimuth1+(azimuth2-azimuth1)/2,
    azimuth2-azimuth1,
    10000
)

To change the size (radius), adapt the number on the 2nd last line (here: 10000). See here for details.

When working with angles, be sure to use an appropriate CRS (one that preserves angles like Mercator projection) - see 2nd screenshot.

enter image description here

Difference between EPSG:4326 (blue) and EPSG:3857 (red), using the same expression:

enter image description here

2
  • Yes, it works. How to restrict it to a few kilometers instead of a whole globe? The range is endless now.
    – MKR
    Jul 2 at 9:50
  • You probably used a geographic CRS with units in degrees, that's why it gets so huge. See updated answer how to change that. Howver, be aware: when working with angles, best use a CRS that returns equal angles. So here, a mercator projection is a good option (I used WebMercator / EPSG:3857).
    – Babel
    Jul 2 at 9:55

Your Answer

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

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