GPX Elevation Correction: Fix Inaccurate GPS Altitude Data

GPS elevation data is notoriously unreliable, often off by 10 to 30 meters or more. Learn why your GPX elevation is wrong and how to correct it with LINZ LiDAR data accurate to within 0.5 meters.

Ready to Fix Your GPX Elevation?

Upload your GPX file and replace inaccurate GPS altitude with precision LiDAR elevation data in seconds.

Upload GPX File →

Why Is My GPX Elevation Wrong?

If you have ever looked at your GPS track after a run, hike, or bike ride and noticed the elevation profile looks jagged, unrealistic, or wildly different from what you experienced on the ground, you are not alone. GPS elevation data is consistently the weakest measurement your device records. While GPS latitude and longitude can be accurate to within a few meters, the altitude component is typically two to three times less accurate.

Several factors contribute to inaccurate elevation data in GPX files:

  • Satellite Geometry: GPS calculates altitude using signals from orbiting satellites. Because all visible satellites are above you, the vertical fix is inherently weaker than the horizontal fix. This phenomenon, known as poor Vertical Dilution of Precision (VDOP), means altitude errors of 10 to 30 meters are typical even in ideal conditions.
  • Atmospheric Interference: GPS signals travel through the ionosphere and troposphere, where charged particles and water vapor delay the signals. These delays introduce elevation errors that can shift readings up or down by several meters throughout a single activity.
  • Multipath Errors: In valleys, near buildings, or under dense tree canopy, GPS signals bounce off surfaces before reaching your device. These reflected signals travel a longer path, causing altitude miscalculations that manifest as sudden spikes or drops in your elevation profile.
  • Receiver Quality: Consumer-grade GPS chipsets in watches, phones, and handheld devices use simplified algorithms compared to survey-grade equipment. Budget devices may record elevation errors exceeding 50 meters in challenging terrain.
  • Cold Start Drift: When your GPS device first acquires a satellite fix, the initial altitude reading can be significantly off. It takes time for the receiver to refine its position, often resulting in noticeable elevation drift during the first few minutes of an activity.

The result is a GPX file where the recorded elevation bounces erratically around the true value. This noise inflates calculated elevation gain, distorts gradient percentages, and makes elevation profiles unreliable for route planning or performance analysis.

GPS Altitude vs Barometric Altitude

Many modern GPS watches and cycling computers include a barometric altimeter alongside the GPS receiver. Understanding the difference between these two measurement methods helps explain why elevation data varies so much between devices and recordings.

GPS-Derived Altitude

GPS altitude is calculated from satellite signals using trilateration. The receiver needs at least four satellites to compute a three-dimensional position fix (latitude, longitude, and altitude). Because all visible satellites sit in a narrow angular band above the horizon, the vertical component of this calculation is geometrically weak. Typical accuracy ranges from plus or minus 10 meters in open sky conditions to plus or minus 30 meters or worse in obstructed environments like forests, canyons, or urban areas.

Barometric Altitude

Barometric altimeters measure atmospheric pressure, which decreases predictably with increasing altitude. These sensors can detect elevation changes as small as one meter, making them excellent for tracking relative altitude change during an activity. However, barometric readings suffer from a critical limitation: atmospheric pressure changes with weather. A passing weather front can shift your measured altitude by 10 to 20 meters without any actual change in elevation. Over a multi-hour activity, barometric drift can accumulate significantly.

Neither Method Is Truly Accurate

GPS altitude is noisy but does not drift over time. Barometric altitude tracks relative changes well but drifts with weather conditions. Some advanced devices attempt to blend both sources, but the result is still far from ground truth. The only way to get consistently accurate elevation values is to reference a high-resolution Digital Elevation Model (DEM) derived from precision sources like LiDAR.

How Elevation Correction Works

Elevation correction replaces the inaccurate altitude values recorded by your GPS device with accurate ground-truth elevation data from a Digital Elevation Model. Here is how the process works at a technical level:

  1. Parse the GPX File: The tool reads your GPX file and extracts every track point and waypoint along with their latitude and longitude coordinates.
  2. Query the DEM: For each coordinate pair, the tool looks up the true ground elevation from the LINZ LiDAR-derived DEM. This model was built by scanning the terrain of New Zealand with airborne laser pulses that measure the distance to the ground surface with centimeter-level precision.
  3. Interpolate Between Grid Points: The DEM stores elevation values on a regular grid. When a track point falls between grid nodes, bilinear interpolation calculates a smooth and accurate elevation value based on the surrounding data points.
  4. Replace Elevation Values: The original GPS altitude at each track point is replaced with the LiDAR-derived elevation. The latitude and longitude coordinates, timestamps, heart rate, cadence, and all other data remain untouched.
  5. Output the Corrected File: The tool generates a new GPX file with identical structure and metadata but with corrected elevation throughout. The result is a clean, accurate elevation profile that reflects the true terrain you traversed.

This approach is fundamentally different from smoothing algorithms that attempt to reduce noise in GPS altitude data. Smoothing can make a profile look cleaner, but it does not make the data more accurate. DEM-based correction replaces bad data with ground-truth measurements.

Correct Your GPX Elevation Now

Replace noisy GPS altitude data with precision LiDAR elevation in seconds.

Correct Your GPX →

Why LiDAR Is More Accurate Than GPS Elevation

Not all elevation data is created equal. The accuracy gap between different sources is enormous, and understanding this gap is key to appreciating why LiDAR correction makes such a dramatic difference.

  • GPS Altitude (Consumer Devices): Plus or minus 10 to 30 meters vertical accuracy. Affected by satellite geometry, atmospheric conditions, multipath, and receiver quality. Noisy, with individual readings often fluctuating by several meters between consecutive data points recorded just seconds apart.
  • SRTM (Shuttle Radar Topography Mission): Plus or minus 16 to 30 meters vertical accuracy. This global dataset from 2000 has relatively coarse 30-meter horizontal resolution and captures tree canopy rather than bare earth in forested areas. Many online elevation correction services rely on SRTM data.
  • LINZ LiDAR (New Zealand): Plus or minus 0.2 to 0.5 meters vertical accuracy. Captured by aircraft-mounted laser scanners at resolutions of 1 to 2 meters. LiDAR pulses penetrate vegetation canopy to measure bare-earth elevation, making it accurate even in dense forest. This is the same data used by surveyors, engineers, and government agencies.

The difference is staggering. LINZ LiDAR is 20 to 60 times more accurate than consumer GPS altitude. When you correct a GPX file with LiDAR data, you are replacing a rough estimate with a precision measurement. The result is an elevation profile that faithfully represents the actual terrain, with accurate elevation gain calculations, realistic gradient percentages, and smooth profiles that match what you experienced on the ground.

How to Correct GPX Elevation

Correcting your GPX elevation data with NZ Elevation Tools is straightforward. Follow these steps:

  1. Step 1: Navigate to the Tool

    Go to the NZ Elevation Tools homepage and select the "Add Elevation" mode. This mode is designed to either add elevation data to flat GPX files or replace existing inaccurate elevation with LiDAR values.

  2. Step 2: Upload Your GPX File

    Drag and drop your GPX file into the upload area or click to browse and select it. The tool accepts GPX files of any size, whether it is a short morning run or a multi-day tramping expedition. Your file is processed securely and is not stored on any server.

  3. Step 3: Automatic Processing

    The tool reads every track point in your file, looks up the corresponding LiDAR elevation for each latitude and longitude pair, and replaces the GPS altitude with the accurate LiDAR value. This happens in seconds, even for files with thousands of track points.

  4. Step 4: Download the Corrected File

    Once processing is complete, download your corrected GPX file. It retains all original data including timestamps, heart rate, cadence, power, and temperature, with only the elevation values replaced.

  5. Step 5: Import into Your App or Device

    Upload the corrected GPX file to Strava, Garmin Connect, TrainingPeaks, Komoot, or any other training platform. You can also load it onto your GPS watch or cycling computer for navigation with accurate altitude data.

