I'm trying to match two rasters to same size, so i can do cell to cell analysis on them. The first cell That I'm trying to match is in Mollweide projection, with 250 m resolution. Here is the gdalinfo of the file:

Driver: GTiff/GeoTIFF Files: Size is 141969, 60829 Coordinate System is: PROJCS["World_Mollweide", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mollweide"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], UNIT["Meter",1.0]] Origin = (-17619594.547443531453609,8722279.461868489161134) Pixel Size = (250.000000000000000,-250.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=LZW INTERLEAVE=BAND Corner Coordinates: Upper Left (-17619594.547, 8722279.462) Lower Left (-17619594.547,-6484970.538) Upper Right (17872655.453, 8722279.462) Lower Right (17872655.453,-6484970.538) Center ( 126530.453, 1118654.462) Band 1 Block=128x128 Type=Float32, ColorInterp=Gray NoData Value=-3.4028234663852886e+38

The second file that I'm trying to match to the first file is in "" projection, with 100m resolution. Here is the gdalinfo of the second file:

Driver: GTiff/GeoTIFF Size is 400302, 134668 Coordinate System is: PROJCS["Custom_Goode", GEOGCS["GCS_Sphere_GRS_1980_Authalic", DATUM["D_Sphere_GRS_1980_Authalic", SPHEROID["Sphere_GRS_1980_Authalic",6371007.0,0.0]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Goode_Homolosine"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], PARAMETER["Option",0.0], UNIT["Kilometer",1000.0]] Origin = (-20015.107512752761977,7429.758556314830457) Pixel Size = (0.100000000000000,-0.100000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=LZW INTERLEAVE=BAND Corner Coordinates: Upper Left ( -20015.108, 7429.759) Lower Left ( -20015.108, -6037.041) Upper Right ( 20015.092, 7429.759) Lower Right ( 20015.092, -6037.041) Center ( -0.008, 696.359) Band 1 Block=128x128 Type=Byte, ColorInterp=Gray Min=0.000 Max=72.000 Minimum=0.000, Maximum=72.000, Mean=6.100, StdDev=2.983 NoData Value=-128 Overviews: 200151x67334, 100076x33667, 50038x16834, 25019x8417, 12510x4209, 6255x2105, 3128x1053, 1564x527, 782x264, 391x132 Metadata: STATISTICS_MAXIMUM=72 STATISTICS_MEAN=6.100308069419 STATISTICS_MINIMUM=0 STATISTICS_SKIPFACTORX=1 STATISTICS_SKIPFACTORY=1 STATISTICS_STDDEV=2.9825236321

I'm trying to match the second file to the first file, but after warping, I get a file that has boundaries bigger than the actual world! The file has the other side of the world on each side (see below). For example ecos of Russia is seen on the left side of North America and ecos of North America is seen at the right side of Russia. As you can see, the resulting raster has extra land on the top left and top right.

I think the problem is that the original file's extent is actually non-existance in it's own projection. But even after cutting the the first file's extra extent on the side's, I still have problem. It seems like the Mollweide projection is not well suited for the "-te" option. Also providing gdalwarp with a simple globale shapefile to cut it for extent, takes a billion years for some reasons.

Here is the thing, since each interpolation causes loss of data and the analysis seems to be sensitive to that, I would like to get the second file to match the first file's projection and resolution, with minimum steps and without changing the first file. Thats why "-tap" option is out of picture, as if I -tap the second file, I have to do it to the first file as well so that the cells are aligned.

Any ideas where the problem is and what I can do for it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.