Make the comparison reproducible
A browser preview and a desktop processing stack can both extract lines of equal height. They solve different parts of a larger mapping job. A short interactive pass can answer whether an interval reads clearly on a single site. A GIS pipeline can combine many rasters, transform their reference systems, control missing values and record processing parameters for future updates. Select the workflow after identifying which part of that job is causing the uncertainty.
For a fair comparison use the same source values. A built-in synthetic hill located over a real geographic extent cannot be expected to match a national elevation model of that location. Reformatting a point survey into a raster also introduces an interpolation decision before either contour algorithm starts. Document this step separately, particularly where the original samples are unevenly distributed.
Compare an unmoved, unfiltered line set first. Simplification and smoothing modify the appearance and geometry after extraction. Once the raw comparison is understood, apply one processing change at a time and record the effect at a meaningful station. That procedure helps distinguish a minor interpolation difference from a serious coordinate shift or a misinterpreted unit.
GDAL contour options for a controlled comparison
| Parameter | Specification |
| Raster command | gdal_contour |
|---|
| Regular spacing | -i interval |
|---|
| Output height field | -a name |
|---|
| Elevated vertices | -3d |
|---|
| Explicit missing value | -snodata value |
Worked examples
An ASCII raster with a missing center
An elevation grid marks an internal hole with a NoData sentinel. Interpreting that number as an ordinary negative elevation can generate an artificial pit with many tightly packed contours. Check the missing region before and after extraction. Compare how both processes treat its border before attributing a difference to smoothing.
A 5 meter cross-tool comparison
Use one raster, a five meter interval and the same vertical phase in both tools. A sequence of 100, 105 and 110 meters is offset from a sequence of 102, 107 and 112 meters even though both have five meter spacing. Compare lines that actually represent the same elevation.
A tiled regional survey
Several adjacent rasters may carry different extents, NoData collars or coordinate systems. A GIS can establish a common grid and mosaic those tiles before extraction. Independently contouring each tile can create seams. Compare an interior reference crossing and a shared edge to identify discontinuities introduced during preparation.
Working procedure
- Describe the source raster. Record its coordinate system, horizontal and vertical units, pixel dimensions and missing-data convention. Note whether coordinates describe cell centers or outer corners. A half-cell shift can make two correct contour extractions appear offset if the source placement is interpreted differently.
- Match extraction settings. Work in the same numeric elevation unit, turn off smoothing for an initial comparison and use an interval supported in both workflows. Check how integer multiples of that interval are referenced. In GDAL, select an elevation attribute or three-dimensional output explicitly according to what you want to inspect.
- Check geometry at fixed stations. Choose a valley crossing, a straight slope and a saddle. At each location, compare the same elevation in plan and record any displacement relative to raster cell size. Different treatments of ambiguous cells, void edges and vertex simplification can produce local variation while much of the site still agrees.
- Choose the operational path. For a small deliverable, continue with the browser preview and the required CAD or geographic export. For a repeated GIS job, save the processing parameters, input filenames, coordinate transformation and output driver. Re-run the same test area after changing a processing version or a source raster.
When to use this workflow
One site during a coordination call
A reviewer can change a spacing, see the line count and quickly inspect the terrain profile without setting up a processing project. Keep the underlying survey and its coordinate notes accessible. A compact browser workflow works best when those input decisions have already been made.
A maintained mapping pipeline
A GIS team that receives new DEM tiles every month benefits from explicit source handling, driver selection and reproducible batch settings. Retain the processing log and make an independent check near the joins. The browser can provide a spot comparison when investigating an unusual region.
Technical questions
Which GDAL option puts elevation on the line vertices?
The traditional gdal_contour command supports the -3d option for elevated vertices. An attribute selected with -a names a field in the output. A file may carry a height attribute while still using two-dimensional geometry, so inspect both when comparing a GIS export with CAD contours.
Why do QGIS and the browser count different numbers of lines?
A contour level can consist of multiple disconnected parts. Count comparable things first, such as unique elevations or individual lines. Clipping boundaries, missing cells, ambiguous saddle connectivity and splitting multipart features during export can all alter feature counts without changing the selected interval.
Can I reproject a raster by changing its CRS label?
Assigning a label tells software how to interpret existing coordinates. Actual reprojection computes locations in the destination reference system and normally resamples raster values onto a new grid. Use an appropriate transformation when comparing a geographic source with a local engineering grid.
Which output should I compare when checking a QGIS layer?
Compare geographic line geometry with geographic geometry, or bring both datasets into the same declared projected system. Use the elevation field and a single level to isolate the comparison. Rendered screenshots at different scales are useful for a quick visual check but cannot reveal exact vertex positions.