Before and After: What Changes

When you correct a GPX file with LiDAR data, the differences are often immediately visible. Here is what typically changes:

Total Elevation Gain Drops

This is the most common and dramatic change. GPS noise causes the recorded elevation to bounce above and below the true value with every single data point. Each of these small fluctuations gets counted as gain or loss, inflating the total. After correction, the noise disappears and total elevation gain typically drops by 15 to 40 percent. A run that your GPS watch reported as having 450 meters of climbing might actually have 320 meters when measured against LiDAR data.

Smoother Elevation Profile

The jagged, spiky appearance of a GPS-recorded elevation profile is replaced with a smooth, continuous line that accurately represents the terrain. Hills appear as clean climbs and descents rather than erratic zigzags. Flat sections actually look flat instead of showing phantom rollers.

More Realistic Gradients

GPS noise can create false gradient readings that swing wildly between steep uphill and steep downhill from one data point to the next. Corrected data shows gradients that match the actual terrain, making pace analysis and effort estimation far more reliable.

Accurate Minimum and Maximum Elevation

The highest and lowest points on your route are reported accurately rather than being inflated or underreported by GPS error. This matters for routes that cross mountain passes, ridgelines, or sea-level coastal sections.

Common Scenarios That Need Correction

Some activities and environments produce particularly poor GPS elevation data. If you recognize any of these scenarios, your GPX files almost certainly benefit from LiDAR correction:

  • Running Under Tree Canopy: Forest trails block GPS signals and create multipath errors. Trail runs through native bush in New Zealand frequently show elevation errors of 20 meters or more. The dense canopy of podocarp and beech forests is particularly problematic for satellite reception.
  • Cycling in Urban Canyons: Tall buildings reflect GPS signals and block satellite lines of sight. City cycling routes often have the worst elevation data of any activity, with phantom climbs and descents appearing where the road is perfectly flat.
  • Hiking in Valleys and Gorges: Steep valley walls limit the number of visible satellites and create multipath reflections. Routes through gorges like the Routeburn Track or along valley floors commonly show exaggerated elevation fluctuations.
  • GPS Watch Drift on Long Activities: Barometric altimeters drift with weather changes over time. A six-hour hike can accumulate significant barometric drift as atmospheric pressure changes, causing the recorded starting elevation to differ from the finishing elevation even on an out-and-back route that returns to the same point.
  • Mountain Biking on Technical Terrain: Rapid elevation changes combined with tree cover and terrain obstructions create a perfect storm of GPS errors. Mountain bike trails often show wildly inflated elevation gain compared to reality.
  • Activities Near Cliffs and Steep Terrain: GPS struggles where elevation changes rapidly over short horizontal distances. Routes along ridgelines, cliff edges, or switchbacks frequently have poor vertical accuracy.
  • Smartphone GPS Recordings: Phone GPS chipsets are generally less accurate than dedicated GPS watches and cycling computers. Activities recorded on a phone consistently show more elevation noise than those from dedicated devices.

Correcting Elevation for Strava and Training Apps

Many athletes record activities and upload them to platforms like Strava, Garmin Connect, and TrainingPeaks. Correcting elevation before or after upload ensures your training data is accurate.

Why Platform Corrections Vary

Strava and other platforms apply their own elevation correction algorithms, but these typically rely on lower-resolution global datasets like SRTM or mapbox terrain tiles. The results are better than raw GPS in some cases but cannot match the precision of LINZ LiDAR for New Zealand locations. Some platforms also apply aggressive smoothing that can remove real terrain features along with noise.

How to Re-Upload Corrected Files

