How to calculate the coordinates of the intersection point between geographical lines?
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
Cris LaPierre
2023-11-13
For more context, see here: https://www.mathworks.com/matlabcentral/answers/1966199-how-plot-line-in-geographic-map-with-initial-coordinates-and-azimuth#comment_2959075
"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."
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geographic Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!