Closed cholmes closed 1 month ago
@calebrob6 - I merged #19 into here and refactored to be its own command. For my initial commit I aimed to keep it faithful to yours (not trying to add anything new). I think the one thing I lost was the 'warning' about it not being over 1 if it's geographic, as I'm not sure how to get that info from reading the file in.
% ftw inference polygonize --help
Usage: ftw inference polygonize [OPTIONS]
Polygonize the output from inference
Options:
--input_fn PATH Input raster file to polygonize. [required]
--output_fn TEXT Output filename for the polygonized data. [required]
--simplify FLOAT Simplification factor to use when polygonizing.
--overwrite Overwrite outputs if they exist.
--help Show this message and exit.
% ftw inference polygonize --input_fn ~/Downloads/nl_output.tif --output_fn ~/Downloads/nl_inf_20.gpkg --simplify 20 --overwrite
Polygonizing input file: /Users/cholmes/Downloads/nl_output.tif
Processing mask windows: 36it [00:35, 1.01it/s]
Finished polygonizing output at /Users/cholmes/Downloads/nl_inf_20.gpkg in 38.12s
Refactoring CLI commands a bit as proposed in #21