How to reproject and resize a raster to match another raster of different resolution and coordinates?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi all,
I have a first DEM of the area of the area around a glacier in the European Alps, which is in UTM zone 32N (EPSG 32632), and has a spatial resolution of 30 meters (the size is 246x272).
I have a second DEM, which is from ERA-5 Land. It is in geographical lat,lon coordinates (EPSG 4326), is much larger (Europe) and has a spatial resolution of 0.1 x 0.1 degrees (the size is 501x501).
How can I reproject and resize the second DEM, so that the size and the coordinates of both DEM's are the same? In other words: I want to have the second DEM in equal spatial position and resolution as the first one (matrix size 501x501 to 246x272 and spatial match). Is this possible within MATLAB through for example reprojection and interpolation? How can this be done?
Thank you.
I have both geotiffs uploaded at: https://drive.google.com/file/d/1xdahwKfYrTTkXDz-aKw8njEsDIcyIkXz/view?usp=sharing
They can be read in by and info can be obtained with:
DEM = double(geotiffread('DEM_30m.tif'));
DEM(DEM==0)=NaN;
DEM2 = double(geotiffread('ERA5-Land.tif'));
DEM2(DEM2==0)=NaN;
info = geotiffinfo('DEM_30m.tif');
[x,y] = pixcenters(info);
info2 = geotiffinfo('ERA5-Land.tif');
[x2,y2] = pixcenters(info2);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!