| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.bigquery.st_convexhull.html | [Back] [Original] |
Section Navigation
Computes the convex hull of a GEOGRAPHY type.
The convex hull is the smallest convex set that contains all of the points in the input GEOGRAPHY.
Note
BigQuerys Geography functions, like st_convexhull, interpret the geometry data type as a point set on the Earths 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 Polygon, LineString, Point
>>> series = bigframes.geopandas.GeoSeries(
... [
... Polygon([(0.0, 0.0), (0.1, 0.1), (0.0, 0.1)]),
... LineString([(0, 0), (1, 1), (0, 1)]),
... Point(0, 1),
... ]
... )
>>> series
0 POLYGON ((0 0, 0.1 0.1, 0 0.1, 0 0))
1 LINESTRING (0 0, 1 1, 0 1)
2 POINT (0 1)
dtype: geometry
>>> bbq.st_convexhull(series)
0 POLYGON ((0 0, 0.1 0.1, 0 0.1, 0 0))
1 POLYGON ((0 0, 1 1, 0 1, 0 0))
2 POINT (0 1)
dtype: geometry
series (bigframes.pandas.Series | bigframes.geopandas.GeoSeries) A series containing geography objects.
A series of geography objects representing the convex hulls.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |