필터 지우기
필터 지우기

Plotting imagesc on Google Earth ?

조회 수: 6 (최근 30일)
LE FOU
LE FOU 2011년 10월 26일
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

답변 (4개)

Walter Roberson
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

LE FOU
LE FOU 2011년 10월 27일
Hello Walter,
thanks for answering, but I think you got me wrong, I know about the imagesc function and that it can't be used on 3D, maybe the question wasn't clear. What I want is to draw the figure that I got from imagesc perpendicular or on the vertical of the google map, as I showed in the previous links I posted earlier in my question, maybe it could be so simple bu just trying to rotate it.
Anyway let's suppose that we can't do it with imagesc, is there any other solution, for example does it work if we used pcolor instead ?
the goal at the end is to be able to plot it at I mentioned in the links previously posted in my question above.
thanks again,
lefou
  댓글 수: 1
Walter Roberson
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
LE FOU 2011년 10월 28일
Hi Walter,
I really appreciate your help. I have been trying it's been 2 days, with your suggestion above but the problem is I'm using the googleearth toolbox where only some of the matlab functions are available (see the list here : http://www.mathworks.com/matlabcentral/fx_files/12954/4/content/googleearth/html/contents.html), and pcolor is not in that list.
What I've right now is 2 vectors for the track of the satellite (latitude (1 x m) and longitude (1 x m)), 1 altitude vector (1 x n) and 1 matrix with vertical information (m x n). Maybe you know a way to use imagesc or mesh in order to do what I want.
Thank you
LeFou
  댓글 수: 1
Walter Roberson
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.

댓글을 달려면 로그인하십시오.


LE FOU
LE FOU 2011년 10월 28일
Hi Walter,
do you think I can find another solution to the problem ? or there is no way to solve this thing ?
Thanks anyways for the effort,
Le fou

카테고리

Help CenterFile Exchange에서 Mapping Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by