Объявление : Все некоммерческие проекты, зарегистрированные для использования Earth Engine до
15 апреля 2025 года, должны
подтвердить право на некоммерческое использование для сохранения доступа. Если вы не подтвердите право до 26 сентября 2025 года, ваш доступ может быть приостановлен.
Отправить отзыв
ee.FeatureCollection.copyProperties
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Копирует свойства метаданных из одного элемента в другой.
Использование Возврат FeatureCollection. copyProperties ( source , properties , exclude ) Элемент
Аргумент Тип Подробности это: destination Элемент, по умолчанию: null Объект, свойства которого необходимо переопределить. source Элемент, по умолчанию: null Объект, из которого копируются свойства. properties Список, по умолчанию: null Копируемые свойства. Если не указано, копируются все обычные (т. е. несистемные) свойства. exclude Список, по умолчанию: null Список свойств, которые следует исключить при копировании всех свойств. Не следует указывать, если есть свойства.
Примеры Редактор кода (JavaScript)
// Import a Landsat 8 surface reflectance image to sample.
var image = ee . Image ( 'LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722' )
// Select the optical bands.
. select ([ 'SR_B.' ]);
// Get the image geometry to define the geographical bounds of the sample.
var imageBounds = image . geometry ();
// Sample the image at a set of random points; a feature collection is returned.
var pointSampleFc = image . sample (
{ region : imageBounds , scale : 30 , numPixels : 5 , geometries : true });
// Copy image properties to the FeatureCollection; three options follow.
print ( 'All non-system image properties copied to the FeatureCollection' ,
pointSampleFc . copyProperties ( image ));
print ( 'Selected image properties copied to the FeatureCollection' ,
pointSampleFc . copyProperties ({
source : image ,
properties : [ 'system:time_start' , 'SPACECRAFT_ID' ]
}));
print ( 'All but selected image properties copied to the FeatureCollection' ,
pointSampleFc . copyProperties ({
source : image ,
exclude : [ 'TIRS_SSM_MODEL' , 'TIRS_SSM_POSITION_STATUS' ]
})); Настройка Python
Информацию об API Python и использовании geemap для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap Colab (Python)
# Import a Landsat 8 surface reflectance image to sample.
image = ee . Image ( 'LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722' ) . select (
# Select the optical bands.
[ 'SR_B.' ])
# Get the image geometry to define the geographical bounds of the sample.
image_bounds = image . geometry ()
# Sample the image at a set of random points; a feature collection is returned.
point_sample_fc = image . sample (
** { 'region' : image_bounds , 'scale' : 30 , 'numPixels' : 5 , 'geometries' : True })
# Copy image properties to the FeatureCollection; three options follow.
print ( 'All non-system image properties copied to the FeatureCollection:' ,
point_sample_fc . copyProperties ( image ) . getInfo ())
print ( 'Selected image properties copied to the FeatureCollection:' ,
point_sample_fc . copyProperties ( ** {
'source' : image ,
'properties' : [ 'system:time_start' , 'SPACECRAFT_ID' ]
}) . getInfo ())
print ( 'All but selected image properties copied to the FeatureCollection:' ,
point_sample_fc . copyProperties ( ** {
'source' : image ,
'exclude' : [ 'TIRS_SSM_MODEL' , 'TIRS_SSM_POSITION_STATUS' ]
}) . getInfo ())
Отправить отзыв
Если не указано иное, контент на этой странице предоставляется по лицензии 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."],[],[]]