titan polygonize¶
Command line tool to convert classification (i.e. integer) rasters to vector polygons.
titan polygonize [-h] [--srcnodata value] [-b band]
[--of vector_format] [--four]
input_file output_file
Converts raster files to cloud-optimized geotiffs.
positional arguments:
input_file Input raster file path.
output_file Output vector file path.
optional arguments:
-h, --help show this help message and exit
--srcnodata value Input nodata value
-b band Band(s) to process
--of vector_format Output vector driver.
--four Use 4-neighbor connectivity instead of 8.
This scripts reads the full raster array into memory and creates polygon features for clusters of adjacent pixels sharing the same value. If you try and run this with a continuous floating point raster you're gonna have a bad time.