And tunnels can inaccurately raise elevation numbers because he data comes from the top of the tunnel.
Here is a RWGS map of a rail trail. Those two spikes are two long tunnels:
Dashboard · Ride with GPS
The funniest situation I encountered while mapping a rail-trail was with the Route of the Hiawatha Trail. There are more than 14 tunnels if you ride the 9 miles of former right-of-way from Avery, ID, to the start of the trail and then the 15 miles of the official trail itself. It's almost all up hill in that direction, but I don't know how you could ever figure out the altitude gain.
I have found that Google Maps can underreport altitude compared to RWGPS. It has returned some segments that, when mapped on RWGPS, significantly underreported what RWGPS returned. Can't ay which is more accurate, so I always go with the greater elevation gain value.