How to reproject and resize a raster to match another raster of different resolution and coordinates?

10 Ansichten (letzte 30 Tage)
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.
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);

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by