[Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013
132 posts
• Page 1 of 5 • 1, 2, 3, 4, 5
[Plugin] KML Tools (2.0.0-beta) — updated 31.05.2013This 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! 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: 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. 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. 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 Last edited by Aerilius on Wed Mar 12, 2014 3:03 pm, edited 28 times in total.
Re: [Plugin] KML Tools - Importer and ExporterFirst 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... ![]() ![]() Re: [Plugin] KML Tools - Importer and ExporterHello 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?
Re: [Plugin] KML Tools - Importer and Exporter
I try it, and got some progress, but it stucks in the next screem: Re: [Plugin] KML Tools - Importer and ExporterI 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?
Re: [Plugin] KML Tools - Importer and Exporter![]() ![]() ![]() Great, thanks Aerilius! I am pretty sure this will be an invaluable tool for many people! Re: [Plugin] KML Tools - Importer and ExporterHi
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 Re: [Plugin] KML Tools - Importer and ExporterI have the same problem as lexmonteiro (above).
IE 8 Windows 7 64bit. SketchUp 8 Pro. Re: [Plugin] KML Tools - Importer and Exporter
![]() 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! Re: [Plugin] KML Tools - Importer and ExporterI 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.
Re: [Plugin] KML Tools - Importer and ExporterThanks very much
![]() Toby
Philippians 4:13 I can do everything through him who gives me strength. Re: [Plugin] KML Tools - Importer and ExporterHi there Aerilius.
You say
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 Re: [Plugin] KML Tools - Importer and Exporteris 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 Re: [Plugin] KML Tools - Importer and ExporterMight 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! Re: [Plugin] KML Tools - Importer and ExporterI 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
![]()
Re: [Plugin] KML Tools - Importer and ExporterLooks 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 Re: [Plugin] KML Tools - Importer and Exporter
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?
Re: [Plugin] KML Tools - Importer and Exporter
Hi 3dworks, It is not yet tested on mac, but it shouldn't contain anything specific that doesn't work on both platforms.
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.
Re: [Plugin] KML Tools - Importer and ExporterIt is hanging up on the "importing styles" when I try to import a Google Earth made .kml file, any thoughts? Your previous tool worked fine to import a simple ground tracing from a Google Earth .kmz file, is this new tool any improvement for this simple function? Thanks!
Re: [Plugin] KML Tools - Importer and ExporterHi,
the importing will probably be the problematic part of KML Tools because there is no simple and clean way in ruby to parse xml files and because kml files can occur in many different kinds. If you open the ruby console before starting the import, can you send me the error message (first lines of the error)? Or you can pm me the kml file so that it's easier to find the cause of the problem. If you refer to the KML linestring importer, this tool here is not limited to only "linestrings" but it's also ways more complex. So the simple tool is not a bad choice if it does the job sufficiently.
Re: [Plugin] KML Tools - Importer and ExporterWhy does this not work on international locations? My shapes are imported at strange sizes, occasionally with angles changed as well. Thoughts?
Re: [Plugin] KML Tools - Importer and ExporterWhat do you mean by "international locations"? (Are there "national locations"?
![]() Re: [Plugin] KML Tools - Importer and ExporterI've been looking around at the various ruby based importers for SketchUp and I see that no one uses the Importer class. If this class is used the importer can be found in the native import list which would be very nice.
http://code.google.com/apis/sketchup/do ... orter.html Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] KML Tools - Importer and Exporter
If you can tell me more details and send me an example file that does not work as expected, I can have a look at it. SketchUp documents can only cover an area of some kilometers, so one shouldn't import too distant places, otherwise SketchUp behaves very weird (navigation won't work properly, clipping occurs and shapes can look strange).
Re: [Plugin] KML Tools - Importer and Exporter
I had looked at it, but since no other plugin used it I had thought users would expect to find the importer in the Plugins menu. In general I like the idea of using existing standards, so I will add this in the next update. Especially that the Importer class also allows options dialogs (Importer.do_options) sounds promissing.
Re: [Plugin] KML Tools - Importer and ExporterI think the reason why no-one else has used it is because it's simply over-looked. Which is a pity as it'd help clean up the menus and integrates the ruby importers with the native ones.
(I kind of spammed the forum of the importers I could find... ![]() ![]() Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: [Plugin] KML Tools (1.4) — updated 10.09.2010But there isn't a corresponding exporter class. So if you did use the Importer class, the exporter would still need to go in the standard menus which would make the UI inconsistent.
Hi
Re: [Plugin] KML Tools (1.4) — updated 10.09.2010
True, this would do well as a feature request. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
132 posts
• Page 1 of 5 • 1, 2, 3, 4, 5
|
Who is online
Users browsing this forum: sharamaedizon and 14 guests