I’m surprised to see that GpsBabel doesn’t seem to support that feature, and Google didn’t help.
Do you know of a Windows command-line application that takes a GPX/KML file as input, grabs elevations from the Net, and outputs the whole thing into a new file?
I don’t know a command-line program, but some GPX editors allow to add or correct the elevation data from DEM sources.
The general problem with this method is that the open source DEM data with its raster of 30m or more is too unprecise to calculate good elevation data. It would ignore bridges and tunnels and the fact that major roads are typically not following the surface, instead the earth is flattened before the road is build.
Some routing programs calculate elevation profiles which are more reasonable, e.g. brouter
Wow, their prices are quite high! But a precision of 1 m sounds great as well. I wonder why you don’t (re)plan your trip on a web page which offers gpx with elevation.
those DEM files have geoid elevation or above sea level? I found out they have quite a difference and nobody seems to use the geoid elevation in official business dealings.
This has been a recurring pattern on this forum recently, where a new user just copies and pastes an earlier answer. They seem to be spammers of some kind - they may intend to edit the post later to add a link, or to add a link in their profile. I have reported several such posts.