ee.Date.unitRatio

Возвращает отношение длины одной единицы к длине другой, например, unitRatio('day', 'minute') возвращает 1440. Допустимые единицы: 'year', 'month', 'week', 'day', 'hour', 'minute' и 'second'.

Использование Возвраты
ee.Date.unitRatio(numerator, denominator) Плавать
Аргумент Тип Подробности
numerator Нить
denominator Нить

Примеры

Редактор кода (JavaScript)

print('Minutes in a day', ee.Date.unitRatio('day', 'minute'));
print('Seconds in a year', ee.Date.unitRatio('year', 'second'));
print('Years in a month', ee.Date.unitRatio('month', 'year'));
print('Hours in a week', ee.Date.unitRatio('week', 'hour'));

Настройка Python

Информацию об API Python и использовании geemap для интерактивной разработки см. на странице Python Environment .

import ee
import geemap.core as geemap

Colab (Python)

display('Minutes in a day:', ee.Date.unitRatio('day', 'minute'))
display('Seconds in a year:', ee.Date.unitRatio('year', 'second'))
display('Years in a month:', ee.Date.unitRatio('month', 'year'))
display('Hours in a week:', ee.Date.unitRatio('week', 'hour'))