[Gdal-dev] gdalwarp failing on proj=ortho

Frank Warmerdam warmerdam at pobox.com
Fri Nov 5 01:20:19 EST 2004


Tyler Mitchell wrote:
> Sorry to bring up orthographic projections again, I know you looked into these 
> earlier this year.  I really want to show this one off though!  I'm trying to 
> convert a lat/long image into ortho - but I think I'm missing something.
> 
> Here is my command line:
> 
> gdalwarp -s_srs '+proj=latlong' 
> 	-t_srs '+proj=ortho +ellps=WGS84 +lat_0=60 +lon_0=-95' 
> 	globe.tif globe_ortho.tif
> 
> The output error I get is:	
> 
> ERROR 1: tolerance condition error
> ERROR 1: GDALWarperOperation::ComputeSourceWindow() failed because
> the pfnTransformer failed.
> 
> I'm running proj-4.4.7 and gdal from cvs a couple weeks ago.  Any ideas why 
> this doesn't work?

Folks,

I have dug through this and found several issues in GDAL's warper with
graceful operation in the situtation where some of the file won't transform.
Gory details are available at:

   http://bugzilla.remotesensing.org/show_bug.cgi?id=642

Some of the issues have an interim solution by:

  o Sticking to ellps=sphere for ortho operations.
  o Adding warp option to force use of a sampling grid for computing regions
    instead of just edge points.
  o Add a warp option to force loading a bit of extra data to avoid "cracking"
    on the anti-meridian.
eg.
   gdalwarp -wo SOURCE_EXTRA=100 -wo SAMPLE_GRID=YES -s_srs '+proj=latlong
       +ellps=sphere' -t_srs '+proj=ortho +ellps=sphere +lat_0=60 +lon_0=-95'
       globe.tif ortho.tif

I have made changes in GDAL so that the SAMPLE_GRID and SOURCE_EXTRA warp
options aren't required.  The default behavior is now to default to using
a sampling grid if any edge points fail to transform.  And if any points fail
to transform an implicit SOURCE_EXTRA=10 will be used to load a bit of extra
data to avoid cracking.

I also fixed a bug in PROJ.4 related to geocentric transformations.  To get
this you would need CVS code, since the fix did not make it into the recent
PROJ 4.4.9 release.

Thanks for pointing out the issues Tyler.  I think the GDAL warper is
substantially more robust for your having raised them.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list