Объявление : Все некоммерческие проекты, зарегистрированные для использования Earth Engine до
15 апреля 2025 года, должны
подтвердить право на некоммерческое использование для сохранения доступа. Если вы не подтвердите право до 26 сентября 2025 года, ваш доступ может быть приостановлен.
Отправить отзыв
ee.ImageCollection.reduceToImage
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Создает изображение из коллекции объектов, применяя редуктор к выбранным свойствам всех объектов, пересекающих каждый пиксель.
Использование Возврат ImageCollection. reduceToImage (properties, reducer)
Изображение
Аргумент Тип Подробности это: collection
FeatureCollection Коллекция признаков для пересечения с каждым выходным пикселем. properties
Список Свойства для выбора из каждого объекта и передачи в редуктор. reducer
Редуктор Редуктор для объединения свойств каждого пересекающегося объекта в конечный результат для сохранения в пикселе.
Примеры Редактор кода (JavaScript)
var col = ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . BBox ( - 124.0 , 43.2 , - 116.5 , 46.3 ))
. filterDate ( '2021' , '2022' );
// Image visualization settings.
var visParams = {
bands : [ 'B4' , 'B3' , 'B2' ],
min : 0.01 ,
max : 0.25
};
Map . addLayer ( col . mean (), visParams , 'RGB mean' );
// Reduce the geometry (footprint) of images in the collection to an image.
// Image property values are applied to the pixels intersecting each
// image's geometry and then a per-pixel reduction is performed according
// to the selected reducer. Here, the image cloud cover property is assigned
// to the pixels intersecting image geometry and then reduced to a single
// image representing the per-pixel mean image cloud cover.
var meanCloudCover = col . reduceToImage ({
properties : [ 'CLOUD_COVER' ],
reducer : ee . Reducer . mean ()
});
Map . setCenter ( - 119.87 , 44.76 , 6 );
Map . addLayer ( meanCloudCover , { min : 0 , max : 50 }, 'Cloud cover mean' ); Настройка Python
Информацию об API Python и использовании geemap
для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap Colab (Python)
col = (
ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . BBox ( - 124.0 , 43.2 , - 116.5 , 46.3 ))
. filterDate ( '2021' , '2022' )
)
# Image visualization settings.
vis_params = { 'bands' : [ 'B4' , 'B3' , 'B2' ], 'min' : 0.01 , 'max' : 0.25 }
m = geemap . Map ()
m . add_layer ( col . mean (), vis_params , 'RGB mean' )
# Reduce the geometry (footprint) of images in the collection to an image.
# Image property values are applied to the pixels intersecting each
# image's geometry and then a per-pixel reduction is performed according
# to the selected reducer. Here, the image cloud cover property is assigned
# to the pixels intersecting image geometry and then reduced to a single
# image representing the per-pixel mean image cloud cover.
mean_cloud_cover = col . reduceToImage (
properties = [ 'CLOUD_COVER' ], reducer = ee . Reducer . mean ()
)
m . set_center ( - 119.87 , 44.76 , 6 )
m . add_layer ( mean_cloud_cover , { 'min' : 0 , 'max' : 50 }, 'Cloud cover mean' )
m ,Создает изображение из коллекции объектов, применяя редуктор к выбранным свойствам всех объектов, пересекающих каждый пиксель.
Использование Возврат ImageCollection. reduceToImage (properties, reducer)
Изображение
Аргумент Тип Подробности это: collection
FeatureCollection Коллекция признаков для пересечения с каждым выходным пикселем. properties
Список Свойства для выбора из каждого объекта и передачи в редуктор. reducer
Редуктор Редуктор для объединения свойств каждого пересекающегося объекта в конечный результат для сохранения в пикселе.
Примеры Редактор кода (JavaScript)
var col = ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . BBox ( - 124.0 , 43.2 , - 116.5 , 46.3 ))
. filterDate ( '2021' , '2022' );
// Image visualization settings.
var visParams = {
bands : [ 'B4' , 'B3' , 'B2' ],
min : 0.01 ,
max : 0.25
};
Map . addLayer ( col . mean (), visParams , 'RGB mean' );
// Reduce the geometry (footprint) of images in the collection to an image.
// Image property values are applied to the pixels intersecting each
// image's geometry and then a per-pixel reduction is performed according
// to the selected reducer. Here, the image cloud cover property is assigned
// to the pixels intersecting image geometry and then reduced to a single
// image representing the per-pixel mean image cloud cover.
var meanCloudCover = col . reduceToImage ({
properties : [ 'CLOUD_COVER' ],
reducer : ee . Reducer . mean ()
});
Map . setCenter ( - 119.87 , 44.76 , 6 );
Map . addLayer ( meanCloudCover , { min : 0 , max : 50 }, 'Cloud cover mean' ); Настройка Python
Информацию об API Python и использовании geemap
для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap Colab (Python)
col = (
ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . BBox ( - 124.0 , 43.2 , - 116.5 , 46.3 ))
. filterDate ( '2021' , '2022' )
)
# Image visualization settings.
vis_params = { 'bands' : [ 'B4' , 'B3' , 'B2' ], 'min' : 0.01 , 'max' : 0.25 }
m = geemap . Map ()
m . add_layer ( col . mean (), vis_params , 'RGB mean' )
# Reduce the geometry (footprint) of images in the collection to an image.
# Image property values are applied to the pixels intersecting each
# image's geometry and then a per-pixel reduction is performed according
# to the selected reducer. Here, the image cloud cover property is assigned
# to the pixels intersecting image geometry and then reduced to a single
# image representing the per-pixel mean image cloud cover.
mean_cloud_cover = col . reduceToImage (
properties = [ 'CLOUD_COVER' ], reducer = ee . Reducer . mean ()
)
m . set_center ( - 119.87 , 44.76 , 6 )
m . add_layer ( mean_cloud_cover , { 'min' : 0 , 'max' : 50 }, 'Cloud cover mean' )
m
Отправить отзыв
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0" , а примеры кода – по лицензии Apache 2.0 . Подробнее об этом написано в правилах сайта . Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-24 UTC.
Хотите рассказать подробнее?
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-24 UTC."],[],[]]