Die Earth Engine führt
nicht kommerzielle Kontingentstufen ein, um gemeinsam genutzte Rechenressourcen zu schützen und eine zuverlässige Leistung für alle sicherzustellen. Für alle nicht kommerziellen Projekte muss bis zum
27. April 2026 eine Kontingentstufe ausgewählt werden. Geschieht dies nicht, wird standardmäßig die Stufe „Community“ verwendet. Die Stufenkontingente treten für alle Projekte (unabhängig vom Datum der Stufenauswahl) am
27. April 2026 in Kraft.
Weitere Informationen
ee.List.splice
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Entfernt ab dem Startindex „count“-Elemente aus der Liste und fügt an dieser Stelle den Inhalt von „other“ ein. Wenn „start“ negativ ist, wird vom Ende der Liste rückwärts gezählt.
| Nutzung | Ausgabe |
|---|
List.splice(start, count, other) | Liste |
| Argument | Typ | Details |
|---|
So gehts: list | Liste | |
start | Ganzzahl | |
count | Ganzzahl | |
other | Liste, Standard: null | |
Beispiele
Code-Editor (JavaScript)
// An ee.List object.
var list = ee.List([0, 1, 2, 3, 4]);
print('Original list', list);
// If "other" argument is null, elements at positions specified by "start" and
// "count" are deleted. Here, the 3rd element is removed.
print('Remove 1 element', list.splice({start: 2, count: 1, other: null}));
// If "start" is negative, the position is from the end of the list.
print('Remove 2nd from last element', list.splice(-2, 1));
// Deletes 3 elements starting at position 1.
print('Remove multiple sequential elements', list.splice(1, 3));
// Insert elements from the "other" list without deleting existing elements
// by specifying the insert "start" position and setting "count" to 0.
print('Insert new elements', list.splice(2, 0, ['X', 'Y', 'Z']));
// Replace existing elements with those from the "other" list by specifying the
// "start" position to replace and the "count" of proceeding elements. If
// length of "other" list is greater than "count", the remaining "other"
// elements are inserted, they do not replace existing elements.
print('Replace elements', list.splice(2, 3, ['X', 'Y', 'Z']));
Python einrichten
Informationen zur Python API und zur Verwendung von geemap für die interaktive Entwicklung finden Sie auf der Seite
Python-Umgebung.
import ee
import geemap.core as geemap
Colab (Python)
# An ee.List object.
ee_list = ee.List([0, 1, 2, 3, 4])
display('Original list:', ee_list)
# If "other" argument is None, elements at positions specified by "start" and
# "count" are deleted. Here, the 3rd element is removed.
display('Remove 1 element:',
ee_list.splice(start=2, count=1, other=None))
# If "start" is negative, the position is from the end of the list.
display('Remove 2nd from last element:', ee_list.splice(-2, 1))
# Deletes 3 elements starting at position 1.
display('Remove multiple sequential elements:', ee_list.splice(1, 3))
# Insert elements from the "other" list without deleting existing elements
# by specifying the insert "start" position and setting "count" to 0.
display('Insert new elements:', ee_list.splice(2, 0, ['X', 'Y', 'Z']))
# Replace existing elements with those from the "other" list by specifying the
# "start" position to replace and the "count" of proceeding elements. If
# length of "other" list is greater than "count", the remaining "other"
# elements are inserted, they do not replace existing elements.
display('Replace elements:', ee_list.splice(2, 3, ['X', 'Y', 'Z']))
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-10-30 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-10-30 (UTC)."],[],[]]