Code covered by the BSD License  

Highlights from
GEplot

4.0

4.0 | 8 ratings Rate this file 28 Downloads (last 30 days) File Size: 32.59 KB File ID: #12948
image thumbnail

GEplot

by Rafael Palacios

 

09 Nov 2006 (Updated 21 Feb 2008)

GEplot uses the same syntax as the Matlab plot function, but draws over Google Earth graphs

| Watch this File

File Information
Description

Creates a file in kmz format that can be opened into Google Earth.
GEplot uses the same syntax as the traditional plot function but requires Latitude and Longitude (WGS84) instead of x and y.
Examples:
GEplot('my_track',Lat,Lon);
GEplot('my_track',Lat,Lon,'o-r','MarkerSize',10,'LineWidth',3)

Colors supported: blue, green, red, cyan, magenta, yellow, black, white.
Symbols supported: point, circle, x-mark, plus, star, square, diamond, filled square, filled diamond,filled circle.

Each plot appears as a separate folder within GE; within the folder line and marks are separated in two layer. Hence it is very easy to show/hide different plots.

If you need to convert from UTM to Lat/Lon you may use utm2deg.m, also available at Matlab Central.

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
09 Nov 2006 Tomas Frank

Idea is great! Google Earth in Matlab! But it took me 10 min of my time to fail to overcome the elementary error (after I installed software and set the path).

>> GEplot('my_track',Lat,Lon);
??? Error using ==> iofun\private\getArchiveEntries
File "GEimages/none_b.png" does not exist.

Error in ==> GEplot at 217
zip(filename,{strcat(filename,'.kml'), iconfilename});

Note: I set Lat and Lon to actual vectors.

Maybe it make sence to check first if what you submit actually works.

But, again, the idea is great!

15 Nov 2006 Rafael Palacios

The problem found by Tomas Frank has been corrected in the currently available version.
GEplot is easy to learn because it uses the same syntax as plot. If you need to draw other kind of objects, you may consider using Matlab2GoogleEarth toolbox, also available at Matlab Central.

16 Nov 2006 nima moshtagh

Great job! it works very nicely. I recommend adding the capability of plotting multiple trajectories at once. So the 'Lat' and 'Lon' would be matrices rather than vectors. (similar to the Matlab's plot() function) I did it myself and it worked perfectly.

08 May 2007 Andrew Robertson

This is the simplest way to draw my vectors of coordinates in Google Earth.
Thanks!

26 Jun 2007 Eric Gayer

Thanks for this simple and so usefull code. Thanks also for adding Labels. Now I can plot my sample site, with their name on GE... Thanks again ! This is gonna be really usefull for the geosciences community.

02 Jul 2007 tarun luthra

i am trying to run this tool but it gives me this errorfp=fopen(strcat(filename,'.kml'),'w');
if (fp==-1)
    message=sprint('Unable to open file %s.kml',filename);
    error(message);
end

can you tell me whats wrong with i have got my lat and lon in decimal format is that good enough it doesnt create the .kml file and if it does where is it gonna store it

13 Sep 2007 R. LeFande

GEplot('my_track',xx,yy)
??? Undefined function or method 'GEplot' for input arguments of type 'char'.

What am I missing? Thanx.

03 Jan 2008 Enrique Vargas  
13 Sep 2010 Felipe Chavarri

Amazing code for plotting, Very Thanks Rafael, you safe my life!
I see your tutorials too an there are just terrific. Thank you for sharing your knowledge!!!

Please login to add a comment or rating.
Updates
15 Nov 2006

Fixed an error (found by Tomas Frank) related to plotting graphs without symbols (just lines).

16 Nov 2006

Correct an error while ploting graphs with lines but without symbols. Now it works just with lines, just with symbols or lines and symbols.

21 Feb 2008

Apparently, similar plotting functions are located in Graphics category.

Tag Activity for this File
Tag Applied By Date/Time
specialized Rafael Palacios 22 Oct 2008 08:48:28
plotting Rafael Palacios 22 Oct 2008 08:48:28
google Rafael Palacios 22 Oct 2008 08:48:28
earth Rafael Palacios 22 Oct 2008 08:48:28
kmz Rafael Palacios 22 Oct 2008 08:48:28
plot Rafael Palacios 22 Oct 2008 08:48:28
google Matthew Simoneau 31 Mar 2009 19:08:17
google Ian Howat 08 Jul 2010 10:51:47

Contact us at files@mathworks.com