ফিচার এবং ফিচার কালেকশন ভিজ্যুয়ালাইজেশন, ফিচার এবং ফিচার কালেকশন ভিজ্যুয়ালাইজেশন

চিত্র, জ্যামিতি এবং বৈশিষ্ট্যগুলির মতো, বৈশিষ্ট্য সংগ্রহগুলি সরাসরি Map.addLayer() দিয়ে মানচিত্রে যোগ করা যেতে পারে৷ ডিফল্ট ভিজ্যুয়ালাইজেশন কঠিন কালো রেখা এবং আধা-অস্বচ্ছ কালো ফিল সহ ভেক্টরগুলি প্রদর্শন করবে। ভেক্টরগুলিকে রঙে রেন্ডার করতে, color প্যারামিটারটি নির্দিষ্ট করুন। নিম্নোক্ত 'রিজোলভ' ইকোরিজিয়নগুলি ( ডিনারস্টেইন এট আল। 2017 ) ডিফল্ট ভিজ্যুয়ালাইজেশন হিসাবে এবং লাল রঙে প্রদর্শন করে:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Load a FeatureCollection from a table dataset: 'RESOLVE' ecoregions.
var ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017');

// Display as default and with a custom color.
Map.addLayer(ecoregions, {}, 'default display');
Map.addLayer(ecoregions, {color: 'FF0000'}, 'colored');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Load a FeatureCollection from a table dataset: 'RESOLVE' ecoregions.
ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017')

# Display as default and with a custom color.
m = geemap.Map()
m.set_center(-76.2486, 44.8988, 8)
m.add_layer(ecoregions, {}, 'default display')
m.add_layer(ecoregions, {'color': 'FF0000'}, 'colored')
m

অতিরিক্ত প্রদর্শন বিকল্পের জন্য, featureCollection.draw() ব্যবহার করুন। বিশেষত, রেন্ডার করা FeatureCollection কালেকশনে pointRadius এবং strokeWidth পরামিতি যথাক্রমে পয়েন্ট এবং লাইনের আকার নিয়ন্ত্রণ করে:

কোড এডিটর (জাভাস্ক্রিপ্ট)

Map.addLayer(ecoregions.draw({color: '006600', strokeWidth: 5}), {}, 'drawn');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

m.add_layer(ecoregions.draw(color='006600', strokeWidth=5), {}, 'drawn')

draw() এর আউটপুট হল একটি ইমেজ যেখানে লাল, সবুজ এবং নীল ব্যান্ড নির্দিষ্ট color প্যারামিটার অনুযায়ী সেট করা হয়েছে।

FeatureCollection কিভাবে প্রদর্শিত হয় তার উপর আরো নিয়ন্ত্রণের জন্য, একটি আর্গুমেন্ট হিসাবে FeatureCollection সাথে image.paint() ব্যবহার করুন। draw() এর বিপরীতে, যা একটি থ্রি-ব্যান্ড, 8-বিট ডিসপ্লে ইমেজ আউটপুট করে, image.paint() নির্দিষ্ট সংখ্যাসূচক মান 'পেইন্ট করা' সহ একটি ছবি আউটপুট করে। বিকল্পভাবে, আপনি FeatureCollection একটি সম্পত্তির নাম সরবরাহ করতে পারেন যাতে রং করার জন্য নম্বর রয়েছে। width প্যারামিটার একইভাবে আচরণ করে: এটি একটি ধ্রুবক বা লাইন প্রস্থের জন্য একটি সংখ্যা সহ একটি সম্পত্তির নাম হতে পারে। যেমন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Create an empty image into which to paint the features, cast to byte.
var empty = ee.Image().byte();

// Paint all the polygon edges with the same number and width, display.
var outline = empty.paint({
  featureCollection: ecoregions,
  color: 1,
  width: 3
});
Map.addLayer(outline, {palette: 'FF0000'}, 'edges');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Create an empty image into which to paint the features, cast to byte.
empty = ee.Image().byte()

# Paint all the polygon edges with the same number and width, display.
outline = empty.paint(featureCollection=ecoregions, color=1, width=3)
m.add_layer(outline, {'palette': 'FF0000'}, 'edges')

মনে রাখবেন যে খালি চিত্রটিতে আপনি বৈশিষ্ট্যগুলি আঁকবেন সেটি পেইন্টিংয়ের আগে কাস্ট করা দরকার। এটি কারণ একটি ধ্রুবক চিত্র একটি ধ্রুবক হিসাবে আচরণ করে: এটি প্রারম্ভিক মানের সাথে আটকে থাকে। বৈশিষ্ট্যগুলির একটি বৈশিষ্ট্য থেকে সেট করা মানগুলির সাথে বৈশিষ্ট্যের প্রান্তগুলিকে রঙ করতে, সংখ্যাসূচক মান সহ সম্পত্তির নামের সাথে রঙের প্যারামিটার সেট করুন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint the edges with different colors, display.
var outlines = empty.paint({
  featureCollection: ecoregions,
  color: 'BIOME_NUM',
  width: 4
});
var palette = ['FF0000', '00FF00', '0000FF'];
Map.addLayer(outlines, {palette: palette, max: 14}, 'different color edges');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint the edges with different colors, display.
outlines = empty.paint(featureCollection=ecoregions, color='BIOME_NUM', width=4)
palette = ['FF0000', '00FF00', '0000FF']
m.add_layer(outlines, {'palette': palette, 'max': 14}, 'different color edges')

