با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
درک اینکه موتور زمین چگونه مقیاس را کنترل می کند برای تفسیر نتایج علمی به دست آمده از موتور زمین بسیار مهم است. در اینجا مقیاس به معنای وضوح پیکسل است. بر خلاف سایر سیستمعاملهای GIS و پردازش تصویر، مقیاس تحلیل به جای ورودی، از خروجی تعیین میشود. به طور خاص، هنگامی که برای مثال، یک تصویر برای نمایش یا یک آمار درخواستی میکنید، مقیاسی را مشخص میکنید که در آن دادهها به تجزیه و تحلیل وارد میشوند. این مفهوم در شکل 1 نشان داده شده است.
شکل 1. یک نمایش گرافیکی از مجموعه داده های تصویر در Earth Engine. خطوط چین نشان دهنده خط مشی هرمی برای تجمیع بلوک های 2x2 از 4 پیکسل است. Earth Engine از مقیاس مشخص شده توسط خروجی برای تعیین سطح مناسب هرم تصویر برای استفاده به عنوان ورودی استفاده می کند.
اهرام تصویری
دارایی های تصویر در Earth Engine در مقیاس های متعدد، در اهرام تصویر وجود دارد. خط مشی هرمی (که با خطوط چین در شکل 1 نشان داده شده است) تعیین می کند که چگونه هر پیکسل در سطح معینی از هرم از تجمع یک بلوک 2×2 پیکسل در سطح پایین تر بعدی محاسبه می شود. برای تصاویر با ارزش پیوسته، مقادیر پیکسل سطوح بالایی هرم، میانگین پیکسل ها در سطح پایین بعدی است. برای تصاویر با ارزش گسسته، مقادیر پیکسل سطوح بالایی هرم نمونه ای (معمولاً پیکسل بالا سمت چپ) از پیکسل ها در سطح پایین بعدی است.
پایینترین سطح هرم تصویر، دادههای تصویر را با وضوح اصلی، زمانی که در Earth Engine وارد میشود، نشان میدهد. در طول مصرف، داده ها (طبق خط مشی هرمی) برای ایجاد سطوح هرم بالاتر جمع می شوند. داده ها جمع می شوند تا زمانی که کل تصویر در یک کاشی 256x256 پیکسل قرار گیرد. هنگامی که از یک تصویر در کد خود استفاده می کنید، Earth Engine سطحی از هرم را با نزدیکترین مقیاس کمتر یا مساوی با مقیاس مشخص شده توسط تجزیه و تحلیل شما انتخاب می کند و در صورت لزوم، نمونه های مجدد (با استفاده از نزدیکترین همسایه به طور پیش فرض) را انتخاب می کند.
مقیاس تحلیل
مقیاس تجزیه و تحلیل در Earth Engine بر اساس "کشش" تعیین می شود. مقیاس درخواست ورودی برای محاسبات از خروجی تعیین می شود. به عنوان مثال، اگر تصویری را به ویرایشگر کد یا عنصر نقشه geemap اضافه کنید، سطح بزرگنمایی نقشه مقیاسی را تعیین می کند که در آن ورودی ها از هرم تصویر درخواست می شود. برای محاسبات دیگر، scale به عنوان آرگومان مشخص می کنید. به عنوان مثال، با استفاده از باند NIR یک تصویر Landsat که دارای وضوح 30 متری است:
در این مثال، توجه داشته باشید که مقدار پیکسل در یک مکان ثابت (مرکز تصویر) بر اساس مقیاس متفاوت است. این به دلیل این واقعیت است که سطوح مختلف هرم برای مقیاس های مختلف انتخاب می شوند. برای مقیاسهای مشابه، نمونهگیری مجدد نزدیکترین همسایه منجر به بازگشت همان مقدار پیکسل میشود. نکته مهم این است که با تغییر مقیاس، ورودی های تصویر متفاوتی درخواست می شود.
هنگامی که تصویری را با افزودن آن به نقشه تجسم می کنید، Earth Engine مقیاس را از سطح زوم تعیین می کند. مثال ساده زیر را در نظر بگیرید که به سادگی تصویر Landsat را نمایش می دهد:
نقشه تا آخر بزرگنمایی میشود، به طوری که پیکسلهای وضوح اصلی به وضوح قابل مشاهده هستند. بزرگنمایی به اندازه کافی پیکسل ها را نمایش نمی دهد، بلکه سطوح بالاتری از هرم تصویر را نمایش می دهد. همچنین شایان ذکر است که ویرایشگر کد و نقشههای geemap از پیشبینی نقشهها (EPSG:3857) استفاده میکنند، بنابراین سطح مناسب هرم تصویر نیز باید قبل از نمایش دوباره نمایش داده شود. از سند پیشبینیها درباره نحوه مدیریت پیشبینیها توسط Earth Engine بیشتر بیاموزید.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eIn Earth Engine, the scale of analysis, referring to pixel resolution, is determined by the output rather than the input, unlike other GIS platforms.\u003c/p\u003e\n"],["\u003cp\u003eEarth Engine utilizes image pyramids, where each level represents the image at a different scale, with pixel values aggregated from lower levels.\u003c/p\u003e\n"],["\u003cp\u003eThe scale you specify in your analysis dictates which level of the image pyramid Earth Engine uses as input, influencing the results you obtain.\u003c/p\u003e\n"],["\u003cp\u003eWhen visualizing images on the map, the zoom level determines the scale, and Earth Engine automatically selects the appropriate pyramid level for display.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure consistent and accurate results, it's crucial to explicitly specify the desired scale when using functions with a scale parameter in Earth Engine.\u003c/p\u003e\n"]]],[],null,["# Scale\n\nUnderstanding how Earth Engine handles scale is crucial to interpreting scientific\nresults obtained from Earth Engine. Here, scale means pixel resolution. Unlike other\nGIS and image processing platforms, the scale of analysis is determined from the output,\nrather than the input. Specifically, when you make a request for results, an image to\ndisplay or a statistic, for example, you specify the scale at which data is input to the\nanalysis. This concept is illustrated in Figure 1.\nFigure 1. A graphic representation of an image dataset in Earth Engine. Dashed lines represent the pyramiding policy for aggregating 2x2 blocks of 4 pixels. Earth Engine uses the scale specified by the output to determine the appropriate level of the image pyramid to use as input.\n\nImage Pyramids\n--------------\n\nImage assets in Earth Engine exist at multiple scales, in\n[image pyramids](https://en.wikipedia.org/wiki/Pyramid_(image_processing)).\nThe pyramiding policy (represented by dashed lines in Figure 1) determines how each pixel\nat a given level of the pyramid is computed from the aggregation of a 2x2 block of pixels\nat the next lower level. For continuous valued images, the pixel values of upper levels of\nthe pyramid are the mean of pixels at the next lower level. For discrete valued images,\npixel values of upper levels of the pyramid are a sample (usually the top left pixel) of\npixels at the next lower level.\n\nThe lowest level of the image pyramid represents image data at native resolution, when it is\ningested into Earth Engine. During ingestion, the data are aggregated (according to the\npyramiding policy) to create higher pyramid levels. The data are aggregated until the\nentire image fits within a 256x256 pixel tile. When you use an image in your code,\nEarth Engine chooses a level of the pyramid with the closest scale less than or equal to\nthe scale specified by your analysis and resamples (using nearest neighbor by default)\nas necessary.\n\nScale of analysis\n-----------------\n\nScale of analysis in Earth Engine is determined on a \"pull\" basis. The scale at which\nto request inputs to a computation is determined from the output. For example, if you\nadd an image to the Code Editor or geemap map element, the zoom level of the map determines\nthe scale at which inputs are requested from the image pyramid. For other computations, you\nspecify `scale` as an argument. For example, using the NIR band of a Landsat\nimage, which has 30 meters native resolution:\n\n### Code Editor (JavaScript)\n\n```javascript\nvar image = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318').select('B4');\n\nvar printAtScale = function(scale) {\n print('Pixel value at '+scale+' meters scale',\n image.reduceRegion({\n reducer: ee.Reducer.first(),\n geometry: image.geometry().centroid(),\n // The scale determines the pyramid level from which to pull the input\n scale: scale\n }).get('B4'));\n};\n\nprintAtScale(10); // 0.10394100844860077\nprintAtScale(30); // 0.10394100844860077\nprintAtScale(50); // 0.09130698442459106\nprintAtScale(70); // 0.1150854229927063\nprintAtScale(200); // 0.102478988468647\nprintAtScale(500); // 0.09072770178318024\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\nimage = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318').select('B4')\n\n\ndef print_at_scale(scale):\n display(\n f'Pixel value at {scale} meters scale',\n image.reduceRegion(\n reducer=ee.Reducer.first(),\n geometry=image.geometry().centroid(),\n # The scale determines the pyramid level from which to pull the input\n scale=scale,\n ).get('B4'),\n )\n\n\nprint_at_scale(10) # 0.10394100844860077\nprint_at_scale(30) # 0.10394100844860077\nprint_at_scale(50) # 0.09130698442459106\nprint_at_scale(70) # 0.1150854229927063\nprint_at_scale(200) # 0.102478988468647\nprint_at_scale(500) # 0.09072770178318024\n```\n\nIn this example, note that the pixel value at a constant location (the image centroid)\nvaries based on scale. This is due to the fact that different pyramid levels are selected\nfor different scales. For similar scales, nearest neighbor resampling results in the same\npixel value being returned. The important point is that by varying the scale, different\nimage inputs are requested.\n| **Note:** To avoid ambiguity, always specify scale when you use a function which has a scale parameter.\n\nWhen you visualize an image by adding it to the map, Earth Engine determines scale from\nthe zoom level. Consider the following simple example, which simply displays a Landsat\nimage:\n\n### Code Editor (JavaScript)\n\n```javascript\nvar image = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318');\nMap.centerObject(image, 17);\nMap.addLayer(image, {bands: ['B4', 'B3', 'B2'], max: 0.35}, 'image');\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\nimage = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318')\nm = geemap.Map()\nm.center_object(image, 17)\nm.add_layer(image, {'bands': ['B4', 'B3', 'B2'], 'max': 0.35}, 'image')\nm\n```\n\nThe map starts zoomed all the way in, such that the native resolution pixels are clearly\nvisible. Zooming out far enough will not display the same pixels, but will instead\ndisplay higher levels of the image pyramid. It is also worth noting that the Code Editor\nand geemap maps use the [maps mercator (EPSG:3857)](http://epsg.io/3857)\nprojection, so the appropriate level of the image pyramid also needs to be reprojected prior\nto display. Learn more about how Earth Engine handles projections from the\n[projections doc](/earth-engine/guides/projections)."]]