How can I create a KML file using Mapping Toolbox in MATLAB?
5 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Sep 2017
Answered: MathWorks Support Team
on 19 Sep 2017
How can I use MATLAB with Mapping Toolbox to generate a KML file for use with Google Earth?
Accepted Answer
MathWorks Support Team
on 19 Sep 2017
You can do this by using kmlwritepoint function:
For example, the following code will create a KML file with the cities Adana, Alexandria, and Algiers:
latitudes = [37.0613, 31.3044, 36.7869];
longitudes = [35.3894, 30.4097, 3.0396];
names = {'Adana', 'Alexandria', 'Algiers'};
filename = 'cities.kml';
kmlwritepoint(filename, latitudes, longitudes, 'Name', names);
0 Comments
More Answers (0)
See Also
Categories
Find more on Google Earth in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!