Symbolspec Lines with geoshow

12 visualizaciones (últimos 30 días)
Philipp Henschel
Philipp Henschel el 8 de Feb. de 2018
Comentada: Philipp Henschel el 2 de Mzo. de 2018
I'm plotting latitude and longitude data to receive the flight routes. Now I want to color the routes/lines by airline(callsign), so I can see which airline is flying where. Therefore I'm using SymbolSpec. Besides the latitudedegrees and longitudedegree is a column in the table (LnL_Po1) with their callsign, shortened to the airline code.
LineColor = makesymbolspec('Line',{'callsign','UAL', 'Color',[11/256 84/256 229/256]},{'callsign', 'AAL', 'Color', [224/256 6/256 6/256]},{'callsign','DAL','Color',[196/256 0/256 107/256]},{'Default','Color','k'});
geoshow(LnL_Po1.latitudedegrees, LnL_Po1.longitudedegrees,'Line', 'SymbolSpec', LineColor);
Using this code I received following Error Message: The parameter/value inputs must be pairs. I tried to fix it by myself, but couldn't find a solution. Any Suggestions what could be wrong? Thanks in advance!
  2 comentarios
Jyotish Robin
Jyotish Robin el 27 de Feb. de 2018
In the geoshow command, I don't see a name corresponding to the value 'Line'. You may be probably missing the name 'DisplayType' which needs to be used along with the value 'Line'.
Philipp Henschel
Philipp Henschel el 27 de Feb. de 2018
Thanks for your respond.
I tried what you recommended, still received another error message:
Error using line There is no SymbolSpec property on the Line class.
Error in mapline (line 23) h = line(xdata(:), ydata(:), 'Color', [0 0 1], varargin{:});
Error in geovec (line 21) h = fcn(x, y, varargin{:});
Error in geovecshow (line 67) h = geovec(mstruct, lat, lon, ...
Error in geoshow (line 276) h = showFcn(varargin{:});
I'm confused by the first line of the Error Message (-isn't this feature exactly for Lines etc.?!-) Any further ideas?

Iniciar sesión para comentar.

Respuestas (1)

Jyotish Robin
Jyotish Robin el 1 de Mzo. de 2018
Hi Philipp,
The geoshow(lat,lon,...) syntax doesn’t work with symbol specs – so geoshow simply passes the SymbolSpec name-value pair to line, which doesn’t know what do so with it.
In order to use a symbol spec, replace lat, lon with S, where S is a geopoint vector, a geoshape vector, or a geostruct (with 'Lat' and 'Lon' coordinate fields).
You can find more info about the stucture of S at
Hope this helps!
  1 comentario
Philipp Henschel
Philipp Henschel el 2 de Mzo. de 2018
Hi Jyotish,
Yes it helps a bit. I see the problem with geoshow(lat, lon). I checked the documentation about the geopoint/geoshape vector and get the sense.
I now have the issue since I want to show multiple flight tracks, I have to seperate the lat&lon data points by their Flight ID and create an geostruct for every Flight ID, correct? But I have no idea how to get it done. Do you have any suggestions on the separation of the data?
Would be terrific if you can help me on this as well.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by