Skip to content

Commit 4ac591e

Browse files
authored
Merge branch 'main' into main_chelsealin_generic
2 parents 5382458 + 5e006e4 commit 4ac591e

File tree

68 files changed

+2475
-1016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2475
-1016
lines changed

bigframes/bigquery/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
st_intersection,
4141
st_isclosed,
4242
st_length,
43+
st_simplify,
4344
)
4445
from bigframes.bigquery._operations.json import (
4546
json_extract,
@@ -80,6 +81,7 @@
8081
st_intersection,
8182
st_isclosed,
8283
st_length,
84+
st_simplify,
8385
# json ops
8486
json_extract,
8587
json_extract_array,

bigframes/bigquery/_operations/geo.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,3 +675,23 @@ def st_length(
675675
series = series._apply_unary_op(ops.GeoStLengthOp(use_spheroid=use_spheroid))
676676
series.name = None
677677
return series
678+
679+
680+
def st_simplify(
681+
geography: "bigframes.series.Series",
682+
tolerance_meters: float,
683+
) -> "bigframes.series.Series":
684+
"""Returns a simplified version of the input geography.
685+
686+
Args:
687+
geography (bigframes.series.Series):
688+
A Series containing GEOGRAPHY data.
689+
tolerance_meters (float):
690+
A float64 value indicating the tolerance in meters.
691+
692+
Returns:
693+
a Series containing the simplified GEOGRAPHY data.
694+
"""
695+
return geography._apply_unary_op(
696+
ops.GeoStSimplifyOp(tolerance_meters=tolerance_meters)
697+
)

0 commit comments

Comments
 (0)