ee.Feature.buffer

একটি প্রদত্ত দূরত্ব দ্বারা বাফার করা ইনপুট প্রদান করে। দূরত্ব ধনাত্মক হলে জ্যামিতি প্রসারিত হয় এবং দূরত্ব ঋণাত্মক হলে জ্যামিতি সংকুচিত হয়।

ব্যবহার রিটার্নস
Feature. buffer (distance, maxError , proj ) বৈশিষ্ট্য
যুক্তি টাইপ বিস্তারিত
এই: feature উপাদান বৈশিষ্ট্য যা জ্যামিতি বাফার করা হচ্ছে.
distance ভাসা বাফারিংয়ের দূরত্ব, যা ঋণাত্মক হতে পারে। যদি কোন অভিক্ষেপ নির্দিষ্ট করা না থাকে, তাহলে ইউনিটটি মিটার। অন্যথায় ইউনিটটি অভিক্ষেপের স্থানাঙ্ক ব্যবস্থায় রয়েছে।
maxError ErrorMargin, ডিফল্ট: null বাফারিং বৃত্তের আনুমানিক পরিমাপ করার সময় এবং যেকোন প্রয়োজনীয় রিপ্রজেকশন করার সময় সর্বাধিক পরিমাণ ত্রুটি সহ্য করা হয়। অনির্দিষ্ট থাকলে, দূরত্বের 1% ডিফল্ট।
proj অভিক্ষেপ, ডিফল্ট: নাল যদি নির্দিষ্ট করা হয়, বাফারিং এই অভিক্ষেপে সঞ্চালিত হবে এবং দূরত্বকে এই অভিক্ষেপের সমন্বয় ব্যবস্থার একক হিসাবে ব্যাখ্যা করা হবে। অন্যথায় দূরত্বকে মিটার হিসাবে ব্যাখ্যা করা হয় এবং বাফারিং একটি গোলাকার স্থানাঙ্ক ব্যবস্থায় সঞ্চালিত হয়।

উদাহরণ

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

// Polygon feature of Serengeti National Park.
var feature = ee.FeatureCollection('WCMC/WDPA/202307/polygons')
                  .filter('ORIG_NAME == "Serengeti National Park"')
                  .first();

// Cast the resulting object as an ee.Feature so that the call to the buffer
// method is unambiguous (first() and buffer() are shared by multiple classes).
feature = ee.Feature(feature);

// Generate buffered features out and in from the original boundary.
var bufferOut = feature.buffer(10000);  // 10 km out
var bufferIn = feature.buffer(-10000);  // 10 km in

// Display the features on the map.
Map.addLayer(bufferOut, {color: 'red'}, 'Buffer out');
Map.addLayer(feature, {color: 'blue'}, 'No buffer');
Map.addLayer(bufferIn, {color: 'yellow'}, 'Buffer in');
Map.setCenter(34.8407, -2.398, 8);

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

# Polygon feature of Serengeti National Park.
feature = (
    ee.FeatureCollection('WCMC/WDPA/202307/polygons')
    .filter('ORIG_NAME == "Serengeti National Park"')
    .first()
)

# Cast the resulting object as an ee.Feature so that the call to the buffer
# method is unambiguous (first() and buffer() are shared by multiple classes).
feature = ee.Feature(feature)

# Generate buffered features out and in from the original boundary.
buffer_out = feature.buffer(10000)  # 10 km out
buffer_in = feature.buffer(-10000)  # 10 km in

# Display the features on the map.
m = geemap.Map()
m.add_layer(buffer_out, {'color': 'red'}, 'Buffer out')
m.add_layer(feature, {'color': 'blue'}, 'No buffer')
m.add_layer(buffer_in, {'color': 'yellow'}, 'Buffer in')
m.set_center(34.8407, -2.398, 8)
m