Plot with kmlwrite without any name(not even the default)

3 Ansichten (letzte 30 Tage)
Dimitris Kokkinos
Dimitris Kokkinos am 19 Jan. 2015
Beantwortet: Mehmet Emin am 22 Jul. 2016
Hi!I need to plot my results on Google Earth.They are numbers referring to points with known coordinates.Each value provide me a colored point as a result and I don't want to plot any name.
I have tried name='' but it uses the default 'point 1' 'point 2' etc
Is there a way to achieve that?
  2 Kommentare
Geoff Hayes
Geoff Hayes am 19 Jan. 2015
Dimitris - I think that you need to post more of your code so that we can get an idea of what you are trying to do. Your subject line mentions kmlwrite but you have not indicated how you are using it (i.e. the code) in the body of your question. Please elaborate.
Dimitris Kokkinos
Dimitris Kokkinos am 19 Jan. 2015
Bearbeitet: Geoff Hayes am 19 Jan. 2015
  • That's my code: *
lon=Coords(:,1);
lat=Coords(:,2);
icon='http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png';
iconscale=1.4;
name1=num2str([1:50]');
name=cellstr(name1);
filename=('F:\Project\FVI-GoogleEarth\Area3.kml');
color=Color_Vuln{:,2};
kmlwrite(filename, lat, lon, 'Icon',icon,'IconScale',iconscale, 'Name', name, 'Color', color);
  • The variable name1 sets the icon's name as a number (1 to 50). What I want is to plot my icons without any name. *
PS:Color_Vuln is a variable which has RGB values.You can ignore this variable if confuses you.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Mehmet  Emin
Mehmet Emin am 22 Jul. 2016
Hi,
I had the same problem and just solved it know. First off all use kmlwritepoint instead of kmlwrite, recommended from mathworks.
For your code,
you may take the size of your string first,
[m,n] = size(lat);
the result will be something like m=1 , n = x which x not equal 1.
For the 'Name' arguments the data types are defined as char and cell. So you have to create an array whit no chars with the size n.
Name = blanks(n);
This will create that array with blank chars.
And now you can use your kmlwritepoint function like that;
kmlwritepoint(filename, lat, lon, 'Icon',icon,'IconScale',iconscale, 'Name', name, 'Color', color);

Kategorien

Mehr zu Call C++ from MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by