bigframes.bigquery.st_isclosed#
- bigframes.bigquery.st_isclosed(series: Series | GeoSeries) Series[source]#
Returns TRUE for a non-empty Geography, where each element in the Geography has an empty boundary.
Note
BigQuery’s Geography functions, like st_isclosed, interpret the geometry data type as a point set on the Earth’s surface. A point set is a set of points, lines, and polygons on the WGS84 reference spheroid, with geodesic edges. See: https://cloud.google.com/bigquery/docs/geospatial-data
Examples:
>>> import bigframes.geopandas >>> import bigframes.pandas as bpd >>> import bigframes.bigquery as bbq
>>> from shapely.geometry import Point, LineString, Polygon
>>> series = bigframes.geopandas.GeoSeries( ... [ ... Point(0, 0), # Point ... LineString([(0, 0), (1, 1)]), # Open LineString ... LineString([(0, 0), (1, 1), (0, 1), (0, 0)]), # Closed LineString ... Polygon([(0, 0), (1, 1), (0, 1), (0, 0)]), ... None, ... ] ... ) >>> series 0 POINT (0 0) 1 LINESTRING (0 0, 1 1) 2 LINESTRING (0 0, 1 1, 0 1, 0 0) 3 POLYGON ((0 0, 1 1, 0 1, 0 0)) 4 None dtype: geometry
>>> bbq.st_isclosed(series) 0 True 1 False 2 True 3 False 4 <NA> dtype: boolean
- Parameters:
series (bigframes.pandas.Series | bigframes.geopandas.GeoSeries) – A series containing geography objects.
- Returns:
Series of booleans indicating whether each geometry is closed.
- Return type: