@@ -261,7 +261,10 @@ Raster functions: Functions for analyzing geospatial rasters using geographies.
261261### Implementing a new scalar geography operation
262262
263263- [ ] ** Define the operation dataclass:**
264- - [ ] In ` bigframes/operations/geo_ops.py ` , create a new dataclass inheriting from ` base_ops.UnaryOp ` or ` base_ops.BinaryOp ` .
264+ - [ ] In ` bigframes/operations/geo_ops.py ` , create a new dataclass
265+ inheriting from ` base_ops.UnaryOp ` or ` base_ops.BinaryOp ` . Note that
266+ BinaryOp is for methods that take two ** columns** . Any literal values can
267+ be passed as parameters to a UnaryOp.
265268 - [ ] Define the ` name ` of the operation and any parameters it requires.
266269 - [ ] Implement the ` output_type ` method to specify the data type of the result.
267270- [ ] ** Export the new operation:**
@@ -283,13 +286,17 @@ Raster functions: Functions for analyzing geospatial rasters using geographies.
283286 - [ ] Add a comprehensive docstring with examples.
284287 - [ ] In ` bigframes/bigquery/__init__.py ` , import your new user-facing function and add it to the ` __all__ ` list.
285288 - [ ] For a ` GeoSeries ` property or method:
286- - [ ] In ` bigframes/geopandas/geoseries.py ` , create the property or method.
289+ - [ ] In ` bigframes/geopandas/geoseries.py ` , create the property or
290+ method. Omit the docstring.
287291 - [ ] If the operation is not possible to be supported, such as if the
288292 geopandas method returns values in units corresponding to the
289293 coordinate system rather than meters that BigQuery uses, raise a
290- ` NotImplementedError ` with a helpful message.
294+ ` NotImplementedError ` with a helpful message. Likewise, if a
295+ required parameter takes a value in terms of the coordinate
296+ system, but BigQuery uses meters, raise a ` NotImplementedError ` .
291297 - [ ] Otherwise, call ` series._apply_unary_op ` or ` series._apply_binary_op ` , passing the operation dataclass.
292- - [ ] Add a comprehensive docstring with examples.
298+ - [ ] Add a comprehensive docstring with examples to the superclass in
299+ ` third_party/bigframes_vendored/geopandas/geoseries.py ` .
293300- [ ] ** Add Tests:**
294301 - [ ] Add system tests in ` tests/system/small/bigquery/test_geo.py ` or ` tests/system/small/geopandas/test_geoseries.py ` to verify the end-to-end functionality. Test various inputs, including edge cases and ` NULL ` values.
295302 - [ ] If you are overriding a pandas or GeoPandas property and raising ` NotImplementedError ` , add a unit test to ensure the correct error is raised.
0 commit comments