This tool can be used to create a vector contour coverage from an input raster surface model (`input`), such as a digital elevation model (DEM). The user must specify the contour interval (`interval`) and optionally, the base contour value (`base`). The degree to which contours are smoothed is controlled by the Smoothing Filter Size parameter (`smooth`). This value, which determines the size of a mean filter applied to the x-y position of vertices in each contour, should be an odd integer value, e.g. 3, 5, 7, 9, 11, etc. Larger values will result in smoother contour lines. The tolerance parameter (`tolerance`) controls the amount of line generalization. That is, vertices in a contour line will be selectively removed from the line if they do not result in an angular deflection in the line's path of at least this threshold value. Increasing this value can significantly decrease the size of the output contour vector file, at the cost of generating straighter contour line segments.

## See Also

raster_to_vector_polygons

## Function Signature

`def contours_from_raster(self, raster_surface: Raster, contour_interval: float = 10.0, base_contour: float = 0.0, smoothing_filter_size: int = 9, deflection_tolerance: float = 10.0) -> Vector: ...`

## Project Links

WbW Homepage User Manual Support WbW