28
28
def st_area (series : bigframes .series .Series ) -> bigframes .series .Series :
29
29
"""
30
30
Returns the area in square meters covered by the polygons in the input
31
- GEOGRAPHY.
31
+ ` GEOGRAPHY` .
32
32
33
33
If geography_expression is a point or a line, returns zero. If
34
34
geography_expression is a collection, returns the area of the polygons
35
35
in the collection; if the collection doesn't contain polygons, returns zero.
36
36
37
37
38
- ..note::
38
+ .. note::
39
39
BigQuery's Geography functions, like `st_area`, interpret the geometry
40
40
data type as a point set on the Earth's surface. A point set is a set
41
41
of points, lines, and polygons on the WGS84 reference spheroid, with
@@ -98,14 +98,14 @@ def st_difference(
98
98
series : bigframes .series .Series , other : bigframes .series .Series
99
99
) -> bigframes .series .Series :
100
100
"""
101
- Returns a GEOGRAPHY that represents the point set difference of
101
+ Returns a ` GEOGRAPHY` that represents the point set difference of
102
102
`geography_1` and `geography_2`. Therefore, the result consists of the part
103
103
of `geography_1` that doesn't intersect with `geography_2`.
104
104
105
- If `geometry_1` is completely contained in `geometry_2`, then ST_DIFFERENCE
106
- returns an empty GEOGRAPHY.
105
+ If `geometry_1` is completely contained in `geometry_2`, then ` ST_DIFFERENCE`
106
+ returns an empty ` GEOGRAPHY` .
107
107
108
- ..note::
108
+ .. note::
109
109
BigQuery's Geography functions, like `st_difference`, interpret the geometry
110
110
data type as a point set on the Earth's surface. A point set is a set
111
111
of points, lines, and polygons on the WGS84 reference spheroid, with
@@ -119,7 +119,7 @@ def st_difference(
119
119
>>> from shapely.geometry import Polygon, LineString, Point
120
120
>>> bpd.options.display.progress_bar = None
121
121
122
- We can check two GeoSeries against each other, row by row.
122
+ We can check two GeoSeries against each other, row by row:
123
123
124
124
>>> s1 = bigframes.geopandas.GeoSeries(
125
125
... [
@@ -168,32 +168,32 @@ def st_difference(
168
168
169
169
We can also check difference of single shapely geometries:
170
170
171
- >>> sbq1 = bigframes.geopandas.GeoSeries(
171
+ >>> polygon_s1 = bigframes.geopandas.GeoSeries(
172
172
... [
173
173
... Polygon([(0, 0), (10, 0), (10, 10), (0, 0)])
174
174
... ]
175
175
... )
176
- >>> sbq2 = bigframes.geopandas.GeoSeries(
176
+ >>> polygon_s2 = bigframes.geopandas.GeoSeries(
177
177
... [
178
178
... Polygon([(4, 2), (6, 2), (8, 6), (4, 2)])
179
179
... ]
180
180
... )
181
181
182
- >>> sbq1
182
+ >>> polygon_s1
183
183
0 POLYGON ((0 0, 10 0, 10 10, 0 0))
184
184
dtype: geometry
185
185
186
- >>> sbq2
186
+ >>> polygon_s2
187
187
0 POLYGON ((4 2, 6 2, 8 6, 4 2))
188
188
dtype: geometry
189
189
190
- >>> bbq.st_difference(sbq1, sbq2 )
190
+ >>> bbq.st_difference(polygon_s1, polygon_s2 )
191
191
0 POLYGON ((0 0, 10 0, 10 10, 0 0), (8 6, 6 2, 4...
192
192
dtype: geometry
193
193
194
194
Additionally, we can check difference of a GeoSeries against a single shapely geometry:
195
195
196
- >>> bbq.st_difference(s1, sbq2 )
196
+ >>> bbq.st_difference(s1, polygon_s2 )
197
197
0 POLYGON ((0 0, 2 2, 0 2, 0 0))
198
198
1 None
199
199
2 None
0 commit comments