After correcting your GPX file with NZ Elevation Tools, you can upload the corrected file to your training platform:

  • Strava: Delete the original activity, then upload the corrected GPX file via the Strava upload page. Strava will use the elevation values from the file rather than applying its own correction.
  • Garmin Connect: Import the corrected GPX as a new activity via the import tool. You can then archive or delete the original recording.
  • TrainingPeaks: Upload the corrected file through the "Upload" interface. TrainingPeaks generally respects the elevation data in the uploaded file.
  • Komoot: Import the corrected GPX as a completed tour or as a planned route for future navigation with accurate elevation guidance.

Benefits for Training Analysis

Accurate elevation data improves every metric that depends on altitude: elevation gain and loss totals, grade-adjusted pace, estimated power output for cycling, Training Stress Score calculations, and calorie burn estimates. If you use elevation-dependent metrics to guide your training, corrected data leads to better decisions.

Data Source and Accuracy

NZ Elevation Tools uses elevation data from Land Information New Zealand (LINZ), the government agency responsible for New Zealand's geospatial data infrastructure. The LiDAR datasets are captured using aircraft-mounted laser scanners that emit hundreds of thousands of pulses per second to build an extraordinarily detailed model of the terrain surface.

  • Vertical Accuracy: Plus or minus 0.2 to 0.5 meters, verified against ground control points
  • Horizontal Resolution: 1 to 2 meters between data points
  • Bare Earth Model: LiDAR algorithms separate ground returns from vegetation returns, producing a true terrain model that is not influenced by tree height
  • Coverage: Most populated areas and popular recreation areas in New Zealand have LiDAR coverage, with ongoing expansion
  • Licensing: LINZ data is available under Creative Commons Attribution 4.0 (CC BY 4.0)

Frequently Asked Questions

Will correcting elevation change my route or timestamps?

No. Elevation correction only replaces the altitude value at each track point. Your latitude, longitude, timestamps, heart rate, cadence, power data, and all other recorded metrics remain exactly as they were. The route itself does not change at all.

Why does my GPS watch show more elevation gain than the corrected file?

GPS altitude noise causes every small fluctuation to be counted as gain or loss. These fluctuations are not real terrain changes but rather measurement errors. When you replace noisy GPS data with accurate LiDAR elevation, the phantom gain and loss disappear, resulting in a lower but more truthful total elevation figure. It is common for corrected elevation gain to be 15 to 40 percent lower than what your watch reported.

Does this work for all of New Zealand?

LiDAR coverage spans most populated areas and popular recreation areas in New Zealand, including the majority of DOC tracks, urban areas, and popular cycling and running routes. Some very remote alpine or backcountry areas may have limited coverage. If a track point falls outside the LiDAR coverage area, the tool will indicate this so you are aware.

Can I correct elevation for activities recorded overseas?

NZ Elevation Tools uses the LINZ LiDAR dataset, which covers New Zealand only. For routes outside New Zealand, the tool cannot provide elevation corrections. The tool is specifically designed to provide the highest accuracy possible for New Zealand terrain.

Is corrected elevation data more accurate than Strava elevation?

For routes in New Zealand, yes. Strava typically uses global elevation datasets like SRTM or mapbox terrain tiles, which have vertical accuracy of plus or minus 10 to 30 meters. LINZ LiDAR provides plus or minus 0.2 to 0.5 meter accuracy, making it 20 to 60 times more precise. The difference is especially noticeable on forested trails and in areas with complex terrain.

How large a GPX file can I correct?

The tool handles GPX files of any typical size, from short commutes with a few hundred track points to multi-day tramping expeditions with tens of thousands of points. Processing time scales with file size but remains fast even for large files.

Related Resources

Explore more guides and tools for working with elevation data in New Zealand:

Fix Your GPX Elevation Data

Replace inaccurate GPS altitude with precision LiDAR elevation. Accurate to within 0.5 meters.