File Exchange

image thumbnail

GESCATTER

version 1.0.0.0 (3.18 KB) by Andrew Stevens
Create a scatter plot in Google Earth (.kml)

6 Downloads

Updated 04 Mar 2009

View License

GESCATTER creates a .kml file that displays colored circles at the locations specified by the vectors LON and LAT similar to ML's builtin function, SCATTER.The color of the circles is scaled relative to the values provided in third input, C.

I searched the FEX's many submissions dealing with exporting .kml files for Google Earth, but didn't find anything that was similar to ML's built-in function, SCATTER...a function I use regularly to visualize scattered data that are too sparse for gridding. This function is relatively easy to use, for example:

%generate some data
x=(0:0.05:6*pi);
lon = -122.170087 + cos(x)*0.01;
lat = 37.455697 + x*0.001;

%color the points according to their latitude
gescatter('foo.kml',lon,lat,lat)

Cite As

Andrew Stevens (2020). GESCATTER (https://www.mathworks.com/matlabcentral/fileexchange/23187-gescatter), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

I change L168 to L175 into :
if ~isempty(t)
fprintf(fid,'%s \n','<TimeStamp>');
fprintf(fid,'%s \n',['<when>',datestr(t(i),29),...
'T',datestr(t(i),13),'Z</when>']);
fprintf(fid,'%s \n','</TimeStamp>');
end

And the time slider now work fine...

John Roshan

Works great!

The default placemark symbol and color could have been set to something more visible though.

the foo.kml is which file?

it's grate!!!

Jeff Tuhtan

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux