diff --git a/src/asf_tools/composite.py b/src/asf_tools/composite.py index d84abde..bfd2fc0 100755 --- a/src/asf_tools/composite.py +++ b/src/asf_tools/composite.py @@ -201,8 +201,8 @@ def make_composite(out_name: str, rasters: list[str], resolution: float | None = for raster, info in raster_info.items(): log.info(f'Processing raster {raster}') log.debug( - f"Raster upper left: {info['cornerCoordinates']['upperLeft']}; " - f"lower right: {info['cornerCoordinates']['lowerRight']}" + f'Raster upper left: {info["cornerCoordinates"]["upperLeft"]}; ' + f'lower right: {info["cornerCoordinates"]["lowerRight"]}' ) values = read_as_array(raster) @@ -261,7 +261,7 @@ def main(): '-r', '--resolution', type=float, - help='Desired output resolution in meters ' '(default is the max resolution of all the input files)', + help='Desired output resolution in meters (default is the max resolution of all the input files)', ) parser.add_argument('-v', '--verbose', action='store_true', help='Turn on verbose logging') args = parser.parse_args() diff --git a/src/asf_tools/hydrosar/flood_map.py b/src/asf_tools/hydrosar/flood_map.py index 3702c17..72e7b70 100644 --- a/src/asf_tools/hydrosar/flood_map.py +++ b/src/asf_tools/hydrosar/flood_map.py @@ -384,7 +384,7 @@ def _get_cli(interface: Literal['hyp3', 'main']) -> argparse.ArgumentParser: '--known-water-threshold', type=optional_float, default=None, - help='Threshold for extracting known water area in percent.' ' If `None`, threshold will be calculated.', + help='Threshold for extracting known water area in percent. If `None`, threshold will be calculated.', ) parser.add_argument( '--minimization-metric', @@ -421,7 +421,7 @@ def _get_cli(interface: Literal['hyp3', 'main']) -> argparse.ArgumentParser: type=int, nargs=2, default=[0, 15], - help='Minimum and maximum bound on the flood depths calculated using the iterative ' 'estimator.', + help='Minimum and maximum bound on the flood depths calculated using the iterative estimator.', ) else: raise NotImplementedError(f'Unknown interface: {interface}') diff --git a/src/asf_tools/hydrosar/hand/calculate.py b/src/asf_tools/hydrosar/hand/calculate.py index 198b349..cb9a985 100644 --- a/src/asf_tools/hydrosar/hand/calculate.py +++ b/src/asf_tools/hydrosar/hand/calculate.py @@ -226,8 +226,7 @@ def main(): '--acc-threshold', type=none_or_int, default=100, - help='Accumulation threshold for determining the drainage mask. ' - 'If `None`, the mean accumulation value is used', + help='Accumulation threshold for determining the drainage mask. If `None`, the mean accumulation value is used', ) parser.add_argument('-v', '--verbose', action='store_true', help='Turn on verbose logging') diff --git a/src/asf_tools/watermasking/generate_osm_tiles.py b/src/asf_tools/watermasking/generate_osm_tiles.py index 3d42575..5d5741e 100644 --- a/src/asf_tools/watermasking/generate_osm_tiles.py +++ b/src/asf_tools/watermasking/generate_osm_tiles.py @@ -102,7 +102,7 @@ def extract_water(water_file, lat, lon, tile_width_deg, tile_height_deg, interio tile_geojson = tile + '.geojson' # Extract tile from the main pbf, then convert it to a tif. - bbox = f'--bbox {lon},{lat},{lon+tile_width_deg},{lat+tile_height_deg}' + bbox = f'--bbox {lon},{lat},{lon + tile_width_deg},{lat + tile_height_deg}' extract_command = f'osmium extract -s smart -S tags=natural=water {bbox} {water_file} -o {tile_pbf}'.split(' ') export_command = f'osmium export --geometry-types=polygon {tile_pbf} -o {tile_geojson}'.split(' ') subprocess.run(extract_command)