Clear Filters
Clear Filters

How to calculate the coordinates of the intersection point between geographical lines?

12 views (last 30 days)
Hello,
I am plotting some lines originated from a single point on map. There is a black vertical line where the initial color lines intersect over specific lat/long positions. I need to find a way to calculate the coordinates of the geographic position where these lines intersect. Someone have ideia about how can do that? I will be grateful for your help. Thanks, Guilherme
track_lines_distance=1000; %line extension in km
lat_mean_st123_array=-15; %latitude
long_mean_st123_array=-10; %longitude
baz_lines=[268;270;271]; %example of back-azimuths
distance_line=track_lines_distance; %km
distUnits = 'km';
arclen_array_line = rad2deg((distance_line)/earthRadius(distUnits));
[lat_final_line_point,long_final_line_point] = reckon(lat_mean_st123_array, long_mean_st123_array,arclen_array_line,baz_lines);
lat_mean_st123_array_plot=[-15,-15,-15];
long_mean_st123_array_plot=[-10,-10,-10];
lat=[lat_mean_st123_array_plot; transpose(lat_final_line_point)];
long=[long_mean_st123_array_plot; transpose(long_final_line_point)];
lat_dark_line=[-14, -16];
long_dark_line=[-18, -18];
figure(1)
gx = geoaxes;
plot(gx,lat_dark_line,long_dark_line,'Color','black','LineWidth',2.5)
hold on
plot(gx,lat,long,'LineWidth',1.5)
hold on
geobasemap grayterrain
  1 Comment
Cris LaPierre
Cris LaPierre on 13 Nov 2023
"I have another questions. Is there a way for us to use the reckon to project the lines until another specific array of coordinates? I mean, the horizontal thicker black line shown on the map (see the figure). I have all the coordinates of the line. Then, I would like to try to calculate the horizontal length (km) over the thicker black line between the further east and west projected lines. For example, taking a look at map scale the length should be ~70-74 km, but I am not sure about the exact length."

Sign in to comment.

Answers (0)

Categories

Find more on Geographic Plots in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!