Opened 19 years ago
Last modified 19 years ago
#642 closed defect (fixed)
latlong to ortho projection fails
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | major | Keywords: | |
Cc: |
Description
Link to image in URL. ----------- Re: [Gdal-dev] gdalwarp failing on proj=ortho From: Frank Warmerdam <warmerdam@pobox.com> To: Tyler Mitchell <tylermitchell@shaw.ca> CC: gdal-dev@xserve.flids.com 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? Tyler, The tolerence condition error is coming out of PROJ.4. I don't know exactly what it means, but I presume it indicates some sort of mathematical error in transforming "over the horizon" or off the earth. If you can make globe.tif available to me I can see why gdalwarp isn't more adaptive when only subregions of the target area support reprojection. I did a bunch of work on global scale transformations in MapServer but I don't think the same capabilities were implemented in GDAL itself. In fact, I would appreciate it if you could submit this problem via the GDAL bugzilla. I would add that you should specify an ellipe or datum with all projections that don't implicitly contain one. For instance you should have '+proj=latlong +ellps=WGS84' in this case. I doubt this has anything to do with the problem though. I presume it is using WGS84 internally as a default. Best regards,
Change History (2)
comment:2 by , 19 years ago
I have changed gdalwarpoperation.cpp to fallback to using a grid for sampling the source window to load if any edge pixels of the edges fail to transform. I have changed gdalwarpoperation.cpp to add 10 pixels around the loaded window if any pixels failed to transform (and SOURCE_EXTRA is not explicitly set). In PROJ.4 I found the problem with geocentric conversion was that pj_geodetic_to_geocentric was trying to transform points to geocentric even if they had failed the previous projection step. Added check for HUGE_VAL to skip them. The problem wasn't really related to spherical coordinates, it is just anything that triggered a change of ellipsoid caused the geocentric transformation to be triggered. All known issues now resolved in the code (GDAL and PROJ.4). Whew!
Note:
See TracTickets
for help on using tickets.