Skip to content

Commit

Permalink
Fix python definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
milos.colic committed Jan 2, 2024
1 parent 0bdae01 commit 4d91d00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/mosaic/api/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def st_convexhull(geom: ColumnOrName) -> Column:
)


def st_concavehull(geom: ColumnOrName, concavity: ColumnOrName, has_holes: ColumnOrName = lit(False)) -> Column:
def st_concavehull(geom: ColumnOrName, concavity: ColumnOrName, has_holes: Any = False) -> Column:
"""
Compute the concave hull of a geometry or multi-geometry object.
It uses lengthRatio and
Expand All @@ -182,6 +182,10 @@ def st_concavehull(geom: ColumnOrName, concavity: ColumnOrName, has_holes: Colum
A polygon
"""

if type(has_holes) == bool:
has_holes = lit(has_holes)

return config.mosaic_context.invoke_function(
"st_concavehull",
pyspark_to_java_column(geom),
Expand Down

0 comments on commit 4d91d00

Please sign in to comment.