ارسال بازخورد
ee.Image.changeProj
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نمایش تصویر ورودی را تغییر می دهد و هر پیکسل را از محل خود در srcProj به همان مختصات در dstProj منتقل می کند.
استفاده برمی گرداند Image. changeProj (srcProj, dstProj)
تصویر
استدلال تایپ کنید جزئیات این: input
تصویر srcProj
فرافکنی طرح اولیه. dstProj
فرافکنی طرح جدید.
نمونه ها ویرایشگر کد (جاوا اسکریپت)
// A DEM image object.
var img = ee . Image ( 'MERIT/DEM/v1_0_3' );
// Construct a projection object from a WKT string or EPSG code, for example,
// the Robinson projection (https://epsg.io/54030).
var proj = ee . Projection (
'PROJCS["World_Robinson",' +
'GEOGCS["GCS_WGS_1984",' +
'DATUM["WGS_1984",' +
'SPHEROID["WGS_1984",6378137,298.257223563]],' +
'PRIMEM["Greenwich",0],' +
'UNIT["Degree",0.017453292519943295]],' +
'PROJECTION["Robinson"],' +
'UNIT["Meter",1]]'
)
// Optionally adjust projection scale; stretch layer larger in this case.
. scale ( 0.9 , 0.9 );
// "Paint" the image in the desired projection onto the projection of
// the map canvas ('EPSG:3857').
var imgProj = img . changeProj ( proj , 'EPSG:3857' );
// Add an overlay image to the map to cover the default base layers.
Map . setCenter ( 0 , 0 , 2 );
Map . addLayer ( ee . Image ( 1 ), { palette : 'grey' }, 'Grey background' , false );
// Add the projection-tweaked image to the map.
Map . addLayer ( imgProj , { min : 0 , max : 3000 }, 'DEM in Robinson projection' ); راه اندازی پایتون
برای اطلاعات در مورد API پایتون و استفاده از geemap
برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.
import ee
import geemap.core as geemap کولب (پایتون)
# A DEM image object.
img = ee . Image ( 'MERIT/DEM/v1_0_3' )
# Construct a projection object from a WKT string or EPSG code, for example,
# the Robinson projection (https://epsg.io/54030).
proj = (
ee . Projection (
'PROJCS["World_Robinson",'
+ 'GEOGCS["GCS_WGS_1984",'
+ 'DATUM["WGS_1984",'
+ 'SPHEROID["WGS_1984",6378137,298.257223563]],'
+ 'PRIMEM["Greenwich",0],'
+ 'UNIT["Degree",0.017453292519943295]],'
+ 'PROJECTION["Robinson"],'
+ 'UNIT["Meter",1]]'
)
# Optionally adjust projection scale stretch layer larger in this case.
. scale ( 0.9 , 0.9 )
)
# "Paint" the image in the desired projection onto the projection of
# the map canvas ('EPSG:3857').
img_proj = img . changeProj ( proj , 'EPSG:3857' )
# Add an overlay image to the map to cover the default base layers.
m = geemap . Map ()
m . set_center ( 0 , 0 , 2 )
m . add_layer ( ee . Image ( 1 ), { 'palette' : 'grey' }, 'Grey background' , False )
# Add the projection-tweaked image to the map.
m . add_layer (
img_proj ,
{ 'min' : 0 , 'max' : 3000 },
'DEM in Robinson projection' ,
)
m ،نمایش تصویر ورودی را تغییر می دهد و هر پیکسل را از محل خود در srcProj به همان مختصات در dstProj منتقل می کند.
استفاده برمی گرداند Image. changeProj (srcProj, dstProj)
تصویر
استدلال تایپ کنید جزئیات این: input
تصویر srcProj
فرافکنی طرح اولیه. dstProj
فرافکنی طرح جدید.
نمونه ها ویرایشگر کد (جاوا اسکریپت)
// A DEM image object.
var img = ee . Image ( 'MERIT/DEM/v1_0_3' );
// Construct a projection object from a WKT string or EPSG code, for example,
// the Robinson projection (https://epsg.io/54030).
var proj = ee . Projection (
'PROJCS["World_Robinson",' +
'GEOGCS["GCS_WGS_1984",' +
'DATUM["WGS_1984",' +
'SPHEROID["WGS_1984",6378137,298.257223563]],' +
'PRIMEM["Greenwich",0],' +
'UNIT["Degree",0.017453292519943295]],' +
'PROJECTION["Robinson"],' +
'UNIT["Meter",1]]'
)
// Optionally adjust projection scale; stretch layer larger in this case.
. scale ( 0.9 , 0.9 );
// "Paint" the image in the desired projection onto the projection of
// the map canvas ('EPSG:3857').
var imgProj = img . changeProj ( proj , 'EPSG:3857' );
// Add an overlay image to the map to cover the default base layers.
Map . setCenter ( 0 , 0 , 2 );
Map . addLayer ( ee . Image ( 1 ), { palette : 'grey' }, 'Grey background' , false );
// Add the projection-tweaked image to the map.
Map . addLayer ( imgProj , { min : 0 , max : 3000 }, 'DEM in Robinson projection' ); راه اندازی پایتون
برای اطلاعات در مورد API پایتون و استفاده از geemap
برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.
import ee
import geemap.core as geemap کولب (پایتون)
# A DEM image object.
img = ee . Image ( 'MERIT/DEM/v1_0_3' )
# Construct a projection object from a WKT string or EPSG code, for example,
# the Robinson projection (https://epsg.io/54030).
proj = (
ee . Projection (
'PROJCS["World_Robinson",'
+ 'GEOGCS["GCS_WGS_1984",'
+ 'DATUM["WGS_1984",'
+ 'SPHEROID["WGS_1984",6378137,298.257223563]],'
+ 'PRIMEM["Greenwich",0],'
+ 'UNIT["Degree",0.017453292519943295]],'
+ 'PROJECTION["Robinson"],'
+ 'UNIT["Meter",1]]'
)
# Optionally adjust projection scale stretch layer larger in this case.
. scale ( 0.9 , 0.9 )
)
# "Paint" the image in the desired projection onto the projection of
# the map canvas ('EPSG:3857').
img_proj = img . changeProj ( proj , 'EPSG:3857' )
# Add an overlay image to the map to cover the default base layers.
m = geemap . Map ()
m . set_center ( 0 , 0 , 2 )
m . add_layer ( ee . Image ( 1 ), { 'palette' : 'grey' }, 'Grey background' , False )
# Add the projection-tweaked image to the map.
m . add_layer (
img_proj ,
{ 'min' : 0 , 'max' : 3000 },
'DEM in Robinson projection' ,
)
m
ارسال بازخورد
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
میخواهید موارد بیشتری را با ما درمیان بگذارید؟
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["`Image.changeProj()` modifies the projection of an image by moving pixels to match coordinates in a new projection."],["It takes the original projection (`srcProj`) and the target projection (`dstProj`) as inputs."],["You can define projections using WKT strings or EPSG codes."],["The function returns a new Image object with the altered projection."],["This is useful for visualizing or processing data in different coordinate systems."]]],["The `changeProj` function modifies an image's projection by relocating each pixel from its original projection (`srcProj`) to a new projection (`dstProj`). This is done by taking an image object as input and takes in two parameters `srcProj` and `dstProj`. For example, it takes a DEM image, defines a Robinson projection with an adjusted scale, and then applies `changeProj` to re-project the image onto the map canvas projection (`EPSG:3857`). The result is an image with the modified projection.\n"]]