id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 3056,ERMapper .ers driver not handling registration cells correctly,dougc,warmerdam,"Starting at line 891 of rev 17119 of ersdataset.cpp, the handling of registration cells is incorrect. I believe the default should be 0,0 and there should not be a 1 subtracted in the transformation. With the existing code, a registration cell that's present but with x and/or y set to 0 results in a -1 offset being applied when there should be no offset. Also, the -1 offset causes an off by one error in all other cases. Suggested replacement: {{{ /* -------------------------------------------------------------------- */ /* Adjust if we have a registration cell. */ /* -------------------------------------------------------------------- */ int iCellX = atoi(poHeader->Find(""RasterInfo.RegistrationCellX"", ""0"")); int iCellY = atoi(poHeader->Find(""RasterInfo.RegistrationCellY"", ""0"")); if( poDS->bGotTransform ) { poDS->adfGeoTransform[0] -= iCellX * poDS->adfGeoTransform[1] + iCellY * poDS->adfGeoTransform[2]; poDS->adfGeoTransform[3] -= iCellX * poDS->adfGeoTransform[4] + iCellY * poDS->adfGeoTransform[5]; } }}} ",defect,closed,normal,,default,svn-trunk,normal,duplicate,,