إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.DateRange.intersection
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعرِض هذه الدالة DateRange يحتوي على جميع النقاط في تقاطع DateRange هذا وآخر.
الاستخدام | المرتجعات |
---|
DateRange.intersection(other) | DateRange |
الوسيطة | النوع | التفاصيل |
---|
هذا: dateRange | DateRange | |
other | DateRange | |
أمثلة
محرّر الرموز البرمجية (JavaScript)
// A series of ee.DateRange objects.
var dateRange1 = ee.DateRange('2017-06-24', '2017-07-24');
var dateRange2 = ee.DateRange('2017-07-01', '2018-08-24');
// Determine the intersection of two ee.DateRange objects.
print('Intersection of dateRange1 and dateRange2',
dateRange1.intersection(dateRange2));
إعداد Python
راجِع صفحة
بيئة Python للحصول على معلومات حول واجهة برمجة التطبيقات Python واستخدام
geemap
للتطوير التفاعلي.
import ee
import geemap.core as geemap
Colab (Python)
# A series of ee.DateRange objects.
date_range_1 = ee.DateRange('2017-06-24', '2017-07-24')
date_range_2 = ee.DateRange('2017-07-01', '2018-08-24')
# Determine the intersection of two ee.DateRange objects.
display(
'Intersection of date_range_1 and date_range_2:',
date_range_1.intersection(date_range_2)
)
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003eDateRange.intersection()\u003c/code\u003e returns a new \u003ccode\u003eDateRange\u003c/code\u003e representing the overlapping period between two \u003ccode\u003eDateRange\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThis function takes another \u003ccode\u003eDateRange\u003c/code\u003e as an argument and determines the common time span between the two.\u003c/p\u003e\n"],["\u003cp\u003eYou can use this function to identify the period where both date ranges coincide for further analysis or filtering.\u003c/p\u003e\n"],["\u003cp\u003eCode examples are provided in JavaScript, Python, and Colab demonstrating how to use \u003ccode\u003eDateRange.intersection()\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `intersection()` method determines the overlapping period between two `DateRange` objects. It takes another `DateRange` as input (`other`). The method returns a new `DateRange` that represents the shared time interval between the original `DateRange` and the input `DateRange`. For example, intersecting '2017-06-24' to '2017-07-24' with '2017-07-01' to '2018-08-24' yields a DateRange from '2017-07-01' to '2017-07-24'.\n"],null,["# ee.DateRange.intersection\n\nReturns a DateRange that contains all points in the intersection of this DateRange and another.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------|-----------|\n| DateRange.intersection`(other)` | DateRange |\n\n| Argument | Type | Details |\n|-------------------|-----------|---------|\n| this: `dateRange` | DateRange | |\n| `other` | DateRange | |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// A series of ee.DateRange objects.\nvar dateRange1 = ee.DateRange('2017-06-24', '2017-07-24');\nvar dateRange2 = ee.DateRange('2017-07-01', '2018-08-24');\n\n// Determine the intersection of two ee.DateRange objects.\nprint('Intersection of dateRange1 and dateRange2',\n dateRange1.intersection(dateRange2));\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# A series of ee.DateRange objects.\ndate_range_1 = ee.DateRange('2017-06-24', '2017-07-24')\ndate_range_2 = ee.DateRange('2017-07-01', '2018-08-24')\n\n# Determine the intersection of two ee.DateRange objects.\ndisplay(\n 'Intersection of date_range_1 and date_range_2:',\n date_range_1.intersection(date_range_2)\n)\n```"]]