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

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby JClements » Wed Mar 21, 2012 3:53 pm

I see that the plugin is only importing the coordinates as labels with a leader, but is not adding a Construction Point to the tip of the leader; thus, you can not snap to the tip of the leader with any of SU/s drawing tools.

The import function of this plugin would have to be modified to have an option to do this.

PERHAPS THERE ALREADY IS A SCRIPT TO ADD CONSTRUCTION POINTS TO THE TIPS OF LEADERS?
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby TIG » Wed Mar 21, 2012 5:52 pm

Perhaps
Code: Select all
  if !description.nil? && !description.empty?
    context.add_text description, c, [1,1,1]
  elsif !name.empty?
    context.add_text name, c, [1,1,1]
  else
    context.add_cpoint c
  end
needs to become
Code: Select all
  if !description.nil? && !description.empty?
    context.add_text description, c, [1,1,1]
    context.add_cpoint c
  elsif !name.empty?
    context.add_text name, c, [1,1,1]
    context.add_cpoint c
  else
    context.add_cpoint c
  end
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby schoobie » Sat Mar 24, 2012 1:32 pm

Questions:

1. And how do I convert labels to construction points?

2. Where do I insert the code TIG is suggesting?

3. I have imported in the past fro GE to SU with this plugin and do not remember having this issue.
0

schoobie 
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby TIG » Sat Mar 24, 2012 2:57 pm

schoobie wrote:Questions:

1. And how do I convert labels to construction points?

2. Where do I insert the code TIG is suggesting?

3. I have imported in the past from GE to SU with this plugin and do not remember having this issue.
1. The code changes adds cpoints at all labels.
2. Search the script for the first set of code and add the extra lines context.add_cpoint c where shown...
3. ???
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby schoobie » Sun Mar 25, 2012 6:58 am

TIG wrote:
schoobie wrote:Questions:

1. And how do I convert labels to construction points?

2. Where do I insert the code TIG is suggesting?

3. I have imported in the past from GE to SU with this plugin and do not remember having this issue.
1. The code changes adds cpoints at all labels.
2. Search the script for the first set of code and add the extra lines context.add_cpoint c where shown...
3. ???


Wow, thanks!
Quite simple, but very impressive!
0

schoobie 
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby JClements » Sun Mar 25, 2012 5:57 pm

Thanks TIG for helping out.
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby dawrightau » Wed Apr 25, 2012 10:09 pm

Hi

This is a great tool thank you. I am using it to import contour lines but am having an issue with failing to import all data with more detailed contours (ie 1 metre contours for a small area).

The KML file containing contours is only 152 k but when using the plug in fetches elevation data and then imports about 1/3 of the contour lines but then it hangs on a dialog title "Progess" importing linestrings which is all in blue and no further data is imported.

Is this a size / number of entities / memory limitation? Even though detailed it is not huge.

Any help would be appreciated.

Thanks regards

David
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.8) — updated 09.02.2012

Postby dawrightau » Fri Apr 27, 2012 12:17 am

TIG Thanks for your PM reply :

I know of no size limit.
Are you sure Sketchup has hung and not just slowed down?
What does the Task Manager show ??

TIG

-------

Re your questions :

Sketchup doesnt seem to have "Stopped responding" according to the task manager.

The first third of the contours come in quickly. After trying a couple of times I left it sit for a couple of hours but no further activity other than a blue progress bar sitting at 100%.

I did find a suggested size kml file limit of not much more than 200KB, otherwise Sketchup will go very slowly.

I have attached the file in question.

For other forum members interest, I also found another tool to import shapefiles into sketchup at the following URL :

http://www.strategis.nl/StrateGisSoftwa ... etchup.zip

This imports all the contours from a shapefile into sketchup in instant (which suggests to me the KML file shouldn't be too big for sketchup).

However unlike KML Import, GIS Shape Importer does not georeference the contours or group individual contours with the elevation height as the group name. GIS Shape Importer as the name suggests also cannot export to shapefiles whereas KML Import can export as well. These features in KML Import are nice features which allows automation of height adjustment of the contours to create a tin file and export the elevated contours as well.

Unfortunately because of the import problem I cant use KML import for this at the moment so am doing it all painfully / manually. However at least with GIS Shape importer I am able to progress in the meantime.

If anyone can test my file and see if they are getting the same problem and suggest a solution that would be much appreciated.

Regards

David
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.8) — updated 29.04.2012

Postby Aerilius » Sun Apr 29, 2012 9:11 pm

Hi,
I found the problem and fixed it. Thanks for attaching the file with which the problem occured.

Importing big kml files can be slow because they are in xml format and there is no efficient way in SketchUp/Ruby to do it faster. I think shapefiles are in a binary format, so if there is a direct importer it could be faster.
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby dawrightau » Mon Apr 30, 2012 6:49 am

Hi Aerilius,

Thanks for getting back to me.

Glad you were able to fix it but how do I get access to the fix?

I checked the plugin download site and the date of the download plugin file is

3/07/2011 7:05 PM

Be grateful to get this working.

Thanks again.

Cheers

David
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby Aerilius » Mon Apr 30, 2012 9:49 am

Hi,
the first post of this thread has version 1.4.9 (29.04.2012). If it is also distributed on another site, then I don't have access to update it there.
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby dawrightau » Mon Apr 30, 2012 12:11 pm