যে রঙ এবং প্রস্থের সাথে সীমানা আঁকা হয়েছে তা বৈশিষ্ট্য সহ সেট করা যেতে পারে। যেমন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint the edges with different colors and widths.
var outlines = empty.paint({
  featureCollection: ecoregions,
  color: 'BIOME_NUM',
  width: 'NNH'
});
Map.addLayer(outlines, {palette: palette, max: 14}, 'different color, width edges');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint the edges with different colors and widths.
outlines = empty.paint(
    featureCollection=ecoregions, color='BIOME_NUM', width='NNH'
)
m.add_layer(
    outlines, {'palette': palette, 'max': 14}, 'different color, width edges'
)

যদি width পরামিতি প্রদান না করা হয় তবে বৈশিষ্ট্যগুলির অভ্যন্তরটি আঁকা হয়:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint the interior of the polygons with different colors.
var fills = empty.paint({
  featureCollection: ecoregions,
  color: 'BIOME_NUM',
});
Map.addLayer(fills, {palette: palette, max: 14}, 'colored fills');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint the interior of the polygons with different colors.
fills = empty.paint(featureCollection=ecoregions, color='BIOME_NUM')
m.add_layer(fills, {'palette': palette, 'max': 14}, 'colored fills')

বৈশিষ্ট্যগুলির অভ্যন্তর এবং প্রান্ত উভয়ই রেন্ডার করতে, খালি চিত্রটি দুবার আঁকুন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint both the fill and the edges.
var filledOutlines = empty.paint(ecoregions, 'BIOME_NUM').paint(ecoregions, 0, 2);
Map.addLayer(filledOutlines, {palette: ['000000'].concat(palette), max: 14}, 'edges and fills');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint both the fill and the edges.
filled_outlines = empty.paint(ecoregions, 'BIOME_NUM').paint(ecoregions, 0, 2)
m.add_layer(
    filled_outlines,
    {'palette': ['000000'] + palette, 'max': 14},
    'edges and fills',
)
,

চিত্র, জ্যামিতি এবং বৈশিষ্ট্যগুলির মতো, বৈশিষ্ট্য সংগ্রহগুলি সরাসরি Map.addLayer() দিয়ে মানচিত্রে যোগ করা যেতে পারে৷ ডিফল্ট ভিজ্যুয়ালাইজেশন কঠিন কালো রেখা এবং আধা-অস্বচ্ছ কালো ফিল সহ ভেক্টরগুলি প্রদর্শন করবে। ভেক্টরগুলিকে রঙে রেন্ডার করতে, color প্যারামিটারটি নির্দিষ্ট করুন। নিম্নোক্ত 'রিজোলভ' ইকোরিজিয়নগুলি ( ডিনারস্টেইন এট আল। 2017 ) ডিফল্ট ভিজ্যুয়ালাইজেশন হিসাবে এবং লাল রঙে প্রদর্শন করে:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Load a FeatureCollection from a table dataset: 'RESOLVE' ecoregions.
var ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017');

// Display as default and with a custom color.
Map.addLayer(ecoregions, {}, 'default display');
Map.addLayer(ecoregions, {color: 'FF0000'}, 'colored');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Load a FeatureCollection from a table dataset: 'RESOLVE' ecoregions.
ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017')

# Display as default and with a custom color.
m = geemap.Map()
m.set_center(-76.2486, 44.8988, 8)
m.add_layer(ecoregions, {}, 'default display')
m.add_layer(ecoregions, {'color': 'FF0000'}, 'colored')
m

অতিরিক্ত প্রদর্শন বিকল্পের জন্য, featureCollection.draw() ব্যবহার করুন। বিশেষত, রেন্ডার করা FeatureCollection কালেকশনে pointRadius এবং strokeWidth পরামিতি যথাক্রমে পয়েন্ট এবং লাইনের আকার নিয়ন্ত্রণ করে:

কোড এডিটর (জাভাস্ক্রিপ্ট)

Map.addLayer(ecoregions.draw({color: '006600', strokeWidth: 5}), {}, 'drawn');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

m.add_layer(ecoregions.draw(color='006600', strokeWidth=5), {}, 'drawn')

draw() এর আউটপুট হল একটি ইমেজ যেখানে লাল, সবুজ এবং নীল ব্যান্ড নির্দিষ্ট color প্যারামিটার অনুযায়ী সেট করা হয়েছে।

