Skip to content

Commit 128aefb

Browse files
committed
feat(cli): add CLI function for generalize_fences
Added a CLI parameter type called GeoPackageOptionMandatory for cases when reference data must be passed to an algorithm.
1 parent db90f54 commit 128aefb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/geogenalg/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from geogenalg.application.generalize_clusters_to_centroids import (
2424
GeneralizePointClustersAndPolygonsToCentroids,
2525
)
26+
from geogenalg.application.generalize_fences import GeneralizeFences
2627
from geogenalg.utility.dataframe_processing import read_gdf_from_file_and_set_index
2728

2829
GEOPACKAGE_URI_HELP = (
@@ -194,6 +195,14 @@ def get_class_attribute_docstrings(cls: type[Any]) -> dict[str, str]:
194195
),
195196
]
196197

198+
GeoPackageOptionMandatory = Annotated[
199+
GeoPackageURI,
200+
typer.Option(
201+
parser=geopackage_uri,
202+
help=GEOPACKAGE_URI_HELP,
203+
),
204+
]
205+
197206
ReferenceGeoPackageList = Annotated[
198207
list[NamedGeoPackageURI],
199208
typer.Option(
@@ -270,6 +279,7 @@ def build_app() -> None:
270279
"""
271280
commands_and_algs = {
272281
"clusters_to_centroids": GeneralizePointClustersAndPolygonsToCentroids,
282+
"fences": GeneralizeFences,
273283
}
274284

275285
for cli_command_name, alg in commands_and_algs.items():

0 commit comments

Comments
 (0)