Results 1 to 12 of 12

Thread: How to unite several kml files into only one

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Question How to unite several kml files into only one

    Hi everyone, I hope you can help me with this issue...I have a process that donwload lots (I mean thousands) of kml files to my computer and, obviously, after downloading them I have to see them in GE. The thing is that my boss doesnt want to open one file at the time to see it, so I was wondering how I can make to take like, I dont know, 1000 kml and put it in a single KML file so at the end I just have to send my boss like 4 or 5 kml files (obviously heavy files) so he can see them faster. I't like 45000 kml files so the possibility of me opening one by one and then, in the GE, save them in a single kml would take too much time...is there another way?...please, it's really important to get this done....

    Regards

  2. #2

    Default

    Depends on a few factors.

    How big is each KML file? If they are large, then when you combine them you could end up with a single KML file that is too big for GE to open. If they are very very tiny, you might be able to get away with it. Do you want to open each one individually or open them all together? Again, same problem with size.

    Best way to do it is probably to create some sort of index that lets the user drill down and load only the KML file they want. That way you also don't overload GE. That takes a bit of programming. For example...here's one I did.

    http://www.gelib.com/maps/_NL/usgs-topographic-maps.kml

    This links to about 60,000 topographic maps, which is about 200 gigabytes. Each one is individual KMZ file. Use the index to find the one you want and load it.

    Here's another example...

    http://www.gelib.com/wp-content/uplo...09/gnis_nl.kml

    This one is about 6,500,000 placemarks broken down into 1,000s of tiles that cover the entire Earth. Each tile loads and unloads automatically as the user navigates around.

    These might be more extreme than what you need. Hard to say.

    So the short answer is....unless you have some knowledge of KML and some basic programming abilities, I don't think there is any easy way for you to do what you want. The other possibility is to go back to the source of your KML files and have them generate them differently. Not sure if that's an option.

    If you're interested in hiring someone to do the work for you, contact me here and I might be able to help. Probably wouldn't be very expensive.
    Matt Fox

  3. #3
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default

    Thnaks 4 your response Forkboy2,

    I'll tell you my scenario, every kml file weights like 4 kb, and the files that we used to send to my boss with all these kml files weighted like 15 Mg or so...obviously he didn't open them all at the same time and did not see all the areas at the same time, but now he HAS to be able to see all the kml from a single kml file, he can't be opening one by one because he doesn't know the areas,he just see an area that he finds interesting and that's it...imagine if he had to see every kml one by one until he gets one that he finds interesting...he wont be very happy to do that....I programm (.Net) so maybe if you give me some tips I cant make it work...in other words, he has to be able to chose what to see and what not to see in a Kml file...I hope you understand what Im trying to say...(my english is not that good)

  4. #4

    Default

    Since they are so small you might be able to get away with combining into one file. But I think you would have to somehow extract the code from each KML file and copy it all into a new KML file that contains all the code. There is a text Editor called UltraEdit, that I think might be able to do this with it's macro functions. But will probably be a bit tricky.

    Another option might be to use a program called Global Mapper. It might be able to load all 45,000 KML files, then export as a single KML file. Not sure.

    You can download a free evaluation version of Global Mapper. But it's about $300 to purchase.

    If you can send me 5 or 10 of the KML files, I can check to see if it loads them.
    Matt Fox

  5. #5
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default

    Hi Forkboy2, thanks again for your help. I've uploaded 5 files as you can see, I tried to put some more but it didn't let know and I dont know why...anyway...thanks for the tip of the software, Im gonna check it out...thank you so much for all the info...

    Regards
    Attached Files Attached Files

  6. #6
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default

    Quote Originally Posted by Forkboy2 View Post
    Since they are so small you might be able to get away with combining into one file. But I think you would have to somehow extract the code from each KML file and copy it all into a new KML file that contains all the code. There is a text Editor called UltraEdit, that I think might be able to do this with it's macro functions. But will probably be a bit tricky.

    Another option might be to use a program called Global Mapper. It might be able to load all 45,000 KML files, then export as a single KML file. Not sure.

    You can download a free evaluation version of Global Mapper. But it's about $300 to purchase.

    If you can send me 5 or 10 of the KML files, I can check to see if it loads them.
    Hey Forkboy2..I was testing the Global Mapper to find out how I could put some of my kml files into one single kml and this is what I got (check the attached file). Is that what you meant or am I doing something wrong? Thanks in advance!

    Regards
    Attached Images Attached Images

  7. #7

    Default

    It should work. I tried it with the 5 sample kml files. See attached. Did you use the free or paid version of Global Mapper? The free version might not do it as it has many limitations. If you have pro version, you might not be doing it correctly. If you do a lot of GIS work involving Google Earth, Global Mapper would probably be good investment.

    If you decide to buy, please download Global Mapper trial version from the link I provided before (I get referral fee).
    Attached Files Attached Files
    Matt Fox

  8. #8
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default

    thanks, its working fine!! ... Although, when the information of a place is displayed there is one detail that it's not seen wich is the name of the place, but that can be ignored...thanks for all the help...

    Regards,.

  9. #9
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default Global Mapper "eats" the first line of information in each KML I load in the program

    Hi, I dont know why the program doesn't show the first piece of information of any place. When I download any file and open it in GE it does show all the information but when I load it in the Global Mapper and Export it to KMZ it shows all the information but the first line wich is the the name of the place Im pointing. I thought this wouldn't be a problem but now they are asking me why is this? ... Can you help me on this please...Im using Global Mapper v10.02 and I follow this steps to save the workspace with .kmz extention:

    File-->Export Vector Data-->Export KML/KMZ...

    In the openig window I only check the Display Labels for Area and Line Features

    The rest remains the same.

    HOpe you can help.

    Best Regards

  10. #10

    Default

    Try this.

    Select overlay on Overlay Control Center
    Click Options
    Select Feature Types Tab
    Select the radio button that says Use Selected Attribute Value for Name
    Then select the attribute you want to show up.

    I think that will work...but that's for Version 11. Not sure about 10 as 11 had many improvements to KML handling.
    Matt Fox

  11. #11
    Junior Member
    Join Date
    Apr 2010
    Posts
    7

    Default Not working

    Hi Forkboy2, it doesn't work...I changed my version and nothing happens...Im sending you the same kml's I sent you before and if you open them without using the global mapper, you will see that the first line of information is the name of the place and it's there! but if you use it and after that you open them with the GE you'll see that that line is gone...hope you can see what Im doing wrong...

    Thank you so much, your help has been saving me

    Quote Originally Posted by Forkboy2 View Post
    Try this.

    Select overlay on Overlay Control Center
    Click Options
    Select Feature Types Tab
    Select the radio button that says Use Selected Attribute Value for Name
    Then select the attribute you want to show up.

    I think that will work...but that's for Version 11. Not sure about 10 as 11 had many improvements to KML handling.
    Attached Files Attached Files

  12. #12

    Default

    It looks like the html in the name tag is causing it to fail.

    Change
    Code:
    <name><span style='color:SteelBlue'>Nombre:IZCUCHACA 5</span></name>
    To:
    Code:
    <name><Nombre:IZCUCHACA 5</name>
    And it appears to work.

    You'll either have to manually edit all the files, or perhaps go to the Global Mapper support forum and post in the Report Bugs forum. The developer might fix it. He is usually very responsive.

    Matt
    Matt Fox

Posting Permissions

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