| 사용 | 반환 값 |
|---|---|
ee.PixelType(precision, minValue, maxValue, dimensions) | PixelType |
| 인수 | 유형 | 세부정보 |
|---|---|---|
precision | 객체 | 픽셀 정밀도입니다('int', 'float', 'double' 중 하나). |
minValue | 숫자, 기본값: null | 이 유형의 최소 픽셀 값입니다. 정밀도가 'float' 또는 'double'인 경우 음의 무한대를 나타내는 null일 수 있습니다. |
maxValue | 숫자, 기본값: null | 이 유형의 픽셀의 최댓값입니다. 정밀도가 'float' 또는 'double'인 경우 양의 무한대를 나타내는 null일 수 있습니다. |
dimensions | 정수, 기본값: 0 | 이 유형의 픽셀이 달라질 수 있는 차원 수입니다. 0은 스칼라, 1은 벡터, 2는 행렬 등입니다. |
예
코드 편집기 (JavaScript)
print(ee.PixelType('int', 0, 1)); // int ∈ [0, 1] print(ee.PixelType('int', -20, -10)); // int ∈ [-20, -10] print(ee.PixelType('float')); // float print(ee.PixelType('double')); // double print(ee.PixelType('double', null)); // double print(ee.PixelType('double', null, null)); // double print(ee.PixelType('double', null, null, 0)); // double print(ee.PixelType('double', null, null, 1)); // double, 1 dimensions print(ee.PixelType('double', null, null, 2)); // double, 2 dimensions print(ee.PixelType('double', null, null, 3)); // double, 3 dimensions print(ee.PixelType('double', null, null, 10)); // double, 10 dimensions print(ee.PixelType('double', null, null, 1e8)); // double, 100000000 dimensions print(ee.PixelType('double', 1, 2, 0)); // double ∈ [1, 2] print(ee.PixelType('double', 1, 3, 2)); // double ∈ [1, 3], 2 dimensions print(ee.PixelType('double', -4, -3, 0)); // double ∈ [-4, -3] print(ee.PixelType('double', null, 2.3, 0)); // double print(ee.PixelType('double', 3.4, null, 0)); // double
import ee import geemap.core as geemap
Colab (Python)
print(ee.PixelType('int', 0, 1).getInfo()) # int ∈ [0, 1] print(ee.PixelType('int', -20, -10).getInfo()) # int ∈ [-20, -10] print(ee.PixelType('float').getInfo()) # float print(ee.PixelType('double').getInfo()) # double print(ee.PixelType('double', None).getInfo()) # double print(ee.PixelType('double', None, None).getInfo()) # double print(ee.PixelType('double', None, None, 0).getInfo()) # double print(ee.PixelType('double', None, None, 1).getInfo()) # double, 1 dimensions print(ee.PixelType('double', None, None, 2).getInfo()) # double, 2 dimensions print(ee.PixelType('double', None, None, 3).getInfo()) # double, 3 dimensions print(ee.PixelType('double', None, None, 10).getInfo()) # double, 10 dimensions # double, 100000000 dimensions print(ee.PixelType('double', None, None, 1e8).getInfo()) print(ee.PixelType('double', 1, 2, 0).getInfo()) # double ∈ [1, 2] # double ∈ [1, 3], 2 dimensions print(ee.PixelType('double', 1, 3, 2).getInfo()) print(ee.PixelType('double', -4, -3, 0).getInfo()) # double ∈ [-4, -3] print(ee.PixelType('double', None, 2.3, 0).getInfo()) # double print(ee.PixelType('double', 3.4, None, 0).getInfo()) # double