Code Editor (JavaScript)
print('A plus kernel', ee.Kernel.plus({radius: 3}));
/**
* Output weights matrix (1/1000 precision shown for brevity)
*
* [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
* [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
* [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
* [0.076, 0.076, 0.076, 0.076, 0.076, 0.076, 0.076]
* [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
* [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
* [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
*/
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
print('A plus kernel:')
pprint(ee.Kernel.plus(**{'radius': 3}).getInfo())
# Output weights matrix (1/1000 precision shown for brevity)
# [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
# [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
# [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
# [0.076, 0.076, 0.076, 0.076, 0.076, 0.076, 0.076]
# [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
# [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]
# [0.000, 0.000, 0.000, 0.076, 0.000, 0.000, 0.000]