공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Kernel.euclidean
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
유클리드 (직선) 거리를 기반으로 거리 커널을 생성합니다.
사용 | 반환 값 |
---|
ee.Kernel.euclidean(radius, units, normalize, magnitude) | 커널 |
인수 | 유형 | 세부정보 |
---|
radius | 부동 소수점 수 | 생성할 커널의 반경입니다. |
units | 문자열, 기본값: 'pixels' | 커널의 측정 시스템입니다 ('픽셀' 또는 '미터'). 커널이 미터로 지정된 경우 확대/축소 수준이 변경되면 크기가 조절됩니다. |
normalize | 불리언, 기본값: false | 커널 값을 합계 1로 정규화합니다. |
magnitude | 부동 소수점 수, 기본값: 1 | 각 값을 이 금액으로 조정합니다. |
예
코드 편집기 (JavaScript)
print('A Euclidean distance kernel', ee.Kernel.euclidean({radius: 3}));
/**
* Output weights matrix (up to 1/1000 precision for brevity)
*
* [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]
* [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]
* [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]
* [3.000, 2.000, 1.000, 0.000, 1.000, 2.000, 3.000]
* [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]
* [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]
* [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]
*/
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
print('A Euclidean distance kernel:')
pprint(ee.Kernel.euclidean(**{'radius': 3}).getInfo())
# Output weights matrix (up to 1/1000 precision for brevity)
# [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]
# [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]
# [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]
# [3.000, 2.000, 1.000, 0.000, 1.000, 2.000, 3.000]
# [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]
# [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]
# [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eGenerates a kernel to weight pixels based on their straight-line distance from the center.\u003c/p\u003e\n"],["\u003cp\u003eKernel values represent the Euclidean distance from the center pixel, optionally normalized and scaled.\u003c/p\u003e\n"],["\u003cp\u003eThe radius of the kernel and units of measurement (pixels or meters) are configurable.\u003c/p\u003e\n"],["\u003cp\u003eWhen specified in meters, the kernel automatically resizes with zoom level changes.\u003c/p\u003e\n"]]],["The `ee.Kernel.euclidean` function generates a distance kernel based on Euclidean distance, returning a Kernel object. Key parameters include `radius`, determining the kernel's size; `units` (\"pixels\" or \"meters\"), dictating the measurement system; `normalize` (default: false), setting whether values sum to 1; and `magnitude` (default: 1), scaling values. An example kernel with a radius of 3 is demonstrated, illustrating the output weight matrix.\n"],null,["# ee.Kernel.euclidean\n\nGenerates a distance kernel based on Euclidean (straight-line) distance.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------------|---------|\n| `ee.Kernel.euclidean(radius, `*units* `, `*normalize* `, `*magnitude*`)` | Kernel |\n\n| Argument | Type | Details |\n|-------------|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `radius` | Float | The radius of the kernel to generate. |\n| `units` | String, default: \"pixels\" | 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. |\n| `normalize` | Boolean, default: false | Normalize the kernel values to sum to 1. |\n| `magnitude` | Float, default: 1 | Scale each value by this amount. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint('A Euclidean distance kernel', ee.Kernel.euclidean({radius: 3}));\n\n/**\n * Output weights matrix (up to 1/1000 precision for brevity)\n *\n * [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]\n * [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]\n * [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]\n * [3.000, 2.000, 1.000, 0.000, 1.000, 2.000, 3.000]\n * [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]\n * [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]\n * [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]\n */\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nfrom pprint import pprint\n\nprint('A Euclidean distance kernel:')\npprint(ee.Kernel.euclidean(**{'radius': 3}).getInfo())\n\n# Output weights matrix (up to 1/1000 precision for brevity)\n\n# [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]\n# [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]\n# [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]\n# [3.000, 2.000, 1.000, 0.000, 1.000, 2.000, 3.000]\n# [3.162, 2.236, 1.414, 1.000, 1.414, 2.236, 3.162]\n# [3.605, 2.828, 2.236, 2.000, 2.236, 2.828, 3.605]\n# [4.242, 3.605, 3.162, 3.000, 3.162, 3.605, 4.242]\n```"]]