Convert map coordinates to pixel coordinates
6 views (last 30 days)
Show older comments
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 Comment
Rob Comer
on 16 Jun 2013
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)]?
Answers (1)
See Also
Categories
Find more on Geographic Coordinate Reference Systems in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!