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!