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 个评论

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)]?

请先登录,再进行评论。

提问:

2013-4-23

Community Treasure Hunt

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

Start Hunting!

Translated by