Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ee.List.sequence
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Başlangıçtan sona (dahil) adım artışlarıyla veya eşit aralıklı artışlarla bir sayı dizisi oluşturun. Bitiş belirtilmemişse başlangıç + adım * sayı ile hesaplanır. Bu nedenle, bitiş veya sayıdan en az biri belirtilmelidir.
Kullanım | İadeler |
---|
ee.List.sequence(start, end, step, count) | Liste |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
start | Sayı | Başlangıç sayısı. |
end | Sayı, varsayılan: null | Bitiş sayısı. |
step | Sayı, varsayılan: 1 | Artış. |
count | Tam sayı, varsayılan: null | Artış sayısı. |
Örnekler
Kod Düzenleyici (JavaScript)
print(ee.List.sequence(0, 5)); // [0,1,2,3,4,5]
print(ee.List.sequence(0, 10, 2)); // [0,2,4,6,8,10]
print(ee.List.sequence(0, null, 2, 6)); // [0,2,4,6,8,10]
print(ee.List.sequence(0, null, -2, 6)); // [0,-2,-4,-6,-8,-10]
// Step ignored when present along with count.
print(ee.List.sequence(0, 10, 2, 999)); // 999 elements
print(ee.List.sequence(0, 10, 2, 3)); // [0,5,10]
// Using a dictionary for arguments.
print(ee.List.sequence({start:10, count:3})); // [10,11,12]
print(ee.List.sequence({start:3, step:2, end:6})); // [3,5]
// [-1000000000,0,1000000000]
print(ee.List.sequence({start:-1e9, end:1e9, count:3}));
Python kurulumu
Python API'si ve etkileşimli geliştirme için geemap
kullanımı hakkında bilgi edinmek üzere
Python Ortamı sayfasına bakın.
import ee
import geemap.core as geemap
Colab (Python)
print(ee.List.sequence(0, 5).getInfo()) # [0, 1, 2, 3, 4, 5]
print(ee.List.sequence(0, 10, 2).getInfo()) # [0, 2, 4, 6, 8, 10]
print(ee.List.sequence(0, None, 2, 6).getInfo()) # [0, 2, 4, 6, 8, 10]
print(ee.List.sequence(0, None, -2, 6).getInfo()) # [0, -2, -4, -6, -8, -10]
# Step ignored when present along with count.
print(ee.List.sequence(0, 10, 2, 999).getInfo()) # 999 elements
print(ee.List.sequence(0, 10, 2, 3).getInfo()) # [0, 5, 10]
# Using a dictionary for arguments.
print(ee.List.sequence(start=10, count=3).getInfo()) # [10, 11, 12]
print(ee.List.sequence(start=3, step=2, end=6).getInfo()) # [3, 5]
# [-1000000000, 0, 1000000000]
print(ee.List.sequence(start=-1e9, end=1e9, count=3).getInfo())
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eee.List.sequence\u003c/code\u003e generates a list of numbers within a specified range, determined by \u003ccode\u003estart\u003c/code\u003e, \u003ccode\u003eend\u003c/code\u003e, \u003ccode\u003estep\u003c/code\u003e, and \u003ccode\u003ecount\u003c/code\u003e parameters.\u003c/p\u003e\n"],["\u003cp\u003eYou must define either the \u003ccode\u003eend\u003c/code\u003e or \u003ccode\u003ecount\u003c/code\u003e parameter alongside the \u003ccode\u003estart\u003c/code\u003e parameter to determine the sequence range.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003estep\u003c/code\u003e parameter defines the increment between numbers in the sequence and defaults to 1 if not specified.\u003c/p\u003e\n"],["\u003cp\u003eWhen both \u003ccode\u003estep\u003c/code\u003e and \u003ccode\u003ecount\u003c/code\u003e are specified, \u003ccode\u003estep\u003c/code\u003e is ignored and the sequence is divided into equally spaced increments based on \u003ccode\u003ecount\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can provide arguments as a dictionary using keys like \u003ccode\u003estart\u003c/code\u003e, \u003ccode\u003eend\u003c/code\u003e, \u003ccode\u003estep\u003c/code\u003e, and \u003ccode\u003ecount\u003c/code\u003e for better readability.\u003c/p\u003e\n"]]],[],null,["# ee.List.sequence\n\nGenerate a sequence of numbers from start to end (inclusive) in increments of step, or in count equally-spaced increments. If end is not specified it is computed from start + step \\* count, so at least one of end or count must be specified.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------|---------|\n| `ee.List.sequence(start, `*end* `, `*step* `, `*count*`)` | List |\n\n| Argument | Type | Details |\n|----------|------------------------|---------------------------|\n| `start` | Number | The starting number. |\n| `end` | Number, default: null | The ending number. |\n| `step` | Number, default: 1 | The increment. |\n| `count` | Integer, default: null | The number of increments. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint(ee.List.sequence(0, 5)); // [0,1,2,3,4,5]\nprint(ee.List.sequence(0, 10, 2)); // [0,2,4,6,8,10]\nprint(ee.List.sequence(0, null, 2, 6)); // [0,2,4,6,8,10]\nprint(ee.List.sequence(0, null, -2, 6)); // [0,-2,-4,-6,-8,-10]\n\n// Step ignored when present along with count.\nprint(ee.List.sequence(0, 10, 2, 999)); // 999 elements\nprint(ee.List.sequence(0, 10, 2, 3)); // [0,5,10]\n\n// Using a dictionary for arguments.\nprint(ee.List.sequence({start:10, count:3})); // [10,11,12]\nprint(ee.List.sequence({start:3, step:2, end:6})); // [3,5]\n// [-1000000000,0,1000000000]\nprint(ee.List.sequence({start:-1e9, end:1e9, count:3}));\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nprint(ee.List.sequence(0, 5).getInfo()) # [0, 1, 2, 3, 4, 5]\nprint(ee.List.sequence(0, 10, 2).getInfo()) # [0, 2, 4, 6, 8, 10]\nprint(ee.List.sequence(0, None, 2, 6).getInfo()) # [0, 2, 4, 6, 8, 10]\nprint(ee.List.sequence(0, None, -2, 6).getInfo()) # [0, -2, -4, -6, -8, -10]\n\n# Step ignored when present along with count.\nprint(ee.List.sequence(0, 10, 2, 999).getInfo()) # 999 elements\nprint(ee.List.sequence(0, 10, 2, 3).getInfo()) # [0, 5, 10]\n\n# Using a dictionary for arguments.\nprint(ee.List.sequence(start=10, count=3).getInfo()) # [10, 11, 12]\nprint(ee.List.sequence(start=3, step=2, end=6).getInfo()) # [3, 5]\n# [-1000000000, 0, 1000000000]\nprint(ee.List.sequence(start=-1e9, end=1e9, count=3).getInfo())\n```"]]