• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

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

Scheduled Pinned Locked Moved Plugins
137 Posts 49 Posters 124.3k Views
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.
  • A Offline
    Aerilius
    last edited by Aerilius 15 Jun 2011, 22:15

    This Plugin allows to import and export KML files (Keyhole Markup Language) into Sketchup. SketchUp's current capabilities of KMZ do not go beyond Collada models. These tools fill this wide gap and make it possible to bring almost any feature from Google Earth to SketchUp and back.

    Warning: This is not actively developed until I get time to actively develop it. Any type of contributions welcome!

    Beta version. Please help testing!
    It is intended to be a bridge between Google Earth and SketchUp for people who need it, but it does not want to be a full-fledged KML editor since Google Earth itself has a very capable integrated editor.
    Many geo information agencies provide geo-referenced data like building footprints or ground overlays in KML format, and most GPS devices create tracks in KML format that can be used as a basis for modeling. On the other side, it's now also easier to create and edit animated content for Google Earth.

    Stable version:
    Installation: Unzip and place "kmlTools" and "kmlTools.rb" into the SketchUp/Plugins folder. [previous downloads (since 1.4d): 1367]

    Version: 1.4.12

    Date: 25.05.2013

    Requirements:
    SketchUp 7.0 – SketchUp 2013 (not SketchUp 2014)
    Dynamic Components enabled

    Supported features:
    <Model>, <Multigeometry>, <Polygon>, <LineString>, gx:Track, <Point>, <GroundOverlay>, <PhotoOverlay> (only GE→SU), <Camera>, <LookAt>, gx:Tour, <TimeSpan>

    Usage:
    Plugins → KML Tools → Import KML File
    If you have a KMZ file (zipped KML), unzip it first. The importer cannot download files, so all ressources must be available locally and network links will be ignored. The result can be more accurate if you first import a big enough Google Earth Terrain via 'File → Geo-Location → Add Location'. Unfortunately KML files larger than ~200 kB can take very long to import.

    Either select specific groups/components to export or export all:
    Plugins → KML Tools → Export KML File
    The model must be georeferenced first, it is also beneficial to have a Google Earth Terrain ('File → Geo-Location → Add Location'). For each feature entities should be grouped, but groups should not be nested. A dialog will pop up which shows as which features the entities in the model can be exported. The resulting KML file (and its accompanying folder) can be loaded into Google Earth, tweaked, enhanced and saved as a single KMZ file.
    Export options dialog (maximum available options). The same features can be imported (but there is no import dialog necessary).

    Plugins → KML Tools → Add Timespan to entities
    Allows to add/edit timespan attributes. These attributes are used for example by the Google Earth timeslider. This allows to animate building structures over time (historic or future state). Select groups or components and choose a begin and end date (or type the date in this format: yyyy-mm-ddThh:mm). 'Preview' will open a simple time slider to preview the changes.

    GE-SU.jpg
    History:
    version 1.4.12: 25.05.2013

    • small change for comatibility with SketchUp 2013
      version 1.4.11: 21.07.2012
    • fixed support for pairs of 2 instead of 3 coordinates
      version 1.4.10: 01.06.2012
    • fixed materials.remove that is only available in SU8M1+
    • fixed empty points in polygon import
      version 1.4.9: 29.04.2012
    • fixed hangup when importing linestrings
      version 1.4.8: 09.02.2012
    • fixed broken filepath with component export
    • fixed orientation of components (reversed tilt angle)
      version 1.4.6: 02.02.2012
    • fixes for round_to method
      version 1.4.5: 28.01.2012
    • fixes for elevation import
      version 1.4: 10.09.2011 Note: Delete old "kmlTools_loader.rb"
    • various fixes (hang at styles import)
    • support of <StyleMap> added
    • registered as SketchupExtension
    • registered as importer (now available in 'File' -> 'Import'...)
      version 1.3b: 22.07.2011
    • various fixes in timeslider and timespan dialog
    • fix in kmlImport to remove nil elements from array (line 737 etc.)
      version 1.2: 22.06.2011
    • time slider added
    • dependency on IE8 removed
    • typos fixed
      version 1.1: 16.06.2011
    • groundoverlay: texturewriter doesn't distort images anymore
    • wrong date in date picker on Windows fixed
    • errors in older SU versions fixed
      version 1.0: 15.06.2011
    1 Reply Last reply Reply Quote 0
    • P Offline
      pilou
      last edited by 15 Jun 2011, 22:18

      Cool work! 👍

      Frenchy Pilou
      Is beautiful that please without concept!
      My Little site :)

      1 Reply Last reply Reply Quote 0
      • L Offline
        lexmonteiro
        last edited by 16 Jun 2011, 13:05

        First I would like to thank you for the plugin, will be very useful!
        I try to make it work in SU 7.1 and 8 (both free) but when I try to import a kml it stops on "progress " Fetching elevation data from ...
        I click in ... and nothing happens, can you help me? I do not know if the problem may be related to my default browser that is Google Chrome... ❓ ❓

        1 Reply Last reply Reply Quote 0
        • A Offline
          Aerilius
          last edited by 16 Jun 2011, 19:09

          Hello lexmonteiro,
          the default browser doesn't matter because SketchUp always uses the operating systems browser (IE/Safari) 😉 .

          That error could mean that the webdialog didn't receive commands from SketchUp. Can you please try it with the new version again? If it doesn't work, can you open the Ruby console while running the plugin and post what you it says?

          1 Reply Last reply Reply Quote 0
          • L Offline
            lexmonteiro
            last edited by 17 Jun 2011, 18:21

            @aerilius said:

            Hello lexmonteiro,
            the default browser doesn't matter because SketchUp always uses the operating systems browser (IE/Safari) 😉 .

            That error could mean that the webdialog didn't receive commands from SketchUp. Can you please try it with the new version again? If it doesn't work, can you open the Ruby console while running the plugin and post what you it says?

            I try it, and got some progress, but it stucks in the next screem:


            kmltools.jpg

            1 Reply Last reply Reply Quote 0
            • A Offline
              Aerilius
              last edited by 17 Jun 2011, 20:11

              I cannot reproduce the problem. Are you using an older browser than Internet Explorer 8 (it needs version 8)?
              If it happens although you have IE8/IE9, maybe you can eventually PM me the kml file?

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by 18 Jun 2011, 07:00

                👍 👍 👍

                Great, thanks Aerilius! I am pretty sure this will be an invaluable tool for many people!

                Gai...

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bilianb
                  last edited by 20 Jun 2011, 08:31

                  Hi
                  Greetings from Bulgaria

                  i receive error on line 840: @model.pages.eachp - no method eachp for Sketchup::Pages.
                  It works with @model.pages.each

                  Have a nice day

                  1 Reply Last reply Reply Quote 0
                  • PixeroP Offline
                    Pixero
                    last edited by 21 Jun 2011, 07:24

                    I have the same problem as lexmonteiro (above).
                    IE 8 Windows 7 64bit. SketchUp 8 Pro.

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      lexmonteiro
                      last edited by 21 Jun 2011, 11:44

                      @aerilius said:

                      I cannot reproduce the problem. Are you using an older browser than Internet Explorer 8 (it needs version 8)?
                      If it happens although you have IE8/IE9, maybe you can eventually PM me the kml file?

                      😳 You're right, I'm using a previous version (IE7).
                      I've been using Google Chrome for so long that not even remember which version IE I was using ..
                      I'll update it and then put the results here.
                      Thank you!

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        Aerilius
                        last edited by 22 Jun 2011, 17:50

                        I had done more than a week testing and hadn't imagined that there still could be such issues.
                        Now I've uploaded a new version. I found a work-around to drop the IE8 requirement and fixed some more things. I hope it works this time.

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          lexmonteiro
                          last edited by 27 Jun 2011, 13:44

                          It works fine now, ie7 and SU 7.1 free!

                          Thank you! 👍

                          1 Reply Last reply Reply Quote 0
                          • ToboboT Offline
                            Tobobo
                            last edited by 5 Jul 2011, 09:50

                            Thanks very much

                            Toby

                            Philippians 4:13

                            I can do everything through him who gives me strength.

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              BillB1
                              last edited by 7 Jul 2011, 18:52

                              Hi there Aerilius.

                              You say
                              @unknownuser said:

                              it's now also easier to create and edit animated content for Google Earth

                              and I see there is a timespan option on the menu. Can you explain what this does and an example of how to use it?

                              Thanks

                              1 Reply Last reply Reply Quote 0
                              • 3 Offline
                                3dworks
                                last edited by 15 Jul 2011, 11:01

                                is this working with SU version 8 on mac or is there another solution in the meantime? what i'm missing in SU 8 is the ability to batch capture a sequence of aligned terrains. the frame tool in SU8 is making a manual selection of an area around an already captured terrain very difficult. anyone?

                                cheers

                                markus

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  marktonium
                                  last edited by 18 Jul 2011, 21:24

                                  Might be a silly question, but here it goes.

                                  Is it possible to completely remove the entire process of downloading elevation data? I do not need it, as I am using the drape tool with the files, and can manually georeference the KML files.

                                  I've tried deleting that portion of the code, but I know nothing about Ruby, so I really don't know what I'm doing.

                                  Thanks.

                                  This tool is exactly what I needed by the way, thanks for the development!

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    Aerilius
                                    last edited by 19 Jul 2011, 11:45

                                    I think it should assume an elevation of 0 if it can't connect to the internet. So you could disconnect from the internet and after using the tool you can reconnect again. Tell me if that solves it 😉

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      marktonium
                                      last edited by 19 Jul 2011, 17:19

                                      Looks like that part of the script is working now (I re-downloaded the files, maybe they were/are corrupted for me).

                                      I am getting the following error now, though:

                                      no JSON returned (which I'm expecting)
                                      Error: #<NoMethodError: undefined method []' for nil:NilClass> ...kmlTools/kmlImport.rb:737:in points_to_plane'
                                      ...kmlTools/kmlImport.rb:737:in each' ...kmlTools/kmlImport.rb:737:in points_to_plane'
                                      ...kmlTools/kmlImport.rb:320:in polygon' ...kmlTools/kmlImport.rb:205:in run2'
                                      ...kmlTools/kmlImport.rb:205:in eachp' ...kmlTools/kmlImport.rb:632:in each_with_index'
                                      ...kmlTools/kmlImport.rb:632:in each' ...kmlTools/kmlImport.rb:632:in each_with_index'
                                      ...kmlTools/kmlImport.rb:632:in each' ...kmlTools/kmlImport.rb:205:in run2'
                                      ...kmlTools/kmlImport.rb:176:in each' ...kmlTools/kmlImport.rb:176:in run2'
                                      ...kmlTools/kmlImport.rb:114:in fetch_alt' ...kmlTools/kmlImport.rb:109:in call'

                                      Thanks again.

                                      Mark

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        Aerilius
                                        last edited by 22 Jul 2011, 14:44

                                        @marktonium said:

                                        I am getting the following error now, though:

                                        Hi Mark,
                                        I have fixed something that could have caused this error in line 737. After reading the kml file, the plugin could have come across some unexpected (empty) elements. Can you check if it works now?

                                        1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          Aerilius
                                          last edited by 22 Jul 2011, 14:53

                                          @3dworks said:

                                          is this working with SU version 8 on mac or is there another solution in the meantime?

                                          Hi 3dworks,
                                          It is not yet tested on mac, but it shouldn't contain anything specific that doesn't work on both platforms.

                                          @3dworks said:

                                          [...] the ability to batch capture a sequence of aligned terrains.

                                          That's probably not in the scope of this plugin, but it's a question that many people ask. Technically it is not possible to do the batch part automatically (because one had to interfere with the Add location tool in a way that is impossible), but one could imagine a tool that helps to perfectly align the selection rectangle to the previous terrain.

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

                                          Advertisement