Rank: 41273 based on downloads (last 30 days) and 0 files submitted
photo

Amalia

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Amalia
Updated File Comments Rating
23 Sep 2009 Google Earth Toolbox Various plotting/drawing functions that can be saved as KML output, and loaded in Google Earth Author: Scott L. Davis

Great job, although there are a couple of problems I'm having with the 'ge_contourf' function. I'd like to plot just 1 contour on GE and here's my test script:
_____________________
close all
clear all
[X,Y] = meshgrid(1:20,1:20);
Z = peaks(20);
cMap = 'jet';
lineValues = [ 0 0 ] ;
[C,h] = contourf(X,Y,Z, lineValues);
colorbar
axis image
colormap(cMap)

kmlStr = ge_contourf(X,Y,Z,'cMap',cMap,...
               'polyAlpha','7F', 'lineValues', lineValues);
           
ge_output('test_contourf.kml',kmlStr);
___________
           
The script as run above produces an error in the "isinner" function. I was able to tweak this by making 'firsttest' have a single scalar value so it'll accept the && test at the end of the function. This tweak actually gets the ge_contourf function to run but the other problem is that the resulting contour, and the polygon created in the .kml file, is the reverse of what I actually want and the reverse of what the CONTOURF function produces.

If you change the lineValues parameter to "[ 2 2]" then the resulting .kml polygon matches that produced by CONTOURF. Although I'd still like only 1 color showing on GE and not the background color - that is, I'd like 1 colored contour showing on GE.

Any ideas on how to tweak the ge_contourf function so I can get it correctly create the polygon and .kml file when the polgyon goes to the outer edges of the 'box' (i.e., the example when lineValues = [0 0])?

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com