Plotting imagesc on Google Earth ?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(4 个)
Walter Roberson
2011-10-26
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 个评论
LE FOU
2011-10-27
1 个评论
Walter Roberson
2011-10-27
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
2011-10-28
1 个评论
Walter Roberson
2011-10-28
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!