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.Image.regexpRename
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Mevcut bant adlarına normal ifade değiştirme uygulayarak bir görüntünün bantlarını yeniden adlandırır. Normal ifadeyle eşleşmeyen bantlar yeniden adlandırılmadan kopyalanır.
Kullanım | İadeler |
---|
Image.regexpRename(regex, replacement, all) | Resim |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
bu: input | Resim | Yeniden adlandırılacak bantları içeren resim. |
regex | Dize | Her grup adında eşleşecek normal ifade. |
replacement | Dize | Her eşleşmenin yerine kullanılacak metin. Yakalanan değerler için $n söz dizimini destekler. |
all | Boole değeri, varsayılan: true | Doğruysa belirli bir dizedeki tüm eşleşmeler değiştirilir. Aksi takdirde, her dizedeki yalnızca ilk eşleşme değiştirilir. |
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\u003eApplies a regular expression to rename image bands, leaving unmatched bands unchanged.\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility to replace all regex matches or only the first match in each band name using the \u003ccode\u003eall\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eUses \u003ccode\u003e$n\u003c/code\u003e syntax in the 'replacement' argument to utilize captured values from the regex.\u003c/p\u003e\n"],["\u003cp\u003eOperates directly on the provided input image and returns a modified image with the renamed bands.\u003c/p\u003e\n"]]],["This functionality renames image bands using regular expressions. It takes an image, a `regex` to match band names, and a `replacement` string (supporting captured groups via `$n`). Bands not matching the `regex` remain unchanged. An optional `all` parameter (defaulting to `true`) determines whether to replace all regex matches or just the first one per band name. The function returns a new image with the updated band names.\n"],null,["# ee.Image.regexpRename\n\nRenames the bands of an image by applying a regular expression replacement to the current band names. Any bands not matched by the regex will be copied over without renaming.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------|---------|\n| Image.regexpRename`(regex, replacement, `*all*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| this: `input` | Image | The image containing the bands to rename. |\n| `regex` | String | A regular expression to match in each band name. |\n| `replacement` | String | The text with which to replace each match. Supports $n syntax for captured values. |\n| `all` | Boolean, default: true | If true, all matches in a given string will be replaced. Otherwise, only the first match in each string will be replaced. |"]]