[gdal-dev] Something odd with Natural Earth projection

Even Rouault even.rouault at spatialys.com
Fri Aug 22 16:44:47 PDT 2014


Le vendredi 22 août 2014 22:08:09, Jukka Rahkonen a écrit :
> Hi,
> 
> There is a funny, reproducible case with good screen captures in
> Stackexchange. The World, when reprojected from EPSG:4326 into Natural
> Earth projection with GDAL is almost perfect. However, it looks like
> sharks have been biting four bits from the corners.
> 
> http://gis.stackexchange.com/questions/111320/reprojecting-natural-earth-ra
> ster-into-natearth-projection-with-gdalwarp-causing/111437#111437

Adding -wo SAMPLE_STEPS=1000 fixes it (1000 is experimentally found. 100 was 
almost perfect, and then I just tried 1000). The default is 21.

The issue here is that the warper process by rectangular regions of the target 
dataset and then tries to find the rectangular region of the source dataset 
that matches. In the corners, which are full of target pixels without any 
valid source pixels, the default sampling logic doesn't manage to identify 
properly the source pixel region due to a too low sampling step.

The higher SAMPLE_STEPS, the slower the warping is (in theory, practical speed 
might depend on situations)

Playing with -wm has possibly an influence on the result too, but that might be 
even more magic to play with that.

> 
> -Jukka Rahkonen-
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list