Earth Engine вводит
квоты для некоммерческих проектов , чтобы защитить совместно используемые вычислительные ресурсы и обеспечить надежную работу для всех. Все некоммерческие проекты должны выбрать уровень квот до
27 апреля 2026 года , иначе по умолчанию будет использоваться уровень «Сообщество». Квоты вступят в силу для всех проектов (независимо от даты выбора уровня)
27 апреля 2026 года .
Подробнее.
ee.FeatureCollection.distinct
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Удаляет дубликаты из коллекции. Обратите внимание, что дубликаты определяются с помощью стойкого хэша сериализованной формы выбранных свойств.
| Использование | Возврат | FeatureCollection. distinct (properties) | FeatureCollection |
| Аргумент | Тип | Подробности | это: collection | FeatureCollection | Входная коллекция, из которой будут выбираться объекты. |
properties | Объект | Имя свойства или список имён свойств для сравнения. Свойство '.geo' можно включить для сравнения геометрии объектов. |
Примеры
Редактор кода (JavaScript)
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
print('FeatureCollection of power plants in Belgium', fc);
// Remove duplicate features according to property values.
print('Distinct based on a single property', fc.distinct('fuel1'));
print('Distinct based on two properties', fc.distinct(['fuel1', 'source']));
print('Distinct based on geometry', fc.distinct('.geo')); Настройка Python
Информацию об API Python и использовании geemap для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap
Colab (Python)
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
display('FeatureCollection of power plants in Belgium:', fc)
# Remove duplicate features according to property values.
display('Distinct based on a single property:', fc.distinct('fuel1'))
display('Distinct based on two properties:',
fc.distinct(['fuel1', 'source']))
display('Distinct based on geometry', fc.distinct('.geo'))
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-10-30 UTC.
[null,null,["Последнее обновление: 2025-10-30 UTC."],[],["The `distinct` method removes duplicate features from a `FeatureCollection`. Duplicates are identified by comparing the serialized form of specified properties using a strong hash. The `properties` argument defines the comparison criteria, accepting a single property name or a list, including '.geo' for geometry. The method returns a new `FeatureCollection` with the duplicates removed. Examples are provided for both JavaScript and Python, using power plants in Belgium and properties like 'fuel1', 'source' or geometry to remove duplicates.\n"]]