Thanks Aerilus,

The update worked perfectly and immediately (essentially no delay).

For some reason I thought the official site was http://extendsketchup.com/plugins/kml-tools/

The logical spot as you say was at the beginning of this forum.

Thanks again.

Kind regards

David Wright
0

dawrightau 
 

Re: [Plugin] KML Tools - Importer and Exporter

Postby ulisessol7 » Sun May 27, 2012 5:17 pm

Aerilius wrote: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.

just wanted to say thank you so much for making this tool available

cheers from Mexico
0

ulisessol7 
 

Re: [Plugin] KML Tools - Importer and Exporter

Postby Gaieus » Sun May 27, 2012 5:18 pm

ulisessol7 wrote:just wanted to say thank you so much for making this tool available...

:thumb:
0
User avatar
Gaieus 
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby dawrightau » Wed May 30, 2012 7:44 am

Hi Again Aerilus

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

The ones that work have elevation data generated when they are created.

I tried importing a simple kml file with no elevation data and I get a white dialog box progress and no progress (please see hayrack boundary.kml)

I added 10 m vertices to the polygon and added elevation data to them and now get a dialog box with 50% progress where it stops (please see hayrack boundary with elevation.kml)

Any assistance would be appreciated.

Regards

David




dawrightau wrote:Thanks Aerilus,

The update worked perfectly and immediately (essentially no delay).

For some reason I thought the official site was http://extendsketchup.com/plugins/kml-tools/

The logical spot as you say was at the beginning of this forum.

Thanks again.

Kind regards

David Wright
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby thomthom » Wed May 30, 2012 9:37 am

I got an KML file I'm trying to import, but I'm getting errors:
Code: Select all
fetching elevation from url: http://api.geonames.org/astergdemJSON?formatted=true&lat=63.430509&lng=10.395091&username=aerilius&style=full&callback=returnJson
kmlImport.rb: geonames returned 6
Error: #<NoMethodError: undefined method `[]' for nil:NilClass>
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:758:in `points_to_plane'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:758:in `each'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:758:in `points_to_plane'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:327:in `polygon'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:195:in `run2'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:655:in `eachp'
(eval):155:in `each_with_index'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in `each'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in `each_with_index'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:653:in `eachp'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:195:in `run2'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:175:in `each'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:175:in `run2'
C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/kmlTools/kmlImport.rb:151:in `fetch_alt'
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby Aerilius » Wed May 30, 2012 11:41 am

This plugin is unfortunately very error-prone because it was my second plugin and it uses RegExps to parse xml (I hope I find a better way to handle xml, rexml didn't prove to perform better). I'll take a look at this whern I'm at home!
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby thomthom » Wed May 30, 2012 11:44 am

You're using a webdialog for the import - you can use the XML parsing capabilities of the web-browser:
http://www.w3schools.com/xml/xml_parser.asp

If you use jQuery it's very simple:
http://stackoverflow.com/questions/6496 ... javascript
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby Aerilius » Wed May 30, 2012 12:14 pm

That sounds interesting. Javascript isn't the fastest either, but this strategy probably doesn't use the script language's string functions but the browser's compiled code.
I once ported the plugin (partly) to ReXML and ran performace tests (more reliable but 107% slower, ReXML is pure Ruby and I wanted to avoid gems). So I'll try it with this again.
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby thomthom » Wed May 30, 2012 12:23 pm

ReXML is one of the slowest XML solutions - but as you mention it's pure Ruby. The others require some binaries. I want a Ruby parser because some times I don't have a WebDialog UI for plugins that has use of XML.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby Aerilius » Wed May 30, 2012 11:59 pm

dawrightau wrote: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?
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby Aerilius » Thu May 31, 2012 12:18 am

thomthom wrote:I got an KML file I'm trying to import, but I'm getting errors

I'm not sure what causes this problem. It looks like one point of a polygon could not be parsed (nil) or a polygon has less than 3 points. Off the bat I would have tried:
Code: Select all
while a.length > 3 # replace line 754

Code: Select all
return if outerLoop.length < 3 # insert after line 311
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby dawrightau » Thu May 31, 2012 2:00 am

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?f ... 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?f ... 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 wrote:
dawrightau wrote: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?
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby dawrightau » Thu May 31, 2012 2:03 am

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

dawrightau 
 

Re: [Plugin] KML Tools (1.4.9) — updated 29.04.2012

Postby Aerilius » Thu May 31, 2012 11:13 am

dawrightau wrote: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).
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.10) — updated 01.06.2012

Postby Aerilius » Fri Jun 01, 2012 12:02 pm

I uploaded a new version!
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] KML Tools (1.4.10) — updated 01.06.2012

Postby dawrightau » Sat Jun 02, 2012 1:43 am

Thanks very much Aerilius I will give it a try.

Regards

David
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.10) — updated 01.06.2012

Postby dawrightau » Sat Jun 02, 2012 2:17 am

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
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.10) — updated 01.06.2012

Postby dawrightau » Sat Jun 02, 2012 2:39 am

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
0

dawrightau 
 

Re: [Plugin] KML Tools (1.4.10) — updated 01.06.2012

Postby banxee » Wed Jun 06, 2012 11:16 pm

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?
0

banxee 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: didiets and 10 guests

Visit our sponsors: