공지사항 :
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증 해야 합니다.
의견 보내기
ee.Image.reproject
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
특정 투영 및 해상도로 이미지를 강제로 계산합니다.
사용 반환 값 Image. reproject (crs, crsTransform , scale )
이미지
인수 유형 세부정보 다음과 같은 경우: image
이미지 재투영할 이미지입니다. crs
투영 이미지를 투영할 CRS입니다. crsTransform
목록, 기본값: null CRS 변환 값 목록입니다. 이는 3x2 변환 행렬의 행 우선 순서입니다. 이 옵션은 스케일 옵션과 상호 배타적이며 프로젝션에 이미 있는 변환을 대체합니다. scale
부동 소수점 수, 기본값: null 척도가 지정되면 지정된 투영의 미터의 명목상 크기로 지정된 척도 값을 나누어 투영이 조정됩니다. 축척을 지정하지 않으면 지정된 투영의 축척이 사용됩니다.
예
코드 편집기 (JavaScript)
// Use of ee.Image.reproject is rarely needed and should generally be avoided.
// Defining the projection and scale of analysis should be handled by "scale",
// "crs", and "crsTransform" parameters whenever they are offered by a function.
// It is occasionally useful for forcing computation or visualization at a
// desired scale and projection when alternative methods are not available. In
// this example it is used to compute and visualize terrain slope from a DEM
// composite.
// Calculate mean elevation from two DEM datasets. The resulting composite
// image has a default CRS of WGS84 with 1 degree pixels.
var dem1 = ee . Image ( 'NASA/NASADEM_HGT/001' ). select ( 'elevation' );
var dem2 = ee . Image ( 'CGIAR/SRTM90_V4' ). select ( 'elevation' );
var demMean = ee . ImageCollection ([ dem1 , dem2 ]). mean ();
// Display the DEMs on the map, note that they all render as expected.
var demVisParams = { min : 500 , max : 2500 };
Map . setCenter ( - 123.457 , 47.815 , 11 );
Map . addLayer ( dem1 , demVisParams , 'DEM 1' );
Map . addLayer ( dem2 , demVisParams , 'DEM 2' );
Map . addLayer ( demMean , demVisParams , 'DEM composite' );
// Calculate terrain slope from the composite DEM (WGS84, 1 degree pixel scale).
var demCompSlope = ee . Terrain . slope ( demMean );
// Because the composite has 1 degree pixel scale, the slope calculation
// is essenstially meaningless and difficult to even display (you may need to
// zoom out to see the individual 1 degree pixels).
Map . addLayer ( demCompSlope , { min : 0 , max : 0.3 }, 'Slope' );
// We can use ee.Image.reproject to force the slope calculation and display
// the result with a reasonable scale of 30 m on WGS84 CRS, for example.
var slopeScale = ee . Terrain . slope (
demMean . reproject ({
crs : 'EPSG:4326' ,
scale : 30
})
);
Map . addLayer ( slopeScale , { min : 0 , max : 45 }, 'Slope w/ CRS and scale' );
// To more precisely control the reprojection, you can use the "crsTransform"
// parameter instead of the "scale" parameter or set the projection according to
// a reference image. For example, here the input composite image for the slope
// function is set to match the grid spacing and alignment of the NASADEM image.
var nasademProj = dem1 . projection ();
var demMeanReproj = demMean . reproject ( nasademProj );
var slopeRefProj = ee . Terrain . slope ( demMeanReproj );
Map . addLayer ( slopeRefProj , { min : 0 , max : 45 }, 'Slope w/ reference proj' );
print ( 'Reference projection' , nasademProj );
print ( 'DEM composite projection' , demMeanReproj . projection ());
// An alternative method for changing the projection of image composites
// (not accepting the default WGS84 CRS with 1 degree pixel scale) is to
// explicitly set the default projection using ee.Image.setDefaultProjection,
// which will not force resampling, like ee.Image.reproject will.
var demMeanProj = ee . ImageCollection ([ dem1 , dem2 ]). mean ()
. setDefaultProjection ( nasademProj );
var slopeProj = ee . Terrain . slope ( demMeanProj );
Map . addLayer ( slopeProj , { min : 0 , max : 45 }, 'slope w/ default projection set' );
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
# Use of ee.Image.reproject is rarely needed and should generally be avoided.
# Defining the projection and scale of analysis should be handled by "scale",
# "crs", and "crsTransform" parameters whenever they are offered by a function.
# It is occasionally useful for forcing computation or visualization at a
# desired scale and projection when alternative methods are not available. In
# this example it is used to compute and visualize terrain slope from a DEM
# composite.
# Calculate mean elevation from two DEM datasets. The resulting composite
# image has a default CRS of WGS84 with 1 degree pixels.
dem_1 = ee . Image ( 'NASA/NASADEM_HGT/001' ) . select ( 'elevation' )
dem_2 = ee . Image ( 'CGIAR/SRTM90_V4' ) . select ( 'elevation' )
dem_mean = ee . ImageCollection ([ dem_1 , dem_2 ]) . mean ()
# Display the DEMs on the map, note that they all render as expected.
dem_vis_params = { 'min' : 500 , 'max' : 2500 }
m = geemap . Map ()
m . set_center ( - 123.457 , 47.815 , 11 )
m . add_layer ( dem_1 , dem_vis_params , 'DEM 1' )
m . add_layer ( dem_2 , dem_vis_params , 'DEM 2' )
m . add_layer ( dem_mean , dem_vis_params , 'DEM composite' )
# Calculate terrain slope from the composite DEM (WGS84, 1 degree pixel scale).
dem_comp_slope = ee . Terrain . slope ( dem_mean )
# Because the composite has 1 degree pixel scale, the slope calculation
# is essenstially meaningless and difficult to even display (you may need to
# zoom out to see the individual 1 degree pixels).
m . add_layer ( dem_comp_slope , { 'min' : 0 , 'max' : 0.3 }, 'Slope' )
# We can use ee.Image.reproject to force the slope calculation and display
# the result with a reasonable scale of 30 m on WGS84 CRS, for example.
slope_scale = ee . Terrain . slope ( dem_mean . reproject ( crs = 'EPSG:4326' , scale = 30 ))
m . add_layer ( slope_scale , { 'min' : 0 , 'max' : 45 }, 'Slope w/ CRS and scale' )
# To more precisely control the reprojection, you can use the "crsTransform"
# parameter instead of the "scale" parameter or set the projection according to
# a reference image. For example, here the input composite image for the slope
# function is set to match the grid spacing and alignment of the NASADEM image.
nasadem_proj = dem_1 . projection ()
dem_mean_reproj = dem_mean . reproject ( nasadem_proj )
slope_ref_proj = ee . Terrain . slope ( dem_mean_reproj )
m . add_layer ( slope_ref_proj , { 'min' : 0 , 'max' : 45 }, 'Slope w/ reference proj' )
display ( 'Reference projection' , nasadem_proj )
display ( 'DEM composite projection' , dem_mean_reproj . projection ())
# An alternative method for changing the projection of image composites
# (not accepting the default WGS84 CRS with 1 degree pixel scale) is to
# explicitly set the default projection using ee.Image.setDefaultProjection,
# which will not force resampling, like ee.Image.reproject will.
dem_mean_proj = (
ee . ImageCollection ([ dem_1 , dem_2 ]) . mean () . setDefaultProjection ( nasadem_proj )
)
slope_proj = ee . Terrain . slope ( dem_mean_proj )
m . add_layer (
slope_proj , { 'min' : 0 , 'max' : 45 }, 'slope w/ default projection set'
)
m
의견 보내기
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스 에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스 에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책 을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
의견을 전달하고 싶나요?
[[["이해하기 쉬움","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-26(UTC)"],[[["`Image.reproject()` forces an image to be computed in a specified projection and resolution, often for analysis or visualization purposes."],["This method is generally avoided and should primarily be used when other methods for setting projection and scale are unavailable."],["`crs` and `scale` or `crsTransform` parameters control the reprojection; the latter offers more precise control."],["Setting the default projection using `setDefaultProjection` is an alternative for image composites, avoiding resampling inherent in `reproject`."],["Reprojection is crucial for tasks like terrain analysis where pixel scale significantly affects results."]]],[]]