Plotting imagesc on Google Earth ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello all,
I want to plot an imagesc figure georeferenced with google earth and perpendicular to it. Anyone can help ? I know that it can be done, but I tried with googleearth toolbox and it's not working. You can see an example in the two links below:
thanking you in advance,
le fou
0 Kommentare
Antworten (4)
Walter Roberson
am 26 Okt. 2011
I don't think I have heard of a google earth toolbox. An earlier discussion referred to an ActiveX-based File Exchange contribution.
You have not indicated what happened when you tried.
imagesc() is, by the way, not suitable for 3D work. imagesc() creates an image object that is strictly 2D and cannot be (usefully) moved out of the x-y plane. If you want images out of the x-y plane then you need to texture map on to a surface object, such as you can do using a patch object. See http://www.mathworks.com/help/techdoc/visualize/f0-18164.html
0 Kommentare
LE FOU
am 27 Okt. 2011
1 Kommentar
Walter Roberson
am 27 Okt. 2011
pcolor is surf() rotated to view from above.
If you have a data set X and want it scaled the way that imagesc() would, then
Ncol = size(colormap(),1);
dtype = 'uint8';
if Ncol > 256; dtype = 'uint16'; end
minx = min(X(:));
maxx = max(X(:));
if maxx == minx
scaledX = intmax(dtype) .* ones(size(X));
else
scaledX = cast((double(X) - minx) ./ (maxx - minx) .* (Ncol-1),dtype);
end
This code can of course be simplified if you know ahead of time that you will be wanting uint8 or uint16.
The result, scaledX, will be in indexed (pseudocolor) form for the current colormap. The calculation doesn't carry through if you switch colormaps to a different size: the change to support that would not be difficult.
LE FOU
am 28 Okt. 2011
1 Kommentar
Walter Roberson
am 28 Okt. 2011
Sorry, I did not realize you were trying to do this within the google earth viewer: I assumed the google earth toolbox was for importing google earth data in to matlab.
I looked through the description of the major functions in the contribution you reference, but nothing in there looked appropriate from the descriptions. Sorry.
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!