Announcement

Collapse
No announcement yet.

real time loading of KML datafiles

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • real time loading of KML datafiles

    Hello all:

    I have a program that generates kml files on the fly and saves them individually into a temp directory on my local drive. I'd like WW to be able to read and display the kml files as they are generated. I have only been able to get WW to load the first file after it's generated, but subsequent files that are saved in the directory are not loaded automatically. I have attached the kml file that is being generated by the other program (which generates kml's for GE). If these klm files could be loaded into a layer sequentially as they are generated, that is my goal.

    I think WW needs a xml file that instructs WW to read the files as they are generated.

    I hope someone can either write the routines to do this or point me in the right direction.

    many thanks, steve, k6sgh
    Attached Files
    Last edited by k6sgh; 04-08-2007, 07:03 PM.

  • #2
    KML Importer can read most of the simpler and well formed KML Files directly.If the file has a .kml or .kmz extension you can drag and drop it into World Wind. You would sound more knowledgeable and up to the game if you referred to file properly as KML instead of KLM(the Dutch Airlines).
    Coding This and That in World Wind and helping new people out, as long as they don't pester too much.
    Currently blogging at: http://whatnicklife.blogspot.com
    Working at:
    Aerometrex - http://aerometrex.com.au/blog/
    Impact so far:


    Comment


    • #3
      oh, right...kml (dyslexia?). I used the kml importer to open the first file, but it doesn't open the subsequent files that are generated, about 1 a minute. is there a switch or some code that will make it continuously open the kml files that are generated by my other program?

      Comment


      • #4
        It can't magically read your mind and know to automatically open all kml files that appear on your PC.

        Comment


        • #5
          i only want it to open the specific kml files in a particular directory. the only magic i am asking about is how to create the instructions for it to open the specific files.

          Comment


          • #6
            I'd suggest putting the files behind a web server and offering up the most recent kml at any time. Then load the KML as a network link with a refresh rate of 1 minute. If you want to go back and open a previous file you could navigate to it through to load dialog box.
            James

            Comment


            • #7
              How do I do a network link

              My kml file is on my server eg.

              http://myserver.com/mystuff.kml

              How do I get World Wind to refresh the kml file every X mins. This works fine in Google Earth.

              bayley@_no_spam.purplefinder.com

              remove the _no_spam to reply

              Many thanks.
              James

              Comment


              • #8
                Most people here wouldn't reply to an email address.

                Anyway, do like:
                Code:
                <?xml version="1.0" encoding="UTF-8"?>
                <kml xmlns="http://earth.google.com/kml/2.1">
                <NetworkLink>
                	<name>Things</name>
                	<open>1</open>
                	<Url>
                		<href>http://192.168.0.1/kml_producer.php</href>
                		<refreshMode>onInterval</refreshMode>
                		<refreshInterval>2</refreshInterval>
                	</Url>
                </NetworkLink>
                </kml>
                Machine. Unexpectedly, I’d invented a time
                - Alan Moore

                Comment


                • #9
                  Does WW provide any mechanism for KML fragments to be received on the fly via COM? I am asking because I would like to do some real time display of airplanes in WW, and I'm concerned that my KML file will get too large and things would get bogged down if I keep adding to it.

                  Thanks.

                  Comment


                  • #10
                    I think you could display a lot of airplanes before the data would bog down. Where are you getting your positioning data for the planes? Are you just using icons to indicate the aircraft, or something more complicated? We have a tracker spitting out KML to display aircraft positions on either GE or WW and it can handle several thousand aircraft at one time with no problems...

                    Comment


                    • #11
                      I'm the unregistered above.

                      Using icons to represent the aircraft is fine. I wasn't even aware that there was anything more complicated.

                      My situation involves about 20 updates per second. Is that a comparable load to what you put on WW with "several thousand aircraft at one time"?

                      Thanks.

                      Comment


                      • #12
                        1 update about 500 tracks about 10 times a second via a plugin. I get about 15-20 FPS.

                        Updating faster than the eventual frame rate doesn't do you much good.

                        I'm just using 10/sec as a test. Eventually, I'm moving it back to 1/sec or 1 update every couple seconds.

                        Originally posted by VPiattelli View Post
                        I'm the unregistered above.

                        Using icons to represent the aircraft is fine. I wasn't even aware that there was anything more complicated.

                        My situation involves about 20 updates per second. Is that a comparable load to what you put on WW with "several thousand aircraft at one time"?

                        Thanks.

                        Comment


                        • #13
                          Hi, I'm going to revive this topic a bit. I've just downloaded WW and gone through many of the examples but I am still lost on how I can update a previously read KML, it would seem that the KML viewer will make a new layer if I attempt to reload the KML manually. the last two posts concerning fast updates using COM, as I'm looking to get about 4 updates a second. Concerning the network link, which xml file would I edit to add that to? I'm sorry I am very lost as how to even get started.

                          Comment


                          • #14
                            Originally posted by BrayB View Post
                            Hi, I'm going to revive this topic a bit. I've just downloaded WW and gone through many of the examples but I am still lost on how I can update a previously read KML, it would seem that the KML viewer will make a new layer if I attempt to reload the KML manually. the last two posts concerning fast updates using COM, as I'm looking to get about 4 updates a second. Concerning the network link, which xml file would I edit to add that to? I'm sorry I am very lost as how to even get started.
                            I have the same question. I need to update KML layer loaded as a plain KML from external server. The solution I have by now delete current layer from WWJ layerModel and load all over again. is it any other solutions? Please, help!

                            Comment

                            Working...
                            X