Convert map coordinates to pixel coordinates
显示 更早的评论
Hi.
I am using the matlab's toolbox Map Projections. I am not interested in displaying maps so I handle a structure built by "defaultm" (mstruct).
I determined gratitudes of my interest points and I want to convert them to cartesian coordinates and stock them into a matrix. The conversion is realised by the routine [x,y,z] = mfwdtrans(mstruct,theta,phi)
Then I retrieve the cartesian coordinates in x and y (for 2D maps). Now I want to convert to matrix coordinates (row,col). I need the width of the interval for x and for y. For instance, if I use the map 'globe' I know that x and y will describe the unit disk. But If I use an other map wich is not "canaonic" such as 'bonne' then I do not know what are the intervals for x and y.
Do you see my trouble ?
ps: I see that a function map2pix exist but it is no appropiate for my purpuse since I don't know the referencing matrix.
Thanks
1 个评论
Rob Comer
2013-6-16
What if you make a graticule that covers the entire earth at a moderate resolution, convert it latitude-longitude column vectors, project with mfwdtran, remove NaNs from the output (x,y), and take [min(x) max(x)] and [min(y) max(y)]?
回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Geographic Coordinate Reference Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!