3

I have data from visual observations of birds from a observation point. The data are entered in tables containing coordinates of the observation point, altitude of the bird, distance to the bird, distance direction and flight direction.

Is it possible to automatically create accurate bird locations from the data using QGIS?

Here is a sample of the data:

enter image description here

Taras
  • 32,823
  • 4
  • 66
  • 137
  • You have the observer position and the bearing/distance to target (not that I'm suggesting you're trying to injure the bird by referring to it as a target), with that Pythagorean calculation for X, Y (you already have Z) is fairly easy; though your measurements are rough, appearing as increments of 50 (units?) with the observer to target direction rounded to 45 degree anges, your expectation of 'accurate' should be realistically low. – Michael Stimson Nov 02 '22 at 06:35
  • 1
    https://docs.qgis.org/3.28/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#qgisprojectpointcartesian – BERA Nov 02 '22 at 06:58

1 Answers1

3
  1. Open the table you have as a CSV-file in QGIS and be sure that for Geometry definition, you set your x- and y-coordinates and Geometry CRS as EPSG:4326.

  2. Reproject/export the resulting point layer to a local CRS, apt for measurements in your region of interest. As you seem to be working in north eastern Bulgaria, it's UTM zone 35N EPSG:32235.

  3. Create a new field "azimuth" to convert distance directions from text format ('N', 'NE') to numbers. Use the 2nd expression at the end of this answer.

  4. Now on the layer resulting from step 2, use Geometry generator or Geometry by expression to create your points with this expression:

    project(
         $geometry,
         "distance",  -- use your field name
         "azimuth"   -- use your field name
        )
    

Screenshot: observation point: blue; red points: bird's positions, created with "Geometry generator" - here in one step, converting distance directions from text to number included directly in the final expression, thus avoiding step 3:

enter image description here

Expression for step 3 to convert distance directions from text format (Cardinal directions 'N', 'NNE', 'NE' etc.) to numbers. Degrees have to be converted to radians as the project() function from step 4 expects radians as input:

    radians(
        case 
            when direction = 'N' then 0
            when direction = 'NNE' then 22.5
            when direction = 'NE' then 45
            when direction = 'ENE' then 67.5
            when direction = 'E' then 90
            when direction = 'ESE' then 112.5
            when direction = 'SE' then 135
            when direction = 'SSE' then 157.5
            when direction = 'S' then 180
            when direction = 'SSW' then 202.5
            when direction = 'SW' then 225
            when direction = 'WSW' then 247.5
            when direction = 'W' then 270
            when direction = 'WNW' then 292.5
            when direction = 'NW' then 315
            when direction = 'NNW' then 337.5
        end
        )

Or the same, but shorter:

   array_get (
       generate_series (0, 360,360/16),
       array_find (
            array('N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW'),
           "direction"
       )
   )
Babel
  • 71,072
  • 14
  • 78
  • 208