FeatureCollection কিভাবে প্রদর্শিত হয় তার উপর আরো নিয়ন্ত্রণের জন্য, একটি আর্গুমেন্ট হিসাবে FeatureCollection সাথে image.paint() ব্যবহার করুন। draw() এর বিপরীতে, যা একটি থ্রি-ব্যান্ড, 8-বিট ডিসপ্লে ইমেজ আউটপুট করে, image.paint() নির্দিষ্ট সংখ্যাসূচক মান 'পেইন্ট করা' সহ একটি ছবি আউটপুট করে। বিকল্পভাবে, আপনি FeatureCollection একটি সম্পত্তির নাম সরবরাহ করতে পারেন যাতে রং করার জন্য নম্বর রয়েছে। width প্যারামিটার একইভাবে আচরণ করে: এটি একটি ধ্রুবক বা লাইন প্রস্থের জন্য একটি সংখ্যা সহ একটি সম্পত্তির নাম হতে পারে। যেমন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Create an empty image into which to paint the features, cast to byte.
var empty = ee.Image().byte();

// Paint all the polygon edges with the same number and width, display.
var outline = empty.paint({
  featureCollection: ecoregions,
  color: 1,
  width: 3
});
Map.addLayer(outline, {palette: 'FF0000'}, 'edges');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Create an empty image into which to paint the features, cast to byte.
empty = ee.Image().byte()

# Paint all the polygon edges with the same number and width, display.
outline = empty.paint(featureCollection=ecoregions, color=1, width=3)
m.add_layer(outline, {'palette': 'FF0000'}, 'edges')

মনে রাখবেন যে খালি চিত্রটিতে আপনি বৈশিষ্ট্যগুলি আঁকবেন সেটি পেইন্টিংয়ের আগে কাস্ট করা দরকার। এটি কারণ একটি ধ্রুবক চিত্র একটি ধ্রুবক হিসাবে আচরণ করে: এটি প্রারম্ভিক মানের সাথে আটকে থাকে। বৈশিষ্ট্যগুলির একটি বৈশিষ্ট্য থেকে সেট করা মানগুলির সাথে বৈশিষ্ট্যের প্রান্তগুলিকে রঙ করতে, সংখ্যাসূচক মান সহ সম্পত্তির নামের সাথে রঙের প্যারামিটার সেট করুন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint the edges with different colors, display.
var outlines = empty.paint({
  featureCollection: ecoregions,
  color: 'BIOME_NUM',
  width: 4
});
var palette = ['FF0000', '00FF00', '0000FF'];
Map.addLayer(outlines, {palette: palette, max: 14}, 'different color edges');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint the edges with different colors, display.
outlines = empty.paint(featureCollection=ecoregions, color='BIOME_NUM', width=4)
palette = ['FF0000', '00FF00', '0000FF']
m.add_layer(outlines, {'palette': palette, 'max': 14}, 'different color edges')

যে রঙ এবং প্রস্থের সাথে সীমানা আঁকা হয়েছে তা বৈশিষ্ট্য সহ সেট করা যেতে পারে। যেমন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint the edges with different colors and widths.
var outlines = empty.paint({
  featureCollection: ecoregions,
  color: 'BIOME_NUM',
  width: 'NNH'
});
Map.addLayer(outlines, {palette: palette, max: 14}, 'different color, width edges');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint the edges with different colors and widths.
outlines = empty.paint(
    featureCollection=ecoregions, color='BIOME_NUM', width='NNH'
)
m.add_layer(
    outlines, {'palette': palette, 'max': 14}, 'different color, width edges'
)

যদি width পরামিতি প্রদান না করা হয় তবে বৈশিষ্ট্যগুলির অভ্যন্তরটি আঁকা হয়:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint the interior of the polygons with different colors.
var fills = empty.paint({
  featureCollection: ecoregions,
  color: 'BIOME_NUM',
});
Map.addLayer(fills, {palette: palette, max: 14}, 'colored fills');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint the interior of the polygons with different colors.
fills = empty.paint(featureCollection=ecoregions, color='BIOME_NUM')
m.add_layer(fills, {'palette': palette, 'max': 14}, 'colored fills')

বৈশিষ্ট্যগুলির অভ্যন্তর এবং প্রান্ত উভয়ই রেন্ডার করতে, খালি চিত্রটি দুবার আঁকুন:

কোড এডিটর (জাভাস্ক্রিপ্ট)

// Paint both the fill and the edges.
var filledOutlines = empty.paint(ecoregions, 'BIOME_NUM').paint(ecoregions, 0, 2);
Map.addLayer(filledOutlines, {palette: ['000000'].concat(palette), max: 14}, 'edges and fills');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# Paint both the fill and the edges.
filled_outlines = empty.paint(ecoregions, 'BIOME_NUM').paint(ecoregions, 0, 2)
m.add_layer(
    filled_outlines,
    {'palette': ['000000'] + palette, 'max': 14},
    'edges and fills',
)