[gdal-dev] reprojection of global rasters to mollweide

Even Rouault even.rouault at mines-paris.org
Wed Aug 1 10:53:50 PDT 2012


Le mardi 31 juillet 2012 11:32:35, Michael Schulz a écrit :
> Dear GDAL'ers,
> 
> I have currently some issues with reprojecting global datasets in
> geographic coordinates to the Mollweide projection (GDAL 1.8.0). When using
> gdalwarp like:
> 
> gdalwarp -s_srs 'EPSG:4326' -t_srs '+proj=moll +lon_0=0 +x_0=0 +y_0=0
> +ellps=WGS84 +datum=WGS84 +units=m +no_defs' LatLon.2001.tree.nd.tif
> Mollweide.2001.tree.nd.tif
> 
> unpredictably, it sometimes works but other times I get the "Too many
> points (441 out of 441) failed to transform" error. I was wondering whether
> this could be a memory size issues (although the machine I'm working has
> 24GB RAM).

No, memory isn't the reason. The reason is that the algorithm used by gdalwarp 
doesn't manage to guess the extent of the raster once reprojected. It may or 
may not succeed depending on the extent of the source image and the 
reprojection involved. If you know the extent in the target coordinate system, 
specifying it with -te will solve that issue.

> 
> To overcome this adding the config option CHECK_WITH_INVERT_PROJ FALSE
> works, but now the projected raster shows wrapped values outside the actual
> valid coordinate range for Mollweide, e.g. the Aleutian Islands appear
> twice (once inside the outer ellipse. Is this due to
> the CHECK_WITH_INVERT_PROJ ?

The default value of CHECK_WITH_INVERT_PROJ (YES) checks that when a 
reprojection of a coordinate is done, the invert reprojection gives a result 
close to the original coordinate, which validates the fact that we are in the 
validity area of the reprojection. If you override with 
CHECK_WITH_INVERT_PROJ=FALSE, you can have indeed strange artifacts due to non 
invertible transformations.

> I haven't worked with the cutline option
> before, but should/could this be used here to solve this?

I don't think this will help.

> 
> Happy about any feedback on this issue. Thanks, Michael


More information about the gdal-dev mailing list