Convert map coordinates to pixel coordinates
Afficher commentaires plus anciens
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 commentaire
Rob Comer
le 16 Juin 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)]?
Réponses (1)
bear grill
le 24 Avr 2013
0 votes
Catégories
En savoir plus sur Geographic Coordinate Reference Systems dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!