MATLAB: save geospatial polygons in a *.kml file
显示 更早的评论
After generating the poligons vertices and defined their faces, I've plotted the polygons with the patch function:
pp = patch('Faces',faces,'Vertices',vertices);
and then I've defined the patches colors:
set(pp,'FaceColor','flat',...
'FaceVertexCData',cdata,...
'CDataMapping','direct',...
'EdgeAlpha',.4,'EdgeColor','b')
Getting the following Matlab plot:

Now, I would like to visualize these polygons with Google Earth, but I don't know how.
I've tried the function kmlwrite, but I could pass to it only the polygons' vertices's coordinates, generating a kml file with all points and no polygon, as shown below:

The question is: wow can I write geospatial polygons (and their colors) into a .kml file with kmlwrite function?
Thanks
采纳的回答
更多回答(2 个)
Rob Comer
2020-1-28
0 个投票
1 个评论
Polsak Tothong
2021-10-14
How can we use kmlwritepolygon when input have multiple polygons. Matlab function seems to write one polygons at a time only
Rob Comer
2021-10-14
0 个投票
类别
在 帮助中心 和 File Exchange 中查找有关 Google Earth 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!