SketchUcation Plugin Store

 

 

[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: .
Please, register (free) to access all the attachments on the forums.
Last edited by Aerilius on Fri Mar 01, 2013 2:55 am, edited 6 times in total.
Aerilius
Top SketchUcator
 
Posts: 1123
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

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

http://sdmitch.blogspot.com/
User avatar
sdmitch
 
Posts: 617
Joined: Wed Mar 02, 2011 9:21 pm
Name: Sam
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: hobby
Level of SketchUp: Beginner

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?
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27622
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

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".
Aerilius
Top SketchUcator
 
Posts: 1123
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

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

http://sdmitch.blogspot.com/
User avatar
sdmitch
 
Posts: 617
Joined: Wed Mar 02, 2011 9:21 pm
Name: Sam
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: hobby
Level of SketchUp: Beginner

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Artisan Organic Toolset - a set of powerful organic modeling tools.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: boerenkool, cballtgh, dannykil, joerisowka, McGyver, melodyrees, theguguz and 9 guests