| Title: | Create Contour Lines and Contour Polygons from a Raster |
|---|---|
| Description: | Creates nice smooth 'marching squares' contour lines and polygons. |
| Authors: | Michael Sumner [aut, cre] (ORCID: <https://orcid.org/0000-0002-2471-7511>) |
| Maintainer: | Michael Sumner <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-05-15 08:48:51 UTC |
| Source: | https://github.com/hypertidy/isoraster |
Produce contours for a raster and return a vector dataset.
isoline_terra(x, line) isoband_terra(x, lo, hi = NULL)isoline_terra(x, line) isoband_terra(x, lo, hi = NULL)
x |
a terra raster, only first layer is considered |
line |
a contour level for isoline_terra |
lo |
a polygon level interval minimum for the low values (must have a corresponding hi value) |
hi |
a polygon level interval maximum for the high values (cf. lo) |
isoline_terra returns lines, use 'line' to specify or an automatic set will be computed
isoband_terra returns polygons, use 'lo' AND 'hi' to specify breaks, or an automatic set will be computed
These lines and boundaries are nice because isoband uses marching squares, not literal pixel outlines.
SpatVector object, for isoline_terra a table of spatial lines with 'line' contour value, for isoband_terra a table of spatial polygons with 'lo' and 'hi' contour values
isoline_terra(rast(volcano)) isoband_terra(rast(volcano), lo = 100, hi = 150)isoline_terra(rast(volcano)) isoband_terra(rast(volcano), lo = 100, hi = 150)