Clarify custom spatial granularity support
Browse files
spatial_serving/grid_to_polygons.py
CHANGED
|
@@ -106,7 +106,7 @@ def _iter_feature_masks(polygons, out_shape: tuple[int, int], transform, all_tou
|
|
| 106 |
|
| 107 |
|
| 108 |
def aggregate_grid_to_polygons(config: PolygonAggregationConfig) -> dict[str, object]:
|
| 109 |
-
"""Aggregate one FireWx-FM probability grid to
|
| 110 |
|
| 111 |
The model remains gridded. This adapter changes only the serving unit by
|
| 112 |
area-overlaying the grid with user-provided polygons.
|
|
@@ -159,7 +159,7 @@ def aggregate_grid_to_polygons(config: PolygonAggregationConfig) -> dict[str, ob
|
|
| 159 |
|
| 160 |
|
| 161 |
def _parse_args() -> argparse.Namespace:
|
| 162 |
-
parser = argparse.ArgumentParser(description="Aggregate FireWx-FM grid probabilities to
|
| 163 |
parser.add_argument("--probability-npz", required=True, help="NPZ containing prob, lat, and lon arrays.")
|
| 164 |
parser.add_argument("--polygons", required=True, help="Polygon file readable by GeoPandas.")
|
| 165 |
parser.add_argument("--output", required=True, help="Output .geojson, .gpkg, or .csv path.")
|
|
|
|
| 106 |
|
| 107 |
|
| 108 |
def aggregate_grid_to_polygons(config: PolygonAggregationConfig) -> dict[str, object]:
|
| 109 |
+
"""Aggregate one FireWx-FM probability grid to user-defined polygon units.
|
| 110 |
|
| 111 |
The model remains gridded. This adapter changes only the serving unit by
|
| 112 |
area-overlaying the grid with user-provided polygons.
|
|
|
|
| 159 |
|
| 160 |
|
| 161 |
def _parse_args() -> argparse.Namespace:
|
| 162 |
+
parser = argparse.ArgumentParser(description="Aggregate FireWx-FM grid probabilities to user-defined polygon granularities.")
|
| 163 |
parser.add_argument("--probability-npz", required=True, help="NPZ containing prob, lat, and lon arrays.")
|
| 164 |
parser.add_argument("--polygons", required=True, help="Polygon file readable by GeoPandas.")
|
| 165 |
parser.add_argument("--output", required=True, help="Output .geojson, .gpkg, or .csv path.")
|