Can Sketchup 2018 import kml, kmz or gpx files

How are you making the comparison? A couple of years ago Google shut down the API by which SketchUp had been getting images and terrain and Trimble was forced to seek other sources for geolocation data. So, you can’t actually be comparing with Google Earth inside SketchUp.

I don’t know the spatial resolution or claimed accuracy of terrain height in these new sources, but that could contribute to a mismatch with the GPS data. It would be interesting to choose a location on the terrain in SketchUp, measure the altitude there in the model, and then take your phone’s GPS to the same location and see whether they agree. If they differ, it would be possible to project the track onto the terrain in SketchUp if that matters more to you than GPS accuracy.

A more technical possibility for the difference could be if the terrain data is height above sea level whereas GPS is height above the WGS 84 reference ellipsoid. That could happen if the new source is getting heights from a traditional map (which would be above sea level).

I am using SU 2018 with “Add Location”. I compared that with an old topo that I got when Google Earth was still the source. They are close but there are discrepancies. I saw one difference of 42’. Also, Google Earth imagery from one year to the next is not identical. I see horizontal displacements that are noticeable from one year to the next. I didn’t check how big those discrepancies are, but I would not be surprised by 40’ or more.

I don’t think the GPS elevations are highly accurate. I believe the horizontal coordinates are significantly more accurate than the elevation.

For my uses, I don’t really need the elevations. In fact, I was going to ask if anyone knows how to flatten the GPS tracks so that all the vertical coordinates are at the same elevation. i.e. that I have plan view of the track. Do you know an easy way to do that? Of course, visually I can get that with a top view and perspective turned off. But for drawing plans, I need all the points on the same horizontal plane.

That would be a trivial change to what I wrote.

Here’s a version that sets all track points to zero altitude.

SB_KML_Track_import_zero.rbz (3.8 KB)

1 Like

If you made the change, it would be good if it were possible to generate both flat and with elevation, or offer the option to choose.

I wouldn’t be using the elevation much as far as I can see right now, but it seems nice to have it.

As far as the discrepancy in elevation (i.e. sitting above the Google Earth terrain), for the moment, I would just move the track vertically down.

But, right now, I would only be using the flat version.

I think this is a really cool plugin that you have made.

It wouldn’t be hard to provide options for GPS height vs zero and for height units. I have just so far been treating this as a quick one-off while figuring out whether it works at all and seeing if anyone besides you is interested. So far it’s just us talking :wink:

I noticed today that when you geolocate a model, SketchUp puts the model origin point at the center of the imported region and sets the zero point of the model coordinates at the altitude of that center point. That’s going to make it messy to ever get heights accurately matched up because the absolute reference is lost!

I don’t know who else is interested. From my experience it is a very useful capability. I have worked on a number of rural projects and also some international ones. I can get GPS tracks in rural areas and almost any part of the world. I used this to get property boundaries, locations of special places or features, locations of roads, etc. It is a kind of low accuracy survey that you can get quickly and for no cost. It’s not so useful in an urban area where a discrepancy of 10’ is a serious problem. But for rural land, for rough surveys and preliminary site plans, it is very useful data. I did some projects many years back where I imported the GPS data to AutoCAD. But I have stopped using AutoCAD and have greatly missed that capability in SketchUp. I was recently doing a project for a rural village in Nepal. We had to track things such as the boundaries of a community forest, the river that supplied water, location of springs and the location of existing dwellings and roads. The only practical way for us to gather this information was from the GPS on a phone. I could gather all the data I mentioned in one day.

Several times in the past, I have asked if anyone knew how to transfer this information into SketchUp. Several other people said they were looking for the same capability. But also, if the capability were there, people might realize the usefulness of it.

I’m working on an RV park that was burned down in the Paradise fire. The engineer who is helping with this is going to use GPS to get location of utility hookups at each RV space. I don’t know how he is doing that. I believe he will use a special GPS system (not a phone). I think some surveyors use special broadcasters to get very accurate locations. In this case he is not looking for high accuracy. But whatever level of accuracy, being able to import to SketchUp is useful. This engineer uses AutoCAD.

Anyway, you’ve got at least one fan for the plug-in you did (me).

1 Like

Blockquote[quote=“slbaumgartner, post:23, topic:85885”]
Here’s a version that sets all track points to zero altitude.
[/quote]

Hi Steve,
I tried this version. It looks like the points are at different elevations (flatter than the previous version, but not all at the same elevation).

I might have confused something, because I had installed the previous version (with elevations) and didn’t uninstall it before installing this one. So I had both installed, but just the one menu item. However, it looks like it executed the new one.

Did you exit and then restart SketchUp? Sometimes it holds onto the previous version until you restart.

Let me know if that doesn’t fix it. I may have botched the preparation of the rbz.

I see a bug that would cause the points to be at a non-zero altitude, but they should all be at the same altitude. If you are still seeing uneven heights in the imported data, is it from the original file you shared or another? If another, can you share that one please?

My mistake. The routine works perfectly. I’m not sure how I messed up, but when I ran it again today, it worked perfectly.
Is it possible you could give it a different menu item so I could have both versions installed at the same time, and use the one that suits a particular task?

Sure. I have to go to a concert now so it won’t happen today, but that could be done fairly easily.

That will be fun to see. We’ll have 2 versions analogous to Google’s Location Snapshot, which is flat, and Location Terrain, which has elevations.

Here’s a version that adds a submenu “Import KML Track” to Extensions, with two items under it: “Zero Altitudes” and “Altitudes in Feet”.

SB_KML_Track_Import_combined.rbz (4.0 KB)

Nice. Thank you. Works beautifully.MapAppmm_pois_2019_02_20-18_11_44.kml (7.3 KB)

I was fooling with another GPS app on my phone. This one is focused on creating waypoints, rather than tracks. I tried importing the KML but nothing came through. I wonder why. I am attaching the KML. The KML displayed more or less correctly in Google Earth (actually, not all that I expected, but several of the waypoints show where they should).

Sorry for the delay, I saw this and then forgot!

This sample file captures data using entirely different kml elements than the track files. Since my importer was aimed tightly at just the elements used by the track files, it doesn’t find anything of interest in the new file. I’ll take a look and see whether anything sensible can be done to import this new file.

Edit: The file contains 6 “placemark” elements. Five of them have a label and a single point coordinate. These show as pushpins on GE, though three (labelled “End of silvercrest”, “Marker 4 corner of” and “Marker 6”) are so close together they get a single pin. The other (labelled “Marker 5”) has a “line string” containing 17 repeats of the same coordinates. I don’t know what that means, but evidently neither does GE as it displays nothing on the view.

Aside from the peculiar Marker 5, it wouldn’t be hard to import these as guide points. I suppose it would be useful to attach leader texts with the labels?

It would be neat if this new type of file could be read. Seems more complicated than I imagined. I thought any KML file would work.

It is possible to export KML files from Google Earth. I wonder if they are a different format is used by GE.

Here’s an extension to import placemarks such as in the sample file you provided. It puts a guide point at the coordinates of each placemark (at zero altitude - the sample doesn’t include heights) and labels it with a leader text containing the name followed by the description in parentheses from the placemark. I believe the name is what you enter when you capture a mark. I don’t know where the app gets the descriptions, as most of them were blank in the sample.

  • It offsets the text vertically by a height set arbitrarily at 25 feet. I haven’t thought of a clever way to choose the height so that it looks good.
  • If the placemarks are too close together, the texts all pile on top of each other making them illegible. Unless they are right on top of each other (like three of the ones in the sample file), zooming in on that location should separate them. It would be possible, but complicated, to adjust the heights to avoid this issue.

SB_kml_placemark_import.rbz (3.9 KB)

That’s great. I don’t see a problem with text height or location. That can be changed inside SketchUp. And it might occur in many different situations, so it would be probably impossible to come up with a size in advance that would work for all cases.
Now I feel guilty. I was hoping you wouldn’t get to that one so soon. I tried another GPS app, Gaia GPS, which creates both track and waypoints. And, more important, I created a track and waypoints in Google Earth. Google Earth tracks serve a different purpose. For me, the big deal about the phone apps is that you get track locations in the field (using the phone’s GPS), then come home and put them into SketchUp, and have Google Earth terrain/aerial photography there as well.
Anyway, the plug-in didn’t work with either of these. Maybe because they have tracks and waypoints in the same file. Also, don’t know if the Gaia app uses the same format at Google Earth or either of the other apps.
I’m attaching both files, in case you haven’t ODed on this topic.GoogleEarthTestKML2SketchUp.kml (3.8 KB)
GaiaNew Track 2_23_19 3_39_22 PM.kml (8.7 KB)

This a VERY useful plugin for me. Thanks a lot guys.