ee.Feature
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
सुविधाओं को इन आर्ग्युमेंट में से किसी एक के साथ-साथ, प्रॉपर्टी की वैकल्पिक डिक्शनरी से बनाया जा सकता है:
- ee.Geometry.
- GeoJSON फ़ॉर्मैट में ज्यामिति.
- GeoJSON फ़ीचर.
- कंप्यूट किया गया ऑब्जेक्ट: अगर प्रॉपर्टी तय की गई हैं, तो इसे ज्यामिति के तौर पर फिर से इंटरप्रेट किया जाता है. अगर प्रॉपर्टी तय नहीं की गई हैं, तो इसे सुविधा के तौर पर इंटरप्रेट किया जाता है.
इस्तेमाल | रिटर्न |
---|
ee.Feature(geometry, properties) | सुविधा |
आर्ग्यूमेंट | टाइप | विवरण |
---|
geometry | ComputedObject|Feature|Geometry|Object | ज्यामिति या सुविधा. |
properties | ऑब्जेक्ट, ज़रूरी नहीं है | मेटाडेटा प्रॉपर्टी की डिक्शनरी. अगर पहला पैरामीटर ज्यामिति के बजाय कोई सुविधा है, तो इसका इस्तेमाल नहीं किया जाता. |
उदाहरण
कोड एडिटर (JavaScript)
// Create the simplest possible feature.
print(ee.Feature(null)); // Empty feature
// Demonstrate how to set a feature's id.
print(ee.Feature(null, {'id': 'yada'}).id()); // null
print(ee.Feature(null, {'system:index': 'abc123'}).id()); // abc123
// The simplest possible feature with a geometry.
var feature = ee.Feature(ee.Geometry.Point([-114.318, 38.985]));
Map.addLayer(feature);
Map.centerObject(feature, 10);
Python सेटअप करना
Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap
का इस्तेमाल करने के बारे में जानकारी पाने के लिए,
Python एनवायरमेंट पेज देखें.
import ee
import geemap.core as geemap
Colab (Python)
# Create the simplest possible feature.
display(ee.Feature(None)) # Empty feature
# Demonstrate how to set a feature's id.
display(ee.Feature(None, {'id': 'yada'}).id()) # None
display(ee.Feature(None, {'system:index': 'abc123'}).id()) # abc123
# The simplest possible feature with a geometry.
feature = ee.Feature(ee.Geometry.Point([-114.318, 38.985]))
m = geemap.Map()
m.add_layer(feature)
m.center_object(feature, 10)
m
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eee.Feature\u003c/code\u003e objects represent geographic features with geometry and properties, and can be constructed from geometries, GeoJSON, or computed objects.\u003c/p\u003e\n"],["\u003cp\u003eFeatures can have an optional dictionary of properties to store metadata.\u003c/p\u003e\n"],["\u003cp\u003eFeature IDs are determined by the \u003ccode\u003esystem:index\u003c/code\u003e property, if present, or by the \u003ccode\u003eid\u003c/code\u003e property as a fallback.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eee.Feature\u003c/code\u003e constructor provides a flexible way to create features with or without geometries and associated properties within Earth Engine.\u003c/p\u003e\n"],["\u003cp\u003eSimple features can be visualized on a map using \u003ccode\u003eMap.addLayer\u003c/code\u003e and \u003ccode\u003eMap.centerObject\u003c/code\u003e in JavaScript or similar functions in Python using \u003ccode\u003egeemap\u003c/code\u003e.\u003c/p\u003e\n"]]],["Features are created using a geometry (ee.Geometry, GeoJSON Geometry, or GeoJSON Feature) or a computed object, along with an optional dictionary of properties. `ee.Feature(geometry, properties)` creates a Feature. The `geometry` argument can be a geometry or another feature. The optional `properties` argument is a metadata dictionary; it's unused if the first argument is already a feature. A feature can be created without a geometry and an `id` or a `system:index` can be set.\n"],null,["# ee.Feature\n\n\u003cbr /\u003e\n\nFeatures can be constructed from one of the following arguments plus an optional dictionary of properties:\n\n\u003cbr /\u003e\n\n- An ee.Geometry.\n\n- A GeoJSON Geometry.\n\n- A GeoJSON Feature.\n\n- A computed object: reinterpreted as a geometry if properties are specified, and as a feature if they aren't.\n\n| Usage | Returns |\n|----------------------------------------|---------|\n| `ee.Feature(geometry, `*properties*`)` | Feature |\n\n| Argument | Type | Details |\n|--------------|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `geometry` | ComputedObject\\|Feature\\|Geometry\\|Object | A geometry or feature. |\n| `properties` | Object, optional | A dictionary of metadata properties. If the first parameter is a Feature (instead of a geometry), this is unused. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Create the simplest possible feature.\nprint(ee.Feature(null)); // Empty feature\n\n// Demonstrate how to set a feature's id.\nprint(ee.Feature(null, {'id': 'yada'}).id()); // null\nprint(ee.Feature(null, {'system:index': 'abc123'}).id()); // abc123\n\n// The simplest possible feature with a geometry.\nvar feature = ee.Feature(ee.Geometry.Point([-114.318, 38.985]));\nMap.addLayer(feature);\nMap.centerObject(feature, 10);\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# Create the simplest possible feature.\ndisplay(ee.Feature(None)) # Empty feature\n\n# Demonstrate how to set a feature's id.\ndisplay(ee.Feature(None, {'id': 'yada'}).id()) # None\ndisplay(ee.Feature(None, {'system:index': 'abc123'}).id()) # abc123\n\n# The simplest possible feature with a geometry.\nfeature = ee.Feature(ee.Geometry.Point([-114.318, 38.985]))\nm = geemap.Map()\nm.add_layer(feature)\nm.center_object(feature, 10)\nm\n```"]]