Results 1 to 5 of 5

Thread: Newbie looking for advice on kml

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    3

    Default Newbie looking for advice on kml

    Hi, I need to create a Google Earth layer (kml) that shows a number of places dispersed globally, which are linked by lines of different colours. For example, a map showing an airport and where it flies to.

    Where can I get hold of sample code? What is the correct method for doing this? Is it Paths? I have created basic kml before, and looked at the tutorial on paths from google but it is far too basic I think.

    I appreciate any help you can give me - I know these forums can be a great help and this one looks like it might be the business!

  2. #2

    Default

    If you just want straight lines between 2 points, that should be easy to do using paths. Not sure what format your source data is in, but it should be possible to create the code automatically from a spreadsheet or database if you have lots of data to process.
    Matt Fox

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    3

    Default

    Quote Originally Posted by Forkboy2 View Post
    If you just want straight lines between 2 points, that should be easy to do using paths. Not sure what format your source data is in, but it should be possible to create the code automatically from a spreadsheet or database if you have lots of data to process.
    I havent begun compiling the kml yet. I will be starting with a list of addresses, and from that I will need to geocode (the easy bit), and then work out which location connects to another, and have a path between those.

    Any advice would be welcome. It could be a few hundred locations.. so automated solutions are most welcome!

  4. #4

    Default

    I guess you have two options to organize the data.

    1) Each location would have 1 path that would go back and forth between all the other locations it connects to (A-B-A-C-A-D-A-E-A)

    2) Each path would be a single pair of locations. (A-B, A-C, A-D, A-E)

    There are probably many ways to create the code automatically. I use a program called UltraEdit quite a bit for this kind of thing. It's a text editor that has fairly powerful macro capabilities. For example if you had a text file with

    A-B
    A-C
    A-D
    B-F
    B-G

    It could wrap pre-defined kml code around each of those data points. That kind of thing. I also sometimes use Excel table with Word Mail Merge function.

    Matt
    Matt Fox

  5. #5
    Junior Member
    Join Date
    May 2009
    Posts
    3

    Default

    Thanks for the advice all. I have succeeded to create my map. The only thing I need is some way to automate the process but I think I will be OK.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •