Exporting KML without points.

When exporting tracks from Basecamp as KML, the file includes both vector tracks and track points. These are separate within the KML and the tracks work as vectors if the points are deleted. 

The point though clog up QGIS the startup process when I have to load many of them in a project. My work around is to manually delete the points folders in G Earth, or if there are many, to run the KML through the GPS Visualizer website to strip the points away.

I like the KML file because it holds the multipart tracks in one file, such as the sections of a hike, that QGIS opens it as individual layers for each track. Those layers can have individual styles.  

Is there a way to get the track only to export from Basecamp without theses unneeded points?

  • There's no way to export just the track from BaseCamp (as far as I know).

    If you drag and drop the KML file into QGIS, it gives you the option of only loading the track (path).

    I wrote a program that copies BaseCamp objects to Google Earth. It provides a few extra options over the similar feature that BaseCamp 4.6.2 provides (This feature was dropped in ater versions of BaseCamp).

    https://sites.google.com/view/grouteloader/bc2ge?authuser=0

    I have a version (not yet released) that provides the option of removing the points.

    The way Google Earth works, objects get copied to the same Earth instance. If seems, with QGIS, copying the objects creates a new instance of QGIS,

    I'm assuming your work flow is to export the object as KML, edit it in GE, and then open/import the file in QGIS.

    (I'm trying to see if I can modify my BC2GE program to do what you need.)

  • Very nice answer. Thanks.  I'll look at your app and see how it can help.  

    When opening the KML in QGIS, I do load only the linestring layer. However QGIS still (apparently) has to deal with the whole file and all those needless points really slow it down. 

    My new work flow to remove the unneeded points is as you noted, BC>GE>QGIS. Please post a comment if you get your app modified.

  • BC2GE works by (1) creating a KML file and then (2) passing the KML file to Google Earth.

    I added an option to not to do step 2.

    I also added an option to be able to drag the temporary to another program (which could be QGIS).

    I also added an option to not include the track points.

    This would avoid needing to use Google Earth to edit the file.

    Would that work for you?

    I haven't released these changes yet.

  • That sounds like a big help.

    I tried BC2GE and it works pretty well.  When I uncheck with the Routes or Waypoints boxes, it give me an error message.

    Response from GPSBabel: Unknown filter 'nuketypes,waypoints'

  • What version of GPSBabel are you using?

  • The version in the QGIS 3.12 folder is 1.4.4

    The version in GE is 1.5.4.

    I've downloaded 1.6. 

    Copying 1.6 into the GE folder I get a different error message. The procedure entry point ?trimmed@qString@@QGBE?AV1@XZ could not be ;located in the DLL...

    The message occurs no matter what selections on the boxes. I'm going to revert back to 1.5.4.

  • Google Earth installs a rather old version of gpsbabel.


    I’m using (and testing) with the latest version of gpsbabel.

    Copying the gpsbabel.exe file might not work (there’s no expectation that it should work).

    BC2GE should be using gpsbabel from where gpsbabel is installed. 

    The (i) button in my program will tell you where it is finding gpsbabel. 

  • I found the place in BC2GE to point it to the installed version and it works now.  Thanks. Although the points folder is still in the KML.

  • Yes, the points folder is still in the KML.

    The option to remove the points in an unreleased version (as I said earlier).

    The idea was to see if the approach I was proposing would work for you before releasing the changes. (Releasing new versions takes some effort and time.)

    The way the new (yet unreleased!) version works is like so:

    1- You can uncheck the "Run Google Earth" so that the program does not launch GE (with the converted file) after clicking Copy.

    2- Added the Pts check box. Unchecking this removes the "Points" folder (the folder containing track points).

    3- I added the Drag "button". If you click on this, you can drag it to another program (QGIS, in your case). This lets the other program open the temporary file created by BC2GE. Keep in mind that BC2GE deletes the temporary file. You can drag the file to another folder if you just want to copy it.

    (This change makes BC2GE more useful in a fairly generic way.)

  • I released the new version. It may take a few days for it to be published.

    Look for "New version as-of 5/8/2020."  in the "What's new in this version" section of the description.

    The new version lets you:

    • drag the temporary converted KML file to other programs,
    • paste the converted KML file data from the clipboard to other programs,
    • disable running Google Earth (useful if you aren't using Google Earth.