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?

Babel
  • 71,072
  • 14
  • 78
  • 208
Geographos
  • 4,087
  • 2
  • 27
  • 88

1 Answers1

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

Babel
  • 71,072
  • 14
  • 78
  • 208
  • Yes, it works. How to restrict it to a few kilometers instead of a whole globe? The range is endless now. – Geographos Jul 02 '21 at 09: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 02 '21 at 09:55