![Forrest logo](/images/logo.png)
gdal_contour:tldr:9836c
The command "gdal_contour" is used to generate vector contour lines from raster datasets. Here is the breakdown of the command:
-
"gdal_contour": This is the name of the utility or tool being executed.
-
"-i ${100-0}": This option specifies the interval between contour lines. The syntax "${100-0}" means subtraction operation, where contour lines will be generated every 100 units starting from 0. For example, if the elevation values in the input raster vary from 0 to 1000, the command will generate contour lines at 0, 100, 200, ..., 1000.
-
"-p ${path-to-input-tif}": This option specifies the path to the input raster file (.tif) from which the contour lines will be generated. "${path-to-input-tif}" indicates that you need to replace it with the actual file path.
-
"${path-to-output-gpkg}": This specifies the path to the output file or the destination where the generated contour lines will be saved. "${path-to-output-gpkg}" indicates that you should replace it with the desired output file path and filename. The file format used here is GeoPackage (.gpkg), but other formats such as Shapefile (.shp) can also be used.
In summary, this command will create contour lines at specific intervals from the input raster file and save the resulting vector data to a GeoPackage file.