ee.Geometry.Point.distance
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह दो ज्यामिति के बीच की कम से कम दूरी दिखाता है.
इस्तेमाल | रिटर्न |
---|
Point.distance(right, maxError, proj, spherical) | फ़्लोट |
आर्ग्यूमेंट | टाइप | विवरण |
---|
यह: left | ज्यामिति | ऑपरेशन के बाएं ऑपरेंड के तौर पर इस्तेमाल की जाने वाली ज्यामिति. |
right | ज्यामिति | ऑपरेशन के राइट ऑपरेंड के तौर पर इस्तेमाल की जाने वाली ज्यामिति. |
maxError | ErrorMargin, डिफ़ॉल्ट: null | ज़रूरी रिप्रोजेक्ट करने के दौरान, गड़बड़ी की ज़्यादा से ज़्यादा सीमा. |
proj | प्रोजेक्शन, डिफ़ॉल्ट: null | वह प्रोजेक्शन जिसमें कार्रवाई करनी है. अगर टाइप नहीं बताया गया है, तो ऑपरेशन गोलाकार निर्देशांक प्रणाली में किया जाएगा. साथ ही, गोले पर लीनियर दूरियां मीटर में होंगी. |
spherical | बूलियन, डिफ़ॉल्ट: गलत | अगर यह सही है, तो यूनिट स्फ़ीर पर हिसाब लगाया जाएगा. अगर यह वैल्यू गलत है, तो पृथ्वी के चपटे होने को ध्यान में रखते हुए, पृथ्वी की त्रिज्या का हिसाब अंडाकार आकार के हिसाब से लगाया जाएगा. अगर proj की वैल्यू दी गई है, तो इस पर ध्यान नहीं दिया जाता. डिफ़ॉल्ट रूप से, यह 'गलत' पर सेट होती है. |
उदाहरण
कोड एडिटर (JavaScript)
// Define a Point object.
var point = ee.Geometry.Point(-122.082, 37.42);
// Define other inputs.
var inputGeom = ee.Geometry.Point(-122.090, 37.423);
// Apply the distance method to the Point object.
var pointDistance = point.distance({'right': inputGeom, 'maxError': 1});
// Print the result to the console.
print('point.distance(...) =', pointDistance);
// Display relevant geometries on the map.
Map.setCenter(-122.085, 37.422, 15);
Map.addLayer(point,
{'color': 'black'},
'Geometry [black]: point');
Map.addLayer(inputGeom,
{'color': 'blue'},
'Parameter [blue]: inputGeom');
Python सेटअप
Python API के बारे में जानकारी पाने और इंटरैक्टिव डेवलपमेंट के लिए geemap
का इस्तेमाल करने के लिए,
Python एनवायरमेंट पेज देखें.
import ee
import geemap.core as geemap
Colab (Python)
# Define a Point object.
point = ee.Geometry.Point(-122.082, 37.42)
# Define other inputs.
input_geom = ee.Geometry.Point(-122.090, 37.423)
# Apply the distance method to the Point object.
point_distance = point.distance(right=input_geom, maxError=1)
# Print the result.
display('point.distance(...) =', point_distance)
# Display relevant geometries on the map.
m = geemap.Map()
m.set_center(-122.085, 37.422, 15)
m.add_layer(point, {'color': 'black'}, 'Geometry [black]: point')
m.add_layer(input_geom, {'color': 'blue'}, 'Parameter [blue]: input_geom')
m
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-09-10 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-09-10 (UTC) को अपडेट किया गया."],[],["The `distance` method calculates the minimum distance between two geometries (`left` and `right`). It accepts optional parameters: `maxError` (maximum tolerated error), `proj` (projection for calculation), and `spherical` (specifies spherical or elliptical calculation when `proj` is not given). The method returns a float value representing the calculated distance. The example code demonstrates how to define a `Point`, calculate the distance to another geometry, and visualize both elements on a map.\n"],null,[]]