ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ee.FeatureCollection.remap
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি সংগ্রহে একটি নির্দিষ্ট সম্পত্তির মান পুনরায় ম্যাপ করে। একটিতে পাওয়া দুটি সমান্তরাল তালিকা এবং মানচিত্র মান অন্যটির মান থেকে নেয়। প্রথম তালিকায় নির্দিষ্ট করা নেই এমন মান সহ যেকোনো উপাদান আউটপুট সংগ্রহ থেকে বাদ দেওয়া হয়।
ব্যবহার | রিটার্নস | FeatureCollection. remap (lookupIn, lookupOut, columnName) | ফিচার কালেকশন |
যুক্তি | টাইপ | বিস্তারিত | এই: collection | ফিচার কালেকশন | সংগ্রহটি পরিবর্তন করতে হবে। |
lookupIn | তালিকা | ইনপুট ম্যাপিং মান. স্ট্রিং এবং পূর্ণসংখ্যার মধ্যে সীমাবদ্ধ। |
lookupOut | তালিকা | আউটপুট ম্যাপিং মান. লুকআপইন এর আকার একই হতে হবে। |
columnName | স্ট্রিং | রিম্যাপ করার জন্য সম্পত্তির নাম। |
উদাহরণ
কোড এডিটর (জাভাস্ক্রিপ্ট)
// Classify features based on a string property.
// The 'nonsense' category gets dropped.
var fc = ee.FeatureCollection([
ee.Feature(ee.Geometry.Point([1, 2]), {isTree: 'Tree'}),
ee.Feature(ee.Geometry.Point([3, 4]), {isTree: 'NotTree'}),
ee.Feature(ee.Geometry.Point([5, 6]), {isTree: 'nonsense'}),
]);
var trees = fc.remap(['NotTree', 'Tree'], [0, 1], 'isTree');
print('remapped trees', trees);
পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap
ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap
Colab (পাইথন)
# Classify features based on a string property.
# The 'nonsense' category gets dropped.
fc = ee.FeatureCollection([
ee.Feature(ee.Geometry.Point([1, 2]), {'isTree': 'Tree'}),
ee.Feature(ee.Geometry.Point([3, 4]), {'isTree': 'NotTree'}),
ee.Feature(ee.Geometry.Point([5, 6]), {'isTree': 'nonsense'}),
])
trees = fc.remap(['NotTree', 'Tree'], [0, 1], 'isTree')
print('Remapped trees:', trees.getInfo())
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eRemaps property values in a FeatureCollection using parallel lists for input and output mappings.\u003c/p\u003e\n"],["\u003cp\u003eElements with values not found in the input mapping list (\u003ccode\u003elookupIn\u003c/code\u003e) are excluded from the output.\u003c/p\u003e\n"],["\u003cp\u003eAccepts FeatureCollections, input and output mapping lists, and the property name for remapping as arguments.\u003c/p\u003e\n"],["\u003cp\u003eUseful for classifying features based on specific property values and simplifying data representation.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.remap\n\nRemaps the value of a specific property in a collection. Takes two parallel lists and maps values found in one to values in the other. Any element with a value that is not specified in the first list is dropped from the output collection.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------|-------------------|\n| FeatureCollection.remap`(lookupIn, lookupOut, columnName)` | FeatureCollection |\n\n| Argument | Type | Details |\n|--------------------|-------------------|---------------------------------------------------------------|\n| this: `collection` | FeatureCollection | The collection to be modified. |\n| `lookupIn` | List | The input mapping values. Restricted to strings and integers. |\n| `lookupOut` | List | The output mapping values. Must be the same size as lookupIn. |\n| `columnName` | String | The name of the property to remap. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Classify features based on a string property.\n// The 'nonsense' category gets dropped.\nvar fc = ee.FeatureCollection([\n ee.Feature(ee.Geometry.Point([1, 2]), {isTree: 'Tree'}),\n ee.Feature(ee.Geometry.Point([3, 4]), {isTree: 'NotTree'}),\n ee.Feature(ee.Geometry.Point([5, 6]), {isTree: 'nonsense'}),\n]);\n\nvar trees = fc.remap(['NotTree', 'Tree'], [0, 1], 'isTree');\nprint('remapped trees', trees);\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\n# Classify features based on a string property.\n# The 'nonsense' category gets dropped.\nfc = ee.FeatureCollection([\n ee.Feature(ee.Geometry.Point([1, 2]), {'isTree': 'Tree'}),\n ee.Feature(ee.Geometry.Point([3, 4]), {'isTree': 'NotTree'}),\n ee.Feature(ee.Geometry.Point([5, 6]), {'isTree': 'nonsense'}),\n ])\n\ntrees = fc.remap(['NotTree', 'Tree'], [0, 1], 'isTree')\nprint('Remapped trees:', trees.getInfo())\n```"]]