Coordinate Conversion from XY in Satellite image to latitude and longitude

7 ビュー (過去 30 日間)
Cyrus
Cyrus 2016 年 8 月 22 日
コメント済み: KSSV 2016 年 8 月 23 日
My associate and I are trying to convert XY Coordinates in a satellite image to latitude and longitude.
Here is the process:
We opened the image into Matlab using " geotiffread" function,
Did the process and found some XY Coordinates.
Now we need to convert back those [x,y] coordinates into latitude and longitude.
How can we do that? Thanks.

採用された回答

KSSV
KSSV 2016 年 8 月 23 日
file = 'Matlab_Question.tif' ;
info = geotiffinfo(file);
[x,y] = pix2map(info.RefMatrix,1,1);
[lat0,lon0] = projinv(info, x,y) ;
[x,y] = pix2map(info.RefMatrix,864,859);
[lat1,lon1] = projinv(info, x,y) ;
  2 件のコメント
Cyrus
Cyrus 2016 年 8 月 23 日
Thank you, that works, but I have one question about that,
As you know the size of the image is 865 X 859, I tried some indices out of the image of the boundary and Matlab didn't show me any error.
it that ok?
KSSV
KSSV 2016 年 8 月 23 日
I think it can be checked... You can plot those values which are not the indices, with the indices which are from the image; check whether those points are really falling outside...

サインインしてコメントする。

その他の回答 (2 件)

KSSV
KSSV 2016 年 8 月 23 日
If X, Y are in distance (Km,m) use km2deg...
  3 件のコメント
KSSV
KSSV 2016 年 8 月 23 日
You mean they are row and column indices?
Cyrus
Cyrus 2016 年 8 月 23 日
Yes, exactly

サインインしてコメントする。


KSSV
KSSV 2016 年 8 月 23 日
That case...you can fit the limits of x axis and y axis...and get the X,Y grid....you can directly get the values in degrees itself....
Attach the image here..let me give a try...

Community Treasure Hunt

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

Start Hunting!

Translated by