إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.FeatureCollection.kriging
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعرض نتائج أخذ عينات من مقدّر Kriging عند كل بكسل.
الاستخدام | المرتجعات |
---|
FeatureCollection.kriging(propertyName, shape, range, sill, nugget, maxDistance, reducer) | صورة |
الوسيطة | النوع | التفاصيل |
---|
هذا: collection | FeatureCollection | مجموعة الميزات التي سيتم استخدامها كبيانات مصدر للتقدير. |
propertyName | سلسلة | السمة التي سيتم تقديرها (يجب أن تكون رقمية). |
shape | سلسلة | شكل الرسم البياني شبه التبايني (أحد الخيارات التالية: {exponential, gaussian, spherical}). |
range | عدد عائم | نطاق شبه التباين، بالمتر |
sill | عدد عائم | Semivariogram sill. |
nugget | عدد عائم | قيمة تأثير عدم الاستمرارية في دالة التباين النصفي |
maxDistance | العدد العائم، القيمة التلقائية: null | نصف القطر الذي يحدّد الميزات المضمّنة في عملية احتساب كل بكسل، ويتم قياسه بالمتر. يتم ضبط القيمة التلقائية على نطاق مخطط التباين النصفي. |
reducer | Reducer, default: null | أداة تقليل تُستخدَم لدمج قيمة "propertyName" للنقاط المتداخلة في قيمة واحدة. |
أمثلة
محرّر الرموز البرمجية (JavaScript)
/**
* This example generates an interpolated surface using kriging from a
* FeatureCollection of random points that simulates a table of air temperature
* at ocean weather buoys.
*/
// Average air temperature at 2m height for June, 2020.
var img = ee.Image('ECMWF/ERA5/MONTHLY/202006')
.select(['mean_2m_air_temperature'], ['tmean']);
// Region of interest: South Pacific Ocean.
var roi = ee.Geometry.Polygon(
[[[-156.053, -16.240],
[-156.053, -44.968],
[-118.633, -44.968],
[-118.633, -16.240]]], null, false);
// Sample the mean June 2020 temperature surface at random points in the ROI.
var tmeanFc = img.sample(
{region: roi, scale: 25000, numPixels: 50, geometries: true}); //250
// Generate an interpolated surface from the points using kriging; parameters
// are set according to interpretation of an unshown semivariogram. See section
// 2.1 of https://doi.org/10.14214/sf.369 for information on semivariograms.
var tmeanImg = tmeanFc.kriging({
propertyName: 'tmean',
shape: 'gaussian',
range: 2.8e6,
sill: 164,
nugget: 0.05,
maxDistance: 1.8e6,
reducer: ee.Reducer.mean()
});
// Display the results on the map.
Map.setCenter(-137.47, -30.47, 3);
Map.addLayer(tmeanImg, {min: 279, max: 300}, 'Temperature (K)');
إعداد Python
راجِع صفحة
بيئة Python للحصول على معلومات حول واجهة برمجة التطبيقات Python واستخدام
geemap
للتطوير التفاعلي.
import ee
import geemap.core as geemap
Colab (Python)
# This example generates an interpolated surface using kriging from a
# FeatureCollection of random points that simulates a table of air temperature
# at ocean weather buoys.
# Average air temperature at 2m height for June, 2020.
img = ee.Image('ECMWF/ERA5/MONTHLY/202006').select(
['mean_2m_air_temperature'], ['tmean']
)
# Region of interest: South Pacific Ocean.
roi = ee.Geometry.Polygon(
[[
[-156.053, -16.240],
[-156.053, -44.968],
[-118.633, -44.968],
[-118.633, -16.240],
]],
None,
False,
)
# Sample the mean June 2020 temperature surface at random points in the ROI.
tmean_fc = img.sample(region=roi, scale=25000, numPixels=50, geometries=True)
# Generate an interpolated surface from the points using kriging parameters
# are set according to interpretation of an unshown semivariogram. See section
# 2.1 of https://doi.org/10.14214/sf.369 for information on semivariograms.
tmean_img = tmean_fc.kriging(
propertyName='tmean',
shape='gaussian',
range=2.8e6,
sill=164,
nugget=0.05,
maxDistance=1.8e6,
reducer=ee.Reducer.mean(),
)
# Display the results on the map.
m = geemap.Map()
m.set_center(-137.47, -30.47, 3)
m.add_layer(
tmean_img,
{'min': 279, 'max': 300, 'min': 279, 'max': 300},
'Temperature (K)',
)
m
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003ekriging()\u003c/code\u003e interpolates values across a FeatureCollection using specified Kriging parameters to generate an Image.\u003c/p\u003e\n"],["\u003cp\u003eIt estimates values for each pixel based on the spatial correlation of a numeric property within the input FeatureCollection.\u003c/p\u003e\n"],["\u003cp\u003eThe interpolation process is guided by a semivariogram model defined by \u003ccode\u003eshape\u003c/code\u003e, \u003ccode\u003erange\u003c/code\u003e, \u003ccode\u003esill\u003c/code\u003e, and \u003ccode\u003enugget\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify a search radius (\u003ccode\u003emaxDistance\u003c/code\u003e) and a reducer to handle overlapping points (\u003ccode\u003ereducer\u003c/code\u003e).\u003c/p\u003e\n"]]],["The `kriging` method interpolates a surface from a `FeatureCollection` by sampling a Kriging estimator at each pixel, returning an `Image`. Key parameters include: `propertyName` (numeric property to estimate), `shape` (semivariogram shape), `range`, `sill`, and `nugget` (semivariogram values). `maxDistance` limits feature inclusion in pixel calculations. An optional `reducer` handles overlapping points. Example demonstrates creating a temperature surface from sampled points, setting Kriging parameters, and visualizing the result.\n"],null,["# ee.FeatureCollection.kriging\n\nReturns the results of sampling a Kriging estimator at each pixel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------------------|---------|\n| FeatureCollection.kriging`(propertyName, shape, range, sill, nugget, `*maxDistance* `, `*reducer*`)` | Image |\n\n| Argument | Type | Details |\n|--------------------|------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | FeatureCollection | Feature collection to use as source data for the estimation. |\n| `propertyName` | String | Property to be estimated (must be numeric). |\n| `shape` | String | Semivariogram shape (one of {exponential, gaussian, spherical}). |\n| `range` | Float | Semivariogram range, in meters. |\n| `sill` | Float | Semivariogram sill. |\n| `nugget` | Float | Semivariogram nugget. |\n| `maxDistance` | Float, default: null | Radius which determines which features are included in each pixel's computation, in meters. Defaults to the semivariogram's range. |\n| `reducer` | Reducer, default: null | Reducer used to collapse the 'propertyName' value of overlapping points into a single value. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n/**\n * This example generates an interpolated surface using kriging from a\n * FeatureCollection of random points that simulates a table of air temperature\n * at ocean weather buoys.\n */\n\n// Average air temperature at 2m height for June, 2020.\nvar img = ee.Image('ECMWF/ERA5/MONTHLY/202006')\n .select(['mean_2m_air_temperature'], ['tmean']);\n\n// Region of interest: South Pacific Ocean.\nvar roi = ee.Geometry.Polygon(\n [[[-156.053, -16.240],\n [-156.053, -44.968],\n [-118.633, -44.968],\n [-118.633, -16.240]]], null, false);\n\n// Sample the mean June 2020 temperature surface at random points in the ROI.\nvar tmeanFc = img.sample(\n {region: roi, scale: 25000, numPixels: 50, geometries: true}); //250\n\n// Generate an interpolated surface from the points using kriging; parameters\n// are set according to interpretation of an unshown semivariogram. See section\n// 2.1 of https://doi.org/10.14214/sf.369 for information on semivariograms.\nvar tmeanImg = tmeanFc.kriging({\n propertyName: 'tmean',\n shape: 'gaussian',\n range: 2.8e6,\n sill: 164,\n nugget: 0.05,\n maxDistance: 1.8e6,\n reducer: ee.Reducer.mean()\n});\n\n// Display the results on the map.\nMap.setCenter(-137.47, -30.47, 3);\nMap.addLayer(tmeanImg, {min: 279, max: 300}, 'Temperature (K)');\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# This example generates an interpolated surface using kriging from a\n# FeatureCollection of random points that simulates a table of air temperature\n# at ocean weather buoys.\n\n# Average air temperature at 2m height for June, 2020.\nimg = ee.Image('ECMWF/ERA5/MONTHLY/202006').select(\n ['mean_2m_air_temperature'], ['tmean']\n)\n\n# Region of interest: South Pacific Ocean.\nroi = ee.Geometry.Polygon(\n [[\n [-156.053, -16.240],\n [-156.053, -44.968],\n [-118.633, -44.968],\n [-118.633, -16.240],\n ]],\n None,\n False,\n)\n\n# Sample the mean June 2020 temperature surface at random points in the ROI.\ntmean_fc = img.sample(region=roi, scale=25000, numPixels=50, geometries=True)\n\n# Generate an interpolated surface from the points using kriging parameters\n# are set according to interpretation of an unshown semivariogram. See section\n# 2.1 of https://doi.org/10.14214/sf.369 for information on semivariograms.\ntmean_img = tmean_fc.kriging(\n propertyName='tmean',\n shape='gaussian',\n range=2.8e6,\n sill=164,\n nugget=0.05,\n maxDistance=1.8e6,\n reducer=ee.Reducer.mean(),\n)\n\n# Display the results on the map.\nm = geemap.Map()\nm.set_center(-137.47, -30.47, 3)\nm.add_layer(\n tmean_img,\n {'min': 279, 'max': 300, 'min': 279, 'max': 300},\n 'Temperature (K)',\n)\nm\n```"]]