Returns a square-shaped boolean kernel. Args: radius: The radius of the kernel to generate. units: The system of measurement for the kernel ('pixels' or 'meters'). If the kernel is specified in meters, it will resize when the zoom-level is changed. normalize: N
(
radius: _arg_types.Number,
units: _arg_types.String | None = None,
normalize: _arg_types.Bool | None = None,
magnitude: _arg_types.Number | None = None,
)
| 453 | |
| 454 | @staticmethod |
| 455 | def square( |
| 456 | radius: _arg_types.Number, |
| 457 | units: _arg_types.String | None = None, |
| 458 | normalize: _arg_types.Bool | None = None, |
| 459 | magnitude: _arg_types.Number | None = None, |
| 460 | ) -> Kernel: |
| 461 | """Returns a square-shaped boolean kernel. |
| 462 | |
| 463 | Args: |
| 464 | radius: The radius of the kernel to generate. |
| 465 | units: The system of measurement for the kernel ('pixels' or 'meters'). If |
| 466 | the kernel is specified in meters, it will resize when the zoom-level is |
| 467 | changed. |
| 468 | normalize: Normalize the kernel values to sum to 1. |
| 469 | magnitude: Scale each value by this amount. |
| 470 | """ |
| 471 | |
| 472 | return apifunction.ApiFunction.call_( |
| 473 | 'Kernel.square', radius, units, normalize, magnitude |
| 474 | ) |