how to convert a latitude and Longitude(degree units) to X Y(length units)?

조회 수: 8 (최근 30일)
Hussain Ali
Hussain Ali 2021년 1월 23일
답변: Khush Bakhat Sawaiba 2021년 5월 19일
Greetings everyone!
I am trying to simulate trajectory of UAV, for this I have used TIFF file for initial simulations that returns X Y coordinates (using ginput command), it worked well but when i tried to use geographic axes (geoplot) that returns latitude and longitude, I couldn't simulate proper trajectory as the units differ so i want to convert latitude and longitude to X and Y respectively.
NOTE: I have tried using deg2km or grn2eqa command but they dont give actual X/Y coordinates as shown by TIFF file, images have been given for refernce, same point has been selected to get readings
  댓글 수: 6
Hussain Ali
Hussain Ali 2021년 1월 23일
@Walter Roberson actually i want to use geogrpahic axes which gives me an advantage of panning/zooming or adjusting before taking inputs.
I used tiff file to build my code (trajectory of UAV) and ensure its proper working.
SO I WANT TO CONVERT LATITUDE/LONGITUDES FROM GEOAXES TO X/Y COORDINATES
Walter Roberson
Walter Roberson 2021년 1월 23일
In https://www.mathworks.com/matlabcentral/answers/724822-how-to-convert-a-latitude-and-longitude-degree-units-to-x-y-length-units#comment_1280392 I posted links to functions that convert from lat/long to X/Y coordinates. However, whether those functions are appropriate depends upon the datatype of the raster reference R . I do not know whether they are the correct functions for your purposes because you have not shown me the output of the class(R ) that I asked for.
Please execute
[A, R, map] = readgeoraster('ISTILL.tif');
class(R)
and tell me what the output is.

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

답변 (1개)

Khush Bakhat Sawaiba
Khush Bakhat Sawaiba 2021년 5월 19일
Hussain Ali Can I get your email id so that, I may discuss this query to you .Here I am unable to attach some files

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by