How to convert lon lat data extracted from Mapping Toolbox?

조회 수: 2 (최근 30일)
Leon
Leon 2020년 1월 24일
댓글: Leon 2020년 1월 24일
Here is my code trying to extract the longitude and latitude info out of mapping tool box so that I can make my own plots within app-deisigner (right now it does not support mapping toolbox):
load coastlines
axesm mercator
p = plotm(coastlat, coastlon);
xlswrite('map.xlsx', [p.XData', p.YData']);
The issue is that the longitude and latitude values look very weird. Instead of having a range of -180 and 180 for longitude and -90 and 90 for latitude. They both range from -3 to 3.
Anyone knows how to convert them back to the regular longitude and latitude range?
Thanks!
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2020년 1월 24일
Leon - isn't the original data just the coastlat and coastlon variables? It could be that hte XData and YData correspond to the positions as drawn on your axes.
Leon
Leon 2020년 1월 24일
Thank you so much! This basically answers my question.
So bad I can't accept your answer, because it is posted as a comment.
Liqing

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by