I am working on kml file integration on cesium maps. I already have a json file with approach_path data for airplanes. I want to convert this file into a kml file so that I can load the corresponding data onto the cesium map showing the approach paths onto the map itself. (There is a valid reason why i don't want to load the json file directly that I have. I want to load the kml file only!).
So for creating a line using kml file onto the cesium map I have to use a tag named : <LineString>
along with the other tags this linestring has another subtag named : <coordinates>
which requires 2 values i.e from where to start and where to end.
But in my json file the data that I have is as follows :
[
{
"Rwy": "30R",
"Altitude": 82,
"Gradient": 3,
"Course": 299,
"Distance": 9.2,
"Variation": 2,
"lat": 25.24775,
"lng": 55.38086111111111,
"DMS": "25°14'51.9\"N 55°22'51.1\"E"
}
]
Now the above data represents a single line where it is just using a single coordinate (lat and lng) it is not using a start coordinate and a end coordinate to create a line like we need it in case of a linestring
what I think is in the json file they are using directional data as well as i dont know what rwy
course
DMS
and variation
represent maybe it is used to create a vector which has a start point and extends in a particular direction for a certain range.
Now the real question is how can i create a vector in kml? which has only 1 start point and extends in a particular direction for a particular range.
Anykind of help will be appreciated :)