ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ee.FeatureCollection.style
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি সহজ শৈলী ভাষা ব্যবহার করে ভিজ্যুয়ালাইজেশনের জন্য একটি ভেক্টর সংগ্রহ আঁকুন।
ব্যবহার | রিটার্নস | FeatureCollection. style ( color , pointSize , pointShape , width , fillColor , styleProperty , neighborhood , lineType ) | ছবি |
যুক্তি | টাইপ | বিস্তারিত | এই: collection | ফিচার কালেকশন | সংগ্রহ আঁকা. |
color | স্ট্রিং, ডিফল্ট: "কালো" | বৈশিষ্ট্য আঁকার জন্য একটি ডিফল্ট রঙ (CSS 3.0 রঙের মান যেমন, 'FF0000' বা 'লাল')। অস্বচ্ছতা সমর্থন করে (যেমন, 50% স্বচ্ছ লালের জন্য 'FF000088')। |
pointSize | পূর্ণসংখ্যা, ডিফল্ট: 3 | বিন্দু চিহ্নিতকারীর পিক্সেলে ডিফল্ট আকার। |
pointShape | স্ট্রিং, ডিফল্ট: "বৃত্ত" | প্রতিটি পয়েন্ট অবস্থানে আঁকার জন্য চিহ্নিতকারীর ডিফল্ট আকৃতি। এর মধ্যে একটি: `বৃত্ত`, `বর্গাকার`, `হীরা`, `ক্রস`, `প্লাস`, `পেন্টাগ্রাম`, `হেক্সাগ্রাম`, `ত্রিভুজ`, `ত্রিভুজ_উপর`, `ত্রিভুজ_নিচে`, `ত্রিভুজ_বাম`, `ত্রিভুজ_ডান`, `পেন্টাগন`, `ষড়ভুজ`, `6 তারা। এই যুক্তিটি এই Matlab মার্কার সংক্ষিপ্ত রূপগুলিকেও সমর্থন করে: `o`, `s`, `d`, `x`, `+`, `p`, `h`, `^`, `v`, `<`, `>`। |
width | ফ্লোট, ডিফল্ট: 2 | রেখার ডিফল্ট লাইন প্রস্থ এবং বহুভুজ এবং বিন্দু আকৃতির জন্য রূপরেখা। |
fillColor | স্ট্রিং, ডিফল্ট: নাল | বহুভুজ এবং বিন্দু আকার পূরণ করার জন্য রঙ। 0.66 অপাসিটিতে ডিফল্ট 'রঙ'। |
styleProperty | স্ট্রিং, ডিফল্ট: নাল | একটি প্রতি-বৈশিষ্ট্য বৈশিষ্ট্য একটি অভিধান ধারণ করার প্রত্যাশিত৷ অভিধানের মানগুলি সেই বৈশিষ্ট্যের জন্য যেকোনো ডিফল্ট মানকে ওভাররাইড করে। |
neighborhood | পূর্ণসংখ্যা, ডিফল্ট: 5 | যদি styleProperty ব্যবহার করা হয় এবং যেকোনো বৈশিষ্ট্যের পয়েন্ট সাইজ বা প্রস্থ ডিফল্টের চেয়ে বড় থাকে, তাহলে টাইলিং আর্টিফ্যাক্ট ঘটতে পারে। যেকোনো বৈশিষ্ট্যের জন্য প্রয়োজনীয় সর্বাধিক আশেপাশের (পয়েন্ট সাইজ + প্রস্থ) নির্দিষ্ট করে। |
lineType | স্ট্রিং, ডিফল্ট: "সলিড" | বহুভুজ এবং বিন্দু আকারের লাইন এবং রূপরেখার জন্য ডিফল্ট লাইন শৈলী। ডিফল্ট 'সলিড'। এর মধ্যে একটি: কঠিন, ডটেড, ড্যাশড। |
উদাহরণ
কোড এডিটর (জাভাস্ক্রিপ্ট)
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
// Paint FeatureCollection to an image using collection-wide style arguments.
var fcVis = fc.style({
color: '1e90ff',
width: 2,
fillColor: 'ff475788', // with alpha set for partial transparency
lineType: 'dotted',
pointSize: 10,
pointShape: 'circle'
});
// Display the FeatureCollection visualization (ee.Image) on the map.
Map.setCenter(4.326, 50.919, 9);
Map.addLayer(fcVis, null, 'Collection-wide style');
// Paint FeatureCollection to an image using feature-specific style arguments.
// A dictionary of style properties per power plant fuel type.
var fuelStyles = ee.Dictionary({
Wind: {color: 'blue', pointSize: 5, pointShape: 'circle'},
Gas: {color: 'yellow', pointSize: 6, pointShape: 'square'},
Oil: {color: 'green', pointSize: 3, pointShape: 'diamond'},
Coal: {color: 'red', pointSize: 3, pointShape: 'cross'},
Hydro: {color: 'brown', pointSize: 3, pointShape: 'star5'},
Biomass: {color: 'orange', pointSize: 4, pointShape: 'triangle'},
Nuclear: {color: 'purple', pointSize: 6, pointShape: 'hexagram'},
});
// Add feature-specific style properties to each feature based on fuel type.
fc = fc.map(function(feature) {
return feature.set('style', fuelStyles.get(feature.get('fuel1')));
});
// Style the FeatureCollection according to each feature's "style" property.
var fcVisCustom = fc.style({
styleProperty: 'style',
neighborhood: 8 // maximum "pointSize" + "width" among features
});
// Display the FeatureCollection visualization (ee.Image) on the map.
Map.addLayer(fcVisCustom, null, 'Feature-specific style');
পাইথন সেটআপ
পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap
ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।
import ee
import geemap.core as geemap
Colab (পাইথন)
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"'
)
# Paint FeatureCollection to an image using collection-wide style arguments.
fc_vis = fc.style(
color='1e90ff',
width=2,
fillColor='ff475788', # with alpha set for partial transparency
lineType='dotted',
pointSize=10,
pointShape='circle',
)
# Display the FeatureCollection visualization (ee.Image) on the map.
m = geemap.Map()
m.set_center(4.326, 50.919, 9)
m.add_layer(fc_vis, None, 'Collection-wide style')
# Paint FeatureCollection to an image using feature-specific style arguments.
# A dictionary of style properties per power plant fuel type.
fuel_styles = ee.Dictionary({
'Wind': {'color': 'blue', 'pointSize': 5, 'pointShape': 'circle'},
'Gas': {'color': 'yellow', 'pointSize': 6, 'pointShape': 'square'},
'Oil': {'color': 'green', 'pointSize': 3, 'pointShape': 'diamond'},
'Coal': {'color': 'red', 'pointSize': 3, 'pointShape': 'cross'},
'Hydro': {'color': 'brown', 'pointSize': 3, 'pointShape': 'star5'},
'Biomass': {'color': 'orange', 'pointSize': 4, 'pointShape': 'triangle'},
'Nuclear': {'color': 'purple', 'pointSize': 6, 'pointShape': 'hexagram'},
})
# Add feature-specific style properties to each feature based on fuel type.
fc = fc.map(
lambda feature: feature.set('style', fuel_styles.get(feature.get('fuel1')))
)
# Style the FeatureCollection according to each feature's "style" property.
fc_vis_custom = fc.style(
styleProperty='style',
neighborhood=8, # maximum "pointSize" + "width" among features
)
# Display the FeatureCollection visualization (ee.Image) on the map.
m.add_layer(fc_vis_custom, None, 'Feature-specific style')
m
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট 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\u003eVisualize FeatureCollections as images using the \u003ccode\u003estyle()\u003c/code\u003e method with customizable point, line, and polygon styles.\u003c/p\u003e\n"],["\u003cp\u003eDefine collection-wide styles using arguments like \u003ccode\u003ecolor\u003c/code\u003e, \u003ccode\u003epointSize\u003c/code\u003e, \u003ccode\u003epointShape\u003c/code\u003e, \u003ccode\u003ewidth\u003c/code\u003e, \u003ccode\u003efillColor\u003c/code\u003e, and \u003ccode\u003elineType\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAchieve feature-specific styling by assigning a \u003ccode\u003estyleProperty\u003c/code\u003e containing individual style dictionaries to each feature.\u003c/p\u003e\n"],["\u003cp\u003eSet \u003ccode\u003eneighborhood\u003c/code\u003e to avoid tiling artifacts when using large point sizes or widths with feature-specific styling.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.style\n\nDraw a vector collection for visualization using a simple style language.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| FeatureCollection.style`(`*color* `, `*pointSize* `, `*pointShape* `, `*width* `, `*fillColor* `, `*styleProperty* `, `*neighborhood* `, `*lineType*`)` | Image |\n\n| Argument | Type | Details |\n|--------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | FeatureCollection | The collection to draw. |\n| `color` | String, default: \"black\" | A default color (CSS 3.0 color value e.g., 'FF0000' or 'red') to use for drawing the features. Supports opacity (e.g., 'FF000088' for 50% transparent red). |\n| `pointSize` | Integer, default: 3 | The default size in pixels of the point markers. |\n| `pointShape` | String, default: \"circle\" | The default shape of the marker to draw at each point location. One of: \\`circle\\`, \\`square\\`, \\`diamond\\`, \\`cross\\`, \\`plus\\`, \\`pentagram\\`, \\`hexagram\\`, \\`triangle\\`, \\`triangle_up\\`, \\`triangle_down\\`, \\`triangle_left\\`, \\`triangle_right\\`, \\`pentagon\\`, \\`hexagon\\`, \\`star5\\`, \\`star6\\`. This argument also supports these Matlab marker abbreviations: \\`o\\`, \\`s\\`, \\`d\\`, \\`x\\`, \\`+\\`, \\`p\\`, \\`h\\`, \\`\\^\\`, \\`v\\`, \\`\\\u003c\\`, \\`\\\u003e\\`. |\n| `width` | Float, default: 2 | The default line width for lines and outlines for polygons and point shapes. |\n| `fillColor` | String, default: null | The color for filling polygons and point shapes. Defaults to 'color' at 0.66 opacity. |\n| `styleProperty` | String, default: null | A per-feature property expected to contain a dictionary. Values in the dictionary override any default values for that feature. |\n| `neighborhood` | Integer, default: 5 | If styleProperty is used and any feature has a pointSize or width larger than the defaults, tiling artifacts can occur. Specifies the maximum neighborhood (pointSize + width) needed for any feature. |\n| `lineType` | String, default: \"solid\" | The default line style for lines and outlines of polygons and point shapes. Defaults to 'solid'. One of: solid, dotted, dashed. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// FeatureCollection of power plants in Belgium.\nvar fc = ee.FeatureCollection('WRI/GPPD/power_plants')\n .filter('country_lg == \"Belgium\"');\n\n// Paint FeatureCollection to an image using collection-wide style arguments.\nvar fcVis = fc.style({\n color: '1e90ff',\n width: 2,\n fillColor: 'ff475788', // with alpha set for partial transparency\n lineType: 'dotted',\n pointSize: 10,\n pointShape: 'circle'\n});\n\n// Display the FeatureCollection visualization (ee.Image) on the map.\nMap.setCenter(4.326, 50.919, 9);\nMap.addLayer(fcVis, null, 'Collection-wide style');\n\n// Paint FeatureCollection to an image using feature-specific style arguments.\n// A dictionary of style properties per power plant fuel type.\nvar fuelStyles = ee.Dictionary({\n Wind: {color: 'blue', pointSize: 5, pointShape: 'circle'},\n Gas: {color: 'yellow', pointSize: 6, pointShape: 'square'},\n Oil: {color: 'green', pointSize: 3, pointShape: 'diamond'},\n Coal: {color: 'red', pointSize: 3, pointShape: 'cross'},\n Hydro: {color: 'brown', pointSize: 3, pointShape: 'star5'},\n Biomass: {color: 'orange', pointSize: 4, pointShape: 'triangle'},\n Nuclear: {color: 'purple', pointSize: 6, pointShape: 'hexagram'},\n});\n\n// Add feature-specific style properties to each feature based on fuel type.\nfc = fc.map(function(feature) {\n return feature.set('style', fuelStyles.get(feature.get('fuel1')));\n});\n\n// Style the FeatureCollection according to each feature's \"style\" property.\nvar fcVisCustom = fc.style({\n styleProperty: 'style',\n neighborhood: 8 // maximum \"pointSize\" + \"width\" among features\n});\n\n// Display the FeatureCollection visualization (ee.Image) on the map.\nMap.addLayer(fcVisCustom, null, 'Feature-specific style');\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# FeatureCollection of power plants in Belgium.\nfc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(\n 'country_lg == \"Belgium\"'\n)\n\n# Paint FeatureCollection to an image using collection-wide style arguments.\nfc_vis = fc.style(\n color='1e90ff',\n width=2,\n fillColor='ff475788', # with alpha set for partial transparency\n lineType='dotted',\n pointSize=10,\n pointShape='circle',\n)\n\n# Display the FeatureCollection visualization (ee.Image) on the map.\nm = geemap.Map()\nm.set_center(4.326, 50.919, 9)\nm.add_layer(fc_vis, None, 'Collection-wide style')\n\n# Paint FeatureCollection to an image using feature-specific style arguments.\n# A dictionary of style properties per power plant fuel type.\nfuel_styles = ee.Dictionary({\n 'Wind': {'color': 'blue', 'pointSize': 5, 'pointShape': 'circle'},\n 'Gas': {'color': 'yellow', 'pointSize': 6, 'pointShape': 'square'},\n 'Oil': {'color': 'green', 'pointSize': 3, 'pointShape': 'diamond'},\n 'Coal': {'color': 'red', 'pointSize': 3, 'pointShape': 'cross'},\n 'Hydro': {'color': 'brown', 'pointSize': 3, 'pointShape': 'star5'},\n 'Biomass': {'color': 'orange', 'pointSize': 4, 'pointShape': 'triangle'},\n 'Nuclear': {'color': 'purple', 'pointSize': 6, 'pointShape': 'hexagram'},\n})\n\n# Add feature-specific style properties to each feature based on fuel type.\nfc = fc.map(\n lambda feature: feature.set('style', fuel_styles.get(feature.get('fuel1')))\n)\n\n# Style the FeatureCollection according to each feature's \"style\" property.\nfc_vis_custom = fc.style(\n styleProperty='style',\n neighborhood=8, # maximum \"pointSize\" + \"width\" among features\n)\n\n# Display the FeatureCollection visualization (ee.Image) on the map.\nm.add_layer(fc_vis_custom, None, 'Feature-specific style')\nm\n```"]]