[Plugin] KML LineString Importer

[Plugin] KML LineString Importer

Postby Aerilius » Mon Mar 28, 2011 10:24 pm

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 :roll: .
0
Last edited by Aerilius on Fri Mar 01, 2013 2:55 am, edited 6 times in total.

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML LineString Importer

Postby sdmitch » Wed May 04, 2011 8:35 pm

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.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML LineString Importer

Postby Gaieus » Thu May 05, 2011 12:28 pm

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?
0
User avatar
Gaieus 
 

Re: [Plugin] KML LineString Importer

Postby Aerilius » Thu May 05, 2011 12:56 pm

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".
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML LineString Importer

Postby sdmitch » Thu May 05, 2011 6:18 pm

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.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: kimsw1978 and 6 guests

Visit our sponsors: