How to georeference in MATLAB?
조회 수: 8 (최근 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!