Elevation Contour Maker
Find equal-elevation lines in a single numeric GeoTIFF DEM. Elevation samples are placed at pixel centers, interpolated across adjacent samples, joined into lines, and exported as GeoJSON and SVG.
Key features
- Read a real north-up EPSG:4326/3857 single-band DEM and NoData tag
- Choose contour levels from a positive interval and a reference elevation; interpolate between 2×2 samples
- Resolve four-edge saddles by a bilinear determinant rule and join/deduplicate coincident fragments
- Skip cells touching NoData and never invent values in the unsampled outer half-cell
- Convert EPSG:3857 inputs to RFC 7946 WGS84 longitude/latitude GeoJSON LineString/MultiLineString
- Preview SVG and report lines, segments, vertices, valid samples and skipped cells per level
How to use
- Open a GeoTIFF DEM or load the 9×9 cone example; inspect CRS, grid and NoData.
- Enter contour interval, base elevation and the declared source value unit (metres, feet or unspecified).
- Generate contours and inspect range, pixel-center bounds and line counts by elevation.
- Review the preview, then download GeoJSON or SVG.
- Check that GeoJSON uses WGS84 longitude/latitude; SVG is a grid diagram, not a survey map.
Use cases
- Make GIS-ready isolines from a small numeric DEM
- Compare contour density and NoData gaps across intervals
- Teach isoline extraction from a measured single-band elevation grid
Frequently asked questions
How does this differ from tracing an image into SVG?
Image-to-SVG thresholds RGBA colors or brightness. This tool reads numeric elevation samples and georeferencing from a GeoTIFF, then interpolates a specified height interval. It never assumes photo colors are heights.
Are contours located at pixel corners or centers?
PixelIsArea GeoTIFF samples are treated as representative values at pixel centers. Interpolation occurs inside rectangles between four neighboring centers, so the covered extent sits half a cell inside the GeoTIFF bounds. The outer half-cell is not extrapolated.
How are NoData and flat plateaus handled?
Any four-sample rectangle touching NoData is skipped, so lines cannot bridge that gap. A constant plane has no unique isoline and yields none. Levels equal to the minimum or maximum are omitted.
What happens in ambiguous four-edge saddle cells?
The sign of the bilinear determinant chooses which edge pairs connect. An exact-zero tie uses a fixed rule. Zero-length and duplicate fragments at coincident vertices are removed before joining.
Does GeoJSON from EPSG:3857 use metre coordinates?
No. RFC 7946 GeoJSON requires WGS84 longitude and latitude. Every output line is converted to EPSG:4326; source CRS and the declared elevation unit remain properties. SVG is a diagram in the source grid plane, not a distance map.
Which DEMs and sizes work?
One-image, north-up PixelIsArea GeoTIFF with one numeric band, explicitly EPSG:4326 or EPSG:3857. Limits: 8 MiB input, 120,000 cells and 1024 per side, 80 levels, 2 million cell-level operations and 100,000 segments. Rotation, multiband files, other CRS and vertical datum transformation are unsupported.
Privacy
The DEM stays in this browser tab. This tool does not send its bytes to a server API. GeoJSON and SVG downloads are generated locally.
Comments & questions