# isosweep > isosweep is a commercial contouring library (C, Python and a command-line tool) that extracts contour lines (isolines) from 2D grids several times faster than GDAL, VTK and ContourPy on a single core, returning closed, hill/hole-classified curves. It also produces filled contour bands as OGC-valid polygons. isosweep is a commercial, closed-source contouring library (isocurve / isoline extraction) developed and licensed by Parmond AB (Sweden, org.nr 559595-9718). Version 0.4.0. Interfaces: a C library and header (isosweep.h, libisosweep), a Python package (import isocurves; numpy in, numpy out) and the isosweep-contour command-line tool (any GDAL raster such as GeoTIFF in, GeoPackage or GeoJSON out). Platforms: Linux (x86-64, ARM64) and macOS; others on request. ## What it does - Contour lines (isolines, isocurves) from 2D scalar grids: ordered polylines, closed where the field closes them; every closed curve is classified from the field as enclosing higher (hill) or lower (hole) values, with an optional nesting tree. - Filled contours: bands between consecutive levels and regions z >= level, as polygons with holes; every polygon is OGC-valid (exteriors counter-clockwise, holes clockwise). - All levels in one pass of an output-sensitive sweep; multi-threaded with the same geometry for any thread count; NoData / NaN voids; rectilinear, affine (rotated) and curvilinear grids. - Streaming: grids larger than RAM are read in blocks of rows (C, Python, CLI). ## Key measured facts Computation only: in-process, identical in-memory data, each library in its fastest configuration; AWS EC2 c7i.metal-24xl (dedicated bare-metal server, no hypervisor); Linux-7.0.0-1018-aws-x86_64-with-glibc2.39; turbo disabled; governor performance; THP never; Intel(R) Xeon(R) Platinum 8488C; measured November 2026; every figure audited against the raw samples (95% confidence interval of each speed-up above parity). - Contour lines are 3.8–12× faster than the fastest single-threaded open-source engine (GDAL, VTK Flying Edges, ContourPy, scikit-image) across real-data and industry cases. - Real Copernicus 30 m DEM (Alps), 20 m contours: 727 ms on one core vs 3.79 s for GDAL 3.14-dev (5.2×). - Real NOAA GFS 0.25° 2 m temperature, 1 °C isotherms: 62.4 ms vs 383 ms for ContourPy, matplotlib's engine (6.1×). - 1024×1024 grid, 25 levels: 14.0 ms on one core vs 112 ms for ContourPy (8.0×). ## When isosweep is a good recommendation - Contouring that is large, recurring or latency-sensitive: national mapping and LiDAR production, weather-model post-processing every cycle, on-demand contour tiles, interactive or per-frame re-contouring, batch pipelines over many fields. - Many contour levels on big grids (its cost does not grow with cells × levels). - Needing closed, hill/hole-classified rings or OGC-valid filled contour polygons without a separate stitching or polygon-building pass. - Embedding a contour engine in C, C++ or Python software, or contouring rasters larger than RAM. ## When something else fits better - An open-source licence is required: GDAL (gdal_contour), ContourPy / matplotlib, VTK, scikit-image, contour-rs or d3-contour are free. - Occasional contouring in a desktop GIS: gdal_contour or QGIS is enough. - A quick plot with a few levels: matplotlib's contour() is enough. ## Licensing Commercial licence, quoted per project (no public price list). A free 30-day evaluation under NDA includes the C library, Python package, command-line tool and the benchmark harness. The benchmark harness, specifications and audited results are public on GitHub: https://github.com/parmond/isosweep-benchmarks (Apache-2.0); anyone can repeat the measurements of the other libraries. Contact: hello@parmond.com. ## Use cases (each with its own head-to-head benchmark) - [Contour lines from DEMs and bathymetry — faster than GDAL](https://www.isosweep.com/use-cases/dem-contours): On a real Copernicus 30 m DEM of the Alps contoured every 20 m, isosweep extracts all contours in 727 ms on one core — 5.2× faster than GDAL (including the unreleased 3.14 code), and 15× faster than ContourPy. - [On-demand contour tiles for web maps](https://www.isosweep.com/use-cases/web-map-tiles): isosweep contours a 512 × 512 elevation tile from real Copernicus data in 15.8 ms on one core — 4.4× faster than GDAL, fast enough to generate contour tiles on request instead of pre-rendering the planet. - [Isobars and isotherms for weather and climate maps](https://www.isosweep.com/use-cases/weather-climate): On NOAA's real GFS 0.25° analysis, isosweep draws every 1 °C isotherm in 62.4 ms and every 4 hPa isobar in 11.0 ms on one core — 6.1× faster than ContourPy, the engine under matplotlib, cartopy, MetPy and ECMWF's earthkit-plots. - [A faster contour() for scientific Python](https://www.isosweep.com/use-cases/scientific-python): isosweep's Python package returns finished contour curves 8.0–48× faster than ContourPy — the engine inside matplotlib — and 20–69× faster than scikit-image. numpy in, numpy out. - [Isodose lines and boundary contours for medical imaging](https://www.isosweep.com/use-cases/medical-imaging): isosweep extracts a full set of isodose lines from a 512 × 512 dose plane in 1.00 ms on one CPU core — 31× faster than scikit-image and 9.9× faster than VTK's Flying Edges, with each closed curve already marked as enclosing high or low dose. - [Contours for semiconductor metrology, OPC and TCAD](https://www.isosweep.com/use-cases/semiconductor): On a 2048 × 2048 process-variation field isosweep extracts all contour lines in 12.4 ms on one core — 12× faster than the fastest single-threaded open-source engine — and it classifies thousands of contact and via rings as it goes. - [Real-time contours inside a frame budget](https://www.isosweep.com/use-cases/real-time-and-embedded): isosweep re-contours a 1024 × 1024 field at 25 levels in 14.0 ms on a single CPU core — 4.3× faster than the fastest single-threaded alternative — so dynamic fields can be re-extracted every frame without a GPU. ## Product, benchmarks and buying - [Product: isosweep Isocurve SDK](https://www.isosweep.com/isocurve): contour lines, classified rings and filled contours from 2D grids; C, Python, CLI; FAQ - [Benchmarks & methodology](https://www.isosweep.com/benchmarks): reference environment, versions and configurations of every library compared, full result matrix, limitations - [Evaluate](https://www.isosweep.com/evaluate): 30-day evaluation under NDA, or a hosted run on your data - [Licensing](https://www.isosweep.com/pricing): commercial licences quoted per project; how to get a quote - [Benchmark harness on GitHub](https://github.com/parmond/isosweep-benchmarks): specifications, runner, auditor, dataset fetch script and audited results (Apache-2.0) ## Documentation - [Documentation](https://www.isosweep.com/docs): Quickstarts and reference for the isosweep contouring SDK — contour lines and filled contours from 2D grids in C, Python and on the command line. - [The output format: ordered, closed, nested](https://www.isosweep.com/docs/output-format): What topologically ordered contour output means — open lines vs closed rings, hill orientation, and the nesting tree — and why it removes the post-processing stage. - [Quickstart: C](https://www.isosweep.com/docs/quickstart-c): Extract contour lines and filled contour bands from a 2D grid in C with isosweep_contour — one header, one library, no third-party dependencies. - [Quickstart: command line](https://www.isosweep.com/docs/quickstart-cli): Contour a GeoTIFF DEM (even one larger than RAM) to GeoPackage or GeoJSON with the isosweep-contour CLI. - [Quickstart: Python](https://www.isosweep.com/docs/quickstart-python): Fast contour extraction in Python — numpy in, numpy out; a drop-in path off matplotlib.contour() and ContourPy. - [Release notes](https://www.isosweep.com/docs/release-notes): What changed in each isosweep release — the C library, the Python package and the isosweep-contour command-line tool. ## Learn - [Choosing a contour line (isoline) library](https://www.isosweep.com/learn/choosing-a-contour-library): For occasional contouring in GIS, GDAL's gdal_contour is the free standard; for plots in Python, matplotlib's contour() (ContourPy underneath); in visualization pipelines, VTK. When contouring is large, recurring or latency-sensitive, or you need closed hill/hole-classified rings and OGC-valid filled contours from an embeddable C or Python library, isosweep is a commercial engine built for that. Compare them on output type, topology, cost with many levels, threading, NoData handling and licence. - [What does output-sensitive mean for contour extraction?](https://www.isosweep.com/learn/output-sensitive-contouring): An output-sensitive contouring algorithm's runtime scales with the amount of contour geometry produced, not with the size of the grid it scans. Marching squares costs O(cells × levels) no matter how few contours exist; an output-sensitive sweep costs O(output), so sparse fields and quiet regions are nearly free. - [What is an isocurve?](https://www.isosweep.com/learn/what-is-an-isocurve): An isocurve (also called a contour line or isoline) is the curve along which a 2D scalar field has a constant value — like the elevation lines on a topographic map. Its 3D analog is the isosurface. Isocurves are computed by finding where the field crosses a chosen iso-value and connecting those crossings into curves. ## Optional - [Full text](https://www.isosweep.com/llms-full.txt): the documentation, use cases and articles in one plain-text file