Clear Filters
Clear Filters

How plot line in geographic map with initial coordinates and azimuth?

29 views (last 30 days)
Hello!
I would like to know how can I plot a line extending for 3000 km over a geographic map on MATLAB. I have the latitude and longitude of the initial position, together of the back-azimuth to indicate the direction. Then, I need to plot a line starting in that position. I know some commands (e.g.geoplot) which they plot line between two geographical coordinates, but I dont know using bach-azimuth angle.
I will be grateful for any idea.
best,
Guilherme de Melo

Accepted Answer

Cris LaPierre
Cris LaPierre on 17 May 2023
I think geoplot is the correct function. You just need to calculate the end coordinates. If you have the initial location, arclength, and azimuth, you can use the reckon function (included in the Mapping Toolbox).
  32 Comments
Guilherme Weber Sampaio de Melo
Hi. It worked well. Thank you. I did not know about the scatter. I was thinking that it would be plotted automatically after define the color order, similar to we have done to the lines on map.
However, there is a "problem?" that after use the scatter function, some vertical lines (e.g. 90-95 of y-axis in 605 x-axis ) provide by xlim are not being plotted. They were working normal after "plot" function.
Cris LaPierre
Cris LaPierre on 14 Nov 2023
If you want to use colororder to set your marker color, see my previous reply. You may also find the description on the Y-input on the plot documenation page helpful.
For your new question, there was no use of xlim in the code you shared. Please provide example code.

Sign in to comment.

More Answers (0)

Categories

Find more on Colormaps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!