[gdal-dev] reprojecting to Near-sided perspective

Even Rouault even.rouault at mines-paris.org
Mon Mar 14 15:01:55 EDT 2011


Le lundi 14 mars 2011 14:07:25, maciek a écrit :
> I am using GDAL embeded in FWTools 2.4.7, I am trying to repoject a raster
> image into Near-sided perspective. I call:
> 
> gdalwarp -t_srs "+proj=nsper" s.tif s2.tif
> 
> And I get:
> 
> ERROR 1: Translating source or target SRS failed:
> +proj=nsper
> 
> I tried adding diferent parameters configuring the projection but nothing
> seems to help. Other reprojections work fine. What might be the problem
> with this one? Is there a way to find more details about the error?

The near-sided perspective projection isn't handled by GDAL/OGR, but you can 
try however the following ugly hack that will bypass it.

Create a file nsper_wkt.txt for example with the following content :

PROJCS["foo",
    GEOGCS["foo"],
    PROJECTION["foo"],
    EXTENSION["PROJ4","+proj=nsper +h=34700.0  +wktext"]]

You certainly need to adjust the string in the PROJ4 extension with the 
appropriate proj.4 definition.

And then you can specify nsper_wkt.txt as the value for the -t_srs argument.


More information about the gdal-dev mailing list