GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers. Open Source and supported on MacOS, Windows, Linux, and more. Pointy clicky GUI or a command line version...
./bld/gpsbabel -h kml
kml Google Earth (Keyhole) Markup Language
deficon Default icon name
lines (0/1) Export linestrings for tracks and routes
points (0/1) Export placemarks for tracks and routes
line_width Width of lines, in pixels
line_color Line color, specified in hex AABBGGRR
floating (0/1) Altitudes are absolute and not clamped to ground
extrude (0/1) Draw extrusion line from trackpoint to ground
track (0/1) Write KML track (default = 0)
trackdata (0/1) Include extended data for trackpoints (default = 1
trackdirection (0/1) Indicate direction of travel in track icons (defau
units Units used when writing comments ('s'tatute, 'm'et
labels (0/1) Display labels on track and routepoints (default
max_position_point Retain at most this number of position points (0
rotate_colors Rotate colors for tracks and routes (default autom
prec Precision of coordinates, number of decimals
For example the kml labels option: