Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have an image A of dimension p x q. If I know the UTM coordinate of A(1,1) and A(p,q) and pixel size in meters.
A
p x q
A(1,1)
A(p,q)
How to convert the pixel coordinates to map coordinates in MATLAB?
Xsize = (1:p)*PixelSizeInMeter+UTM_x_onA11; Ysize = (1:q)*PixelSizeInMeter+UTM_y_onA11; figure; surface(Xsize,Ysize,A);
现在您可以使用Xsize和绘制地图Ysize。由于 UTM 是一个笛卡尔网格,生活非常简单:获取正确数量的元素,乘以网格大小并添加下角的坐标以将绘图移动到正确的位置。
Xsize
Ysize