Plotting Lat Lon trajectory on a map

3,119 views
Skip to first unread message

Sridhar Mantha

unread,
Feb 3, 2013, 7:21:57 AM2/3/13
to kml-suppor...@googlegroups.com
Hello folks,

This is my first post on this forum.
I have tried to find if a similar Q has already been posted on the forum, but did not find one.

I wanted to know if it would be possible to plot the trajectory identified by LAT and LON, on the map. 
Say for example, the path flown by an aircraft between two places. I have got with me the LAT and LON of the Aircraft at equal intervals of time and I now want to be able to plot the trajectory by connecting these LAT and LON, on a map.
If this is possible, then I wanted to know how?

Kindly let me know if you need any further information in this regard.

Thank you very much in advance.

Rossko

unread,
Feb 4, 2013, 2:38:15 PM2/4/13
to kml-suppor...@googlegroups.com
If you wanted to create a KML file of your trajectory, you could put your coordinates into a Linestring.  See "Path"

Sridhar Mantha

unread,
Feb 9, 2013, 11:31:29 AM2/9/13
to kml-suppor...@googlegroups.com
Hello Rossko,

Thank you very much for your reply.
I did create a KML file and use the linestring to draw a trajectory on the map connecting the LAT and LON.
I shall get back in case I have any further queries in this regard.
Once again, thank you very much.

Sridhar Mantha

unread,
Feb 12, 2013, 12:33:17 PM2/12/13
to kml-suppor...@googlegroups.com
Hello Rosko,

I am facing an issue with plotting the trajectory by connecting the LAT LONs using the Linestring feature in the KML file.
What I have noticed is, that when I look up the LAT LONs individually on Google Maps or Earth, they point to the correct location.
However, when I put in the same coordinates into the KML file under the coordinates tag, they are not marked correctly on the Google Earth map.
For example, the LAT LON of Mumbai is correctly pointing to Mumbai on the map, when viewed individually. 
However, when I try to connect Mumbai and Delhi with the LAT LON entered in the KML file, the trajectory does not appear to be connecting these two places.

Any inputs on addressing this would be greatly helpful..
Thank you very much in advance.

Best regards,
Sridhar Mantha

Rossko

unread,
Feb 13, 2013, 8:43:30 AM2/13/13
to kml-suppor...@googlegroups.com
For example, the LAT LON of Mumbai is correctly pointing to Mumbai on the map, when viewed individually. 
However, when I try to connect Mumbai and Delhi with the LAT LON entered in the KML file, the trajectory does not appear to be connecting these two places.
 
Why, where does it go instead?
You must put your coordinates the correct way round for KML

Sridhar Mantha

unread,
Feb 13, 2013, 1:02:32 PM2/13/13
to kml-suppor...@googlegroups.com
Hello Rossko,

I am trying to plot a trajectory using a couple of LAT LONs around Kuwait city. 
The individual LAT LONs correctly point to the location near and around this place. However, when I try to put them in a KML and plot a trajectory, the plot is shown to be somewhere near Ukraine. 
I have put the coordinates in the KML as described in the below link you have asked me to refer. I am not sure what exactly I am missing.
I have attached the sample KML file for your reference. 
Any inputs on what I am doing wrong would be greatly helpful.

Thank you very much again in advance.

Best regards
Sridhar Mantha
sample_path.kml

GTrek

unread,
Feb 14, 2013, 3:42:12 AM2/14/13
to kml-suppor...@googlegroups.com
Hi,

You have got the Lat's and Lon's the wrong way round. The latitude (N/S) is first then the longitude(E/W) then the altitude.

Regards
John
www.gtrek.co.uk

Sridhar Mantha

unread,
Mar 3, 2013, 6:47:58 AM3/3/13
to kml-suppor...@googlegroups.com
Hello John, 

I have re-checked the data I have entered and it appears to me that the LAT and LON in the KML file are in the correct order (LAT first followed by LON).
Any further inputs on what is wrong with the data I have entered?

Best regards,
Sridhar Mantha
Message has been deleted

GeoMorgan

unread,
Mar 4, 2013, 2:54:42 AM3/4/13
to kml-suppor...@googlegroups.com
Hi John and Sridhar,
KML coordinates are always in XYZ order. So when using a geographic coordinate system that would be Longitude(x), Latitude(y), and elevation(z).
Regards,
Morgan

miggy

unread,
Mar 4, 2013, 3:35:15 AM3/4/13
to kml-suppor...@googlegroups.com
Hi Sridhar and John,

Morgan is correct.

I switched the coordinates around and the string now starts in Kuwait and goes north...
LATLON terminology is confusing because it is coded as LON,LAT,ALT.
Google XML reference is inconsistent in places (cf LineString and LinearRing).
The definitions are correct, but the descriptive text isn't consistent..
regards,
miggy

Sridhar Mantha

unread,
Mar 4, 2013, 7:14:49 AM3/4/13
to kml-suppor...@googlegroups.com
Hello Miggy, Morgan and John

Thank you very much for your inputs.
With the corrected order (LON, LAT and ALT), I am now able to plot the trajectory correctly.
I shall keep posting here about my progress.

Once again thanks very much.

Best regards
Sridhar Mantha

GTrek

unread,
Mar 7, 2013, 2:08:22 PM3/7/13
to kml-suppor...@googlegroups.com
Hi Guys,

My mistake it is LON (x) ,LAT(y) ,ALT(z) in that order. Altitude is optional and there should be no spaces. I don't know how I could have got that wrong, off day !!.

Regards

John
www.gtrek.co.uk

quoc thai nguyen

unread,
Mar 20, 2013, 6:30:06 AM3/20/13
to kml-suppor...@googlegroups.com
khong duoc xoa bo ok ! from me nguyen quoc thai king son 29 year old !

Vào 02:08:22 UTC+7 Thứ sáu, ngày 08 tháng ba năm 2013, GTrek đã viết:
Reply all
Reply to author
Forward
0 new messages