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

    [Plugin] KML LineString Importer

    Scheduled Pinned Locked Moved Plugins
    5 Posts 3 Posters 11.8k 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

      Hello,
      there is always the first time. So today, I publish my first ruby script πŸ˜„ .

      GPS devices are capable of tracking paths and saving the tracks as Google Earth KML or as other files like GPX (which can be converted to KML with Google Earth). KML files contain those tracks mostly as <LineString> (or gx:Track). This script imports LineStrings as curves, including their names and colors.


      Edit: This was the predecessor of KML Tools.
      It is now merged into KML Tools with lots of more features.

      importKmlLineString.rb

      Use:
      Eventually unzip KMZ files first to get the KML.
      'Menu' -> 'Plugins' -> 'Import KML LineStrings'
      Version: 1.0 (2011-03-27)

      I haven't used Ruby before (I started a draft in javascript) and I have to say Ruby is pretty cool. I only have not yet much experiences with modules/classes/etc. Maybe someone can have a look at the code and give me tips πŸ˜’ .

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        Aerilius, Do you know if it is possible to get Google Earth to include Z data when saving a KML file of a path?

        I created a couple of paths in GE and used the Save Places as... to export the paths then used your plugin to import them into Sketchup but in all casses the Z coordinates were 0.

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • GaieusG Offline
          Gaieus
          last edited by

          I have not used this plugin (yet) so Sam, what format does it import the paths? If it makes a set of connected edges, can't you just drape those onto your terrain?

          Gai...

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

            Have a look in the properties of the path (right-click on it in the left sidebar). On the "altitude" tab, I think the option "clamp to ground" is default. You may try to change it to "relative to ground" or "absolute".

            1 Reply Last reply Reply Quote 0
            • sdmitchS Offline
              sdmitch
              last edited by

              Gaieus - Yes it imports as a group of connected edges and could be draped on existing terrain but I was hoping to use the data to create terrain.

              Aerilius - Yes I tried most if not all of the Altitude options but none changed the Z output.

              Nothing is worthless, it can always be used as a bad example.

              http://sdmitch.blogspot.com/

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement