From d9073dc7ed675de77700ea60a2d0d4ef5d2d14b9 Mon Sep 17 00:00:00 2001 From: Ball JGC Date: Sun, 1 Oct 2023 17:01:05 +0000 Subject: [PATCH] tidy formatting --- detectree2/models/outputs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/detectree2/models/outputs.py b/detectree2/models/outputs.py index fac8340b..690c04dc 100644 --- a/detectree2/models/outputs.py +++ b/detectree2/models/outputs.py @@ -22,6 +22,9 @@ from shapely.geometry import Polygon, box, shape from shapely.ops import orient +# Type aliases definitions +Feature = Dict[str, Any] +GeoFile = Dict[str, Union[str, Dict[str, str], List[Feature]]] def polygon_from_mask(masked_arr): """Convert RLE data from the output instances into Polygons. @@ -182,7 +185,7 @@ def project_to_geojson(tiles_path, pred_fold=None, output_fold=None, multi_class }, }, "features": [], - } # type: Dict[str, Union[str, Dict[str, Any], List[Dict[str, Any]]]] + } # type: GeoFile # load the json file we need to convert into a geojson with open(filename, "r") as prediction_file: