I'm looking for a way to draw a line from a point and an angle (azimuth) and then build a polygon with the intersection of these lines.
base <- data_frame(
id = c(1, 2, 3),
x = c(10, 5, 3),
y = c(5, 10, 4),
azimute = c(330, 120, 45),
)
In the example below, each id
has an x / y coordinate and an angle of view (azimuth, where 0/360 is north, 90 is west, and so on).
The example lines were built using trigonometry ('on hand'), but my interest is to do in a SIG (sf or sp) package as the project involves points within a Brazilian state and spatial reference is important. p>
The challenge is to build the rows from every id
using the azimuths. the length of the line does not matter, it will be a big value to make sure they intersect.
The end goal is to create a polygon created from the intersection of the segments.