ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
মতামত জানান
ee.Image.constant
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
সর্বত্র একটি ধ্রুবক মান ধারণকারী একটি চিত্র তৈরি করে।
ব্যবহার রিটার্নস ee.Image.constant(value)
ছবি
যুক্তি টাইপ বিস্তারিত value
অবজেক্ট ধ্রুবক চিত্রে পিক্সেলের মান। একটি সংখ্যা বা একটি অ্যারে বা সংখ্যা বা অ্যারেগুলির একটি তালিকা হতে হবে৷
উদাহরণ কোড এডিটর (জাভাস্ক্রিপ্ট)
// Create a constant image, where every pixel has bands of the same value.
var image1 = ee . Image . constant ( 1 );
Map . addLayer ( image1 , null , '1' );
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", int ∈ [1, 1], EPSG:4326
print ( image1 );
var image2 = ee . Image ( 2 );
Map . addLayer ( image2 , null , '2' );
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", int ∈ [2, 2], EPSG:4326
print ( image2 );
var π = ee . Image ( Math . PI );
Map . addLayer ( π , null , 'π' );
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", double ∈ [3.141592653589793, 3.141592653589793], EPSG:4326
// id: constant
// crs: EPSG:4326
// crs_transform: [1,0,0,0,1,0]
// data_type: double ∈ [3.141592653589793, 3.141592653589793]
print ( π );
// Create a multi-band image from a list of constant double integers.
var doubleIntImage = ee . Image . constant ([ - 1.2 , 4 ]);
Map . addLayer ( doubleIntImage , null , 'double int' );
// Image (2 bands)
// type: Image
// bands: List (2 elements)
// 0: "constant_0", double ∈ [-1.2, -1.2], EPSG:4326
// 1: "constant_1", int ∈ [4, 4], EPSG:4326
print ( doubleIntImage );
// Create a multi-band image from a list of constants, using hexadecimal
// notation.
var multiband = ee . Image ([ 0xff , 0x88 , 0x00 ]);
Map . addLayer ( multiband , { min : 0 , max : 0xff }, 'orange' );
// Image (3 bands)
// type: Image
// bands: List (3 elements)
// 0: "constant", int ∈ [255, 255], EPSG:4326
// 1: "constant_1", int ∈ [136, 136], EPSG:4326
// 2: "constant_2", int ∈ [0, 0], EPSG:4326
print ( multiband ); ,সর্বত্র একটি ধ্রুবক মান ধারণকারী একটি চিত্র তৈরি করে।
ব্যবহার রিটার্নস ee.Image.constant(value)
ছবি
যুক্তি টাইপ বিস্তারিত value
অবজেক্ট ধ্রুবক চিত্রে পিক্সেলের মান। একটি সংখ্যা বা একটি অ্যারে বা সংখ্যা বা অ্যারেগুলির একটি তালিকা হতে হবে৷
উদাহরণ কোড এডিটর (জাভাস্ক্রিপ্ট)
// Create a constant image, where every pixel has bands of the same value.
var image1 = ee . Image . constant ( 1 );
Map . addLayer ( image1 , null , '1' );
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", int ∈ [1, 1], EPSG:4326
print ( image1 );
var image2 = ee . Image ( 2 );
Map . addLayer ( image2 , null , '2' );
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", int ∈ [2, 2], EPSG:4326
print ( image2 );
var π = ee . Image ( Math . PI );
Map . addLayer ( π , null , 'π' );
// Image (1 band)
// type: Image
// bands: List (1 element)
// 0: "constant", double ∈ [3.141592653589793, 3.141592653589793], EPSG:4326
// id: constant
// crs: EPSG:4326
// crs_transform: [1,0,0,0,1,0]
// data_type: double ∈ [3.141592653589793, 3.141592653589793]
print ( π );
// Create a multi-band image from a list of constant double integers.
var doubleIntImage = ee . Image . constant ([ - 1.2 , 4 ]);
Map . addLayer ( doubleIntImage , null , 'double int' );
// Image (2 bands)
// type: Image
// bands: List (2 elements)
// 0: "constant_0", double ∈ [-1.2, -1.2], EPSG:4326
// 1: "constant_1", int ∈ [4, 4], EPSG:4326
print ( doubleIntImage );
// Create a multi-band image from a list of constants, using hexadecimal
// notation.
var multiband = ee . Image ([ 0xff , 0x88 , 0x00 ]);
Map . addLayer ( multiband , { min : 0 , max : 0xff }, 'orange' );
// Image (3 bands)
// type: Image
// bands: List (3 elements)
// 0: "constant", int ∈ [255, 255], EPSG:4326
// 1: "constant_1", int ∈ [136, 136], EPSG:4326
// 2: "constant_2", int ∈ [0, 0], EPSG:4326
print ( multiband );
মতামত জানান
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License -এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License -এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
আমাদের আরও কিছু জানাতে চান?
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["Generates an image where every pixel has the same specified value, creating a constant image."],["Accepts a number, an array, or a list of numbers/arrays as input to define the constant value for the image pixels."],["Can create single-band or multi-band images with constant values in each band."],["Uses `ee.Image.constant(value)` for construction, where 'value' represents the desired constant."],["Can be visualized using `Map.addLayer()` by providing the image and optional visualization parameters."]]],[]]