sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013

    Scheduled Pinned Locked Moved Plugins
    137 Posts 49 Posters 124.4k Views 49 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dawrightau
      last edited by

      Thanks for getting back to me Aerilius,

      I am using 1.4.9 being the version you updated to fix the part loading issue of mine in a previous post.

      There is an error in the ruby console. This is the ruby console messages for the harack boundary file :

      fetching elevation from url: http://api.geonames.org/astergdemJSON?formatted=true&lat=-30.4077328499&lng=152.0265933208&username=aerilius&style=full&callback=returnJson
      kmlImport.rb: geonames returned 1098
      Error: #<NoMethodError: undefined method remove' for #<Sketchup::Materials:0xbfba0e4>> C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:740:in color_to_su'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:738:in each' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:738:in color_to_su'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:607:in style' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:170:in run2'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:655:in eachp' (eval):48:in each_with_index'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in each' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in each_with_index'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in eachp' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:170:in run2'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:151:in fetch_alt' C:/Program Files/Google/Google SketchUp 8/Plugins/enjshape/shapes.rb:48:in call'
      C:/Program Files/Google/Google SketchUp 8/Plugins/enjshape/shapes.rb:48

      This is the ruby console message for the other file :

      fetching elevation from url: http://api.geonames.org/astergdemJSON?formatted=true&lat=-30.40773285&lng=152.026593321&username=aerilius&style=full&callback=returnJson
      kmlImport.rb: geonames returned 1098
      Error: #<NoMethodError: undefined method remove' for #<Sketchup::Materials:0xc11d030>> C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:740:in color_to_su'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:738:in each' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:738:in color_to_su'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:607:in style' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:170:in run2'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:655:in eachp' (eval):740:in each_with_index'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in each' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in each_with_index'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in eachp' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:170:in run2'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:151:in fetch_alt' C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:740:in call'
      C:/Program Files/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:740

      Hope this helps nut it out.

      Regards

      David

      @aerilius said:

      @dawrightau said:

      The plugin is working fine for some kml files but for some reason inst working with others.

      Hi David,
      I tried both files in a non-geolocated model and in a geolocated model (with terrain) and they both work for me (plugin version 1.4.6). I have no idea what could go wrong. When you open the Ruby Console before running th plugin, do there appear some error messages?

      1 Reply Last reply Reply Quote 0
      • D Offline
        dawrightau
        last edited by

        Also a question

        When one kml file (that imports ok) has been imported it is not possible to import another. A new instance of sketchup has to be opened to use the tool again.

        Is this how it is or should I be able to import multiple kml files, one after another?

        Thanks

        [quote="dawrightau"]Thanks for getting back to me Aerilius,

        I am using 1.4.9 being the version you updated to fix the part loading issue of mine in a previous post.

        1 Reply Last reply Reply Quote 0
        • A Offline
          Aerilius
          last edited by

          @dawrightau said:

          When one kml file (that imports ok) has been imported it is not possible to import another.

          This should not happen, one should be able to import any amount of kml files ninto the same model.

          I think I found the issue and have almost fixed it (I will finish and release an update this evening).

          1 Reply Last reply Reply Quote 0
          • A Offline
            Aerilius
            last edited by

            I uploaded a new version!

            1 Reply Last reply Reply Quote 0
            • D Offline
              dawrightau
              last edited by

              Thanks very much Aerilius I will give it a try.

              Regards

              David

              1 Reply Last reply Reply Quote 0
              • D Offline
                dawrightau
                last edited by

                Hi Aerilius,

                Billiant thank you.

                Just to let you know that I could import both kml files into the one session, both geolocted correctly.

                Regards

                David

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dawrightau
                  last edited by

                  Your kml import works so well.

                  Would you now consider creating a kmz import to import a geo located ongoing image.

                  It would in part be a matter of extracting the doc.kml file from the kmz zip file read the coordinates in the same way as you do now and then import the png file to that location.

                  Would be great functionality.

                  Could send you an example file

                  Cheers

                  David

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    banxee
                    last edited by

                    When I use the import, I get a 'Missing Textures- Unknown Texture' window. The model info comes in but no surfaces. The jpgs for the textures are in the Files folder of the KML but it can't seem to find it.

                    Am I missing a step?

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Aerilius
                      last edited by

                      This is an error message from SketchUp's Collada importer, not from my plugin (and I unfortunately can't do anything about it).

                      SketchUp supports a lot of the Collada standard (actually more than any other program) but not all. SketchUp doesn't understand how your source program specifies the textures. I have reported this as a bug some days ago.

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        If you open the main file in a plain-text editor like Notepad++.exe then it will be 'readable'...
                        See what the image-file parts says...
                        Logically it should be a simple file-name [image.jpg], so that if the image-file kept with the main file it will be found.
                        If it's a 'relative' file-path including a folder then you must keep the image-files in that specified folder [e.g. images/image.jpg] with the main file.
                        If it's an 'absolute' file-path [i.e. with a drive letter etc] then you need to recreate that exact same folder for those image-files [e.g. c:/temp/images/image.jpg].

                        When the importer runs on the main file it should then find the image-files where it's expecting them to be...

                        If the image-file names in the imported file bear no relationship to the actual image-file names you have, then you are in trouble - but even then you could try copying and renaming the image-files to suit, if you know which one is which that is... 😕

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          Aerilius
                          last edited by

                          Yes, TIG is right, that is the normal way to trouble-shoot plain-text file formats like Collada.
                          Here it's probably not a problem with the file path, but the xml structure is different ( %(#000040)[<effect><profile_COMMON><image>]) from what SketchUp expects ( %(#000040)[<surface>,<sampler2D>,<library_images>...]). I fixed this once manually, but it's so complicated that you wouldn't want to do do it with more than one or two files.

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            banxee
                            last edited by

                            Hi & thx for the quick reply.

                            I had tried opening the files in a text editor, thinking it was a pathing issue. I duplicated the path found in the text, but it still gave me the missing texture warning.

                            The difference in the XML structure seems to be the issue.

                            Oh well. At least I get the surfaces in the correct places.

                            Thanks again

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              biba28
                              last edited by

                              hi,
                              first thank you for this plugin it will help me a lot in my project,so I will make a 3D modeling of a city,
                              I have a shapefile I have converted to KML using gvSIG and now I want imported the kml file in google sketchup
                              I insert your plugin, but that nothing is imported 😞
                              I want to know if there is a structure ( balises or something) that I should add it to kml file for the import is correct.
                              please help me
                              yhank you for any help 😐

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                Aerilius
                                last edited by

                                The plugin tries to extract from kml files what it can import, so it does not aim to import all. Maybe you can pm me an example file so that I can take a look at it and adjust the plugin 😉

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Aerilius
                                  last edited by

                                  I fixed the issue and uploaded a new version. Thanks for reporting!

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    Anton_S
                                    last edited by

                                    Behold!!! Aerilius with mighty plugins approaches!! ☀

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      CochranRB
                                      last edited by

                                      I am new to SketchUp. I saved a GE path as KMZ and KML files, but SU will not import the KMZ. Your plugin may assist with this problem. How do I download it?

                                      1 Reply Last reply Reply Quote 0
                                      • TIGT Offline
                                        TIG Moderator
                                        last edited by

                                        @cochranrb said:

                                        I am new to SketchUp. I saved a GE path as KMZ and KML files, but SU will not import the KMZ. Your plugin may assist with this problem. How do I download it?
                                        The very first post in this thread has the tool's ZIP that you must download: then instructions on its extraction, installation and copious info on its usage... 😄
                                        It might not help, depending what the files contain...
                                        If you still have problems perhaps post the file here with a bit more info... 😕

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • Q Offline
                                          qpik
                                          last edited by

                                          First of all thank you for the plugin.

                                          Have I just found a possible bug in kmlimport.rb, linestring method, line 422 - "<tesselated>" instead of "<tessellate>"?

                                          I'm learning how to model a terrain using my mobile's GPS and Sketchup. Since the Symbian app I use (GPSmap, http://www.vikinggames.hu/product.php?id=7) logs only CSV/KML Waypoints and additionally uses commas instead of points, so I have to manually convert the values. I'm new to KML (and I'm not a programmer) so the easiest way I noticed so far was to just put all the coords into a <LineString> tag, but in Sketchup the altitudes are wrong (i.e. flat or clamped to GE terrain).
                                          So I just go through your code and KML documentation to find a solution.

                                          Edit: which is as simple as adding <altitudeMode>absolute</altitudeMode> inside <LineString> tag.

                                          1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            Aerilius
                                            last edited by

                                            That looks indeed like a bug! Thanks for reporting!

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 5 / 7
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement