Mercator map projection from [X,Y] with known lat/lon coordinates?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Peter Dorofy
am 15 Jul. 2015
Kommentiert: Peter Dorofy
am 20 Jul. 2015
I am working with a satellite image in simple binary, pixels are stored as 2-byte integers. I've used the code below to build a matrix. I am able to display the satellite's "native" view. What I need to do is map the X,Y to a mercator projection. I have the upperleft and lowerright lat/lon coordinates, so I am thinking this could probably be done, but I am not sure how or what functions I should be looking at. Any suggestions?
Thanks.
img = multibandread(file, [3712 3712 1], 'int16', 0, 'bil', 'ieee-le');
m = img(ROWa:ROWb,COLa:COLb);
[X,Y] = ind2sub(size(m), 1:numel(m));
Z = m(:);
0 Kommentare
Akzeptierte Antwort
Chad Greene
am 15 Jul. 2015
If you have the Mapping Toolbox, you could initialize a mercator map, then use projfwd to get the x/y locations of the corner coordinates. If you need gridded x/y coordinates, you could then use
[X,Y] = meshgrid(linspace(minx,maxx,cols),linspace(miny,maxy,rows))
where minx, maxx are the corner x coordinates and cols is the number of columns.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Mapping Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!