How to georeference in MATLAB?
9 ビュー (過去 30 日間)
古いコメントを表示
So guys I have a map as given in the google drive link (too big to attach here): https://drive.google.com/file/d/1XzeM835pHCJQ3hoi9uJgLSOLIe04J-k6/view?usp=sharing. I want to georeference this map's picture in MATLAB but according to the geotiffwrite command I need a ".tfw" file to do this...which I don't. However, I created this image and I know every coordinate of each pixel. On the horziontal axis of the image, its the longitude, and it stretches from -180 degrees to 180 degrees (left to right). And on the vertical axis of the image, its the latitude, and it stretches from 90 degrees to -90 degrees (up to down). The resolution of the picture is 3601 by 7201. And it follows those two equations:
P_vertical = -20*(La-90) + 1
P_horziontal = 20(Lo+180) + 1
For example, if you want to know the best pixel that corresponds to the coordinate Latitude = 0 (La = 0) and Longitude = 0 (Lo = 0), then use the previous equations and you will see that the pixel on the image that corresponds to that coordinare is (horziontal, vertical) = (3601, 1801). The map has a very simple transformation as you can see, and georeferencing it shouldn't be diffcuilt. But I just don't know how. Any help is appreciated.
採用された回答
KSSV
2022 年 9 月 15 日
file = 'truemap_automatedEditedz.tif' ;
[A,R] = readgeoraster(file) ;
image([-180 180], [90 -90],A)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!