ee.Geometry

একটি জ্যামিতি তৈরি করে।

ব্যবহার রিটার্নস
ee.Geometry(geoJson, proj , geodesic , evenOdd ) জ্যামিতি
যুক্তি টাইপ বিস্তারিত
geoJson অবজেক্ট GeoJSON অবজেক্ট জ্যামিতি বর্ণনা করে বা একটি ComputedObject কে জ্যামিতি হিসাবে পুনঃব্যাখ্যা করা হবে। GeoJSON স্পেসিফিকেশন অনুযায়ী CRS স্পেসিফিকেশন সমর্থন করে, কিন্তু শুধুমাত্র নামের অনুমতি দেয় ("লিঙ্ক করা" CRS-এর পরিবর্তে)। যদি এটি একটি 'জিওডেসিক' ক্ষেত্র অন্তর্ভুক্ত করে, এবং opt_geodesic নির্দিষ্ট করা না থাকে, তাহলে এটি opt_geodesic হিসাবে ব্যবহার করা হবে৷
proj অভিক্ষেপ, ঐচ্ছিক একটি ঐচ্ছিক প্রজেকশন স্পেসিফিকেশন, হয় একটি CRS আইডি কোড বা একটি WKT স্ট্রিং হিসাবে। নির্দিষ্ট করা থাকলে, জিওজেসন প্যারামিটারে পাওয়া যেকোনও CRS ওভাররাইড করে। অনির্দিষ্ট থাকলে এবং জিওজেসন একটি CRS ঘোষণা না করলে, ডিফল্ট "EPSG:4326" (x=দ্রাঘিমাংশ, y=অক্ষাংশ)।
geodesic বুলিয়ান, ঐচ্ছিক রেখার অংশগুলিকে গোলাকার জিওডেসিক্স হিসাবে ব্যাখ্যা করা উচিত কিনা৷ মিথ্যা হলে, নির্দেশ করে যে রেখার অংশগুলিকে নির্দিষ্ট CRS-এ প্ল্যানার লাইন হিসাবে ব্যাখ্যা করা উচিত। অনুপস্থিত থাকলে, সিআরএস ভৌগলিক হলে ডিফল্ট সত্য (ডিফল্ট EPSG:4326 সহ), অথবা যদি CRS প্রজেক্ট করা হয় তবে মিথ্যা।
evenOdd বুলিয়ান, ঐচ্ছিক সত্য হলে, বহুভুজ অভ্যন্তরীণ অংশগুলি জোড়/বিজোড় নিয়ম দ্বারা নির্ধারিত হবে, যেখানে একটি বিন্দু ভিতরে থাকে যদি এটি একটি বিজোড় সংখ্যক প্রান্ত অতিক্রম করে অসীমতার একটি বিন্দুতে পৌঁছায়। অন্যথায় বহুভুজ বাম-অভ্যন্তরীণ নিয়ম ব্যবহার করে, যেখানে প্রদত্ত ক্রমে শীর্ষবিন্দুতে হাঁটার সময় অভ্যন্তরীণগুলি শেলের প্রান্তের বাম দিকে থাকে। অনির্দিষ্ট হলে, ডিফল্ট সত্য।

উদাহরণ

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

// A GeoJSON object for a triangular polygon.
var geojsonObject = {
  "type": "Polygon",
  "coordinates": [
    [
      [
        -122.085,
        37.423
      ],
      [
        -122.092,
        37.424
      ],
      [
        -122.085,
        37.418
      ],
      [
        -122.085,
        37.423
      ]
    ]
  ]
};
print('ee.Geometry accepts a GeoJSON object', ee.Geometry(geojsonObject));

// GeoJSON strings need to be converted to an object.
var geojsonString = JSON.stringify(geojsonObject);
print('A GeoJSON string needs to be converted to an object',
      ee.Geometry(JSON.parse(geojsonString)));

// Use ee.Geometry to cast computed geometry objects into the ee.Geometry
// class to access their methods. In the following example an ee.Geometry
// object is stored as a ee.Feature property. When it is retrieved with the
// .get() function, a computed geometry object is returned. Cast the computed
// object as a ee.Geometry to get the geometry's bounds, for instance.
var feature = ee.Feature(null, {geom: ee.Geometry(geojsonObject)});
print('Cast computed geometry objects to ee.Geometry class',
      ee.Geometry(feature.get('geom')).bounds());

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

import json

# A GeoJSON object for a triangular polygon.
geojson_object = {
    'type': 'Polygon',
    'coordinates': [
        [
            [
                -122.085,
                37.423
            ],
            [
                -122.092,
                37.424
            ],
            [
                -122.085,
                37.418
            ],
            [
                -122.085,
                37.423
                ]
            ]
        ]
}
print(
    'ee.Geometry accepts a GeoJSON object:',
    ee.Geometry(geojson_object).getInfo()
)

# GeoJSON strings need to be converted to an object.
geojson_string = json.dumps(geojson_object)
print('A GeoJSON string needs to be converted to an object:',
      ee.Geometry(json.loads(geojson_string)).getInfo())

# Use ee.Geometry to cast computed geometry objects into the ee.Geometry
# class to access their methods. In the following example an ee.Geometry
# object is stored as a ee.Feature property. When it is retrieved with the
# .get() function, a computed geometry object is returned. Cast the computed
# object as a ee.Geometry to get the geometry's bounds, for instance.
feature = ee.Feature(None, {'geom': ee.Geometry(geojson_object)})
print('Cast computed geometry objects to ee.Geometry class:',
      ee.Geometry(feature.get('geom')).bounds().getInfo())