필터 지우기
필터 지우기

How to extract the values of kml file x,y,z from MATLAB

조회 수: 18 (최근 30일)
주영
주영 2024년 8월 22일
답변: Angelo Yeo 2024년 8월 22일
Is it possible to extract the values of kml file x,y,z from matlab?
Is there any url or document to refer to in this regard?

답변 (2개)

Karanjot
Karanjot 2024년 8월 22일
Hi,
It is possible to extract the coordinates (latitude, longitude, altitude) from a KML (Keyhole Markup Language) file using MATLAB.
You can use the kml2struct file exchange submission to import a Google Earth .kml file of points, lines, polygons, or a combination, as a Matlab struct, compatible with the features provided with the Mapping Toolbox.
You may refer to the following blog on working with KML files within MATLAB
To access the file exchange submission, refer the link below
I hope this helps!

Angelo Yeo
Angelo Yeo 2024년 8월 22일
readgeotable support KML files to read. However, in R2024a, it only supports reading the shapes, name, and description of KML files as described in the doc. See its doc for further information.
unzip("KML_Samples.zip");
filename = "KML_Samples.kml";
T = readgeotable(filename)
T = 3x3 table
Shape Name Description _______________________ ____________________ ______________________________________________________________________________________________ (37.4223°N, 122.0822°W) "Simple placemark" "Attached to the ground. Intelligently places itself at the height of the underlying terrain." (37.4220°N, 122.0841°W) "Floating placemark" "Floats a defined distance above the ground." (37.4216°N, 122.0858°W) "Extruded placemark" "Tethered to the ground by a customizable "tail""
FYI, the sample KML file is from Google's end (link).

카테고리

Help CenterFile Exchange에서 Google Earth에 대해 자세히 알아보기

태그

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by