Ticket #3383 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Some CADRG crossing 180 have wrong extent.

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 1.7.1
Component: GDAL_Raster Version: 1.6.1
Severity: normal Keywords: NITF CADRG
Cc:

Description

Some CADRG crossing 180 have wrong extent. Here are the good and bad extents for attached image:

GDAL:         174.375, 41.538, 517.5, 51.923
It should be: 174.375, 41.538, 191.25, 51.923

Attachments

0000M033.GN3 Download (143.4 KB) - added by gaopeng 3 years ago.
nitf_fix3383.patch Download (1.9 KB) - added by rouault 3 years ago.

Change History

Changed 3 years ago by gaopeng

Changed 3 years ago by rouault

Frank,

I also got into this issue some time ago with other similar CADRG products. I had done a broader fix in the past, but I had to make more narrow due to #2135. The proposed patch basically comes back to my original fix, but restrict it only to CADRG products. So hopefully it shouldn't cause regressions in other NITF profiles that can have non north-up images, and not to CADRG products themselves as, to the best of my knowledge, they have not fancy orientations.

Changed 3 years ago by rouault

Changed 3 years ago by warmerdam

  • keywords NITF CADRG added
  • status changed from new to assigned
  • milestone changed from 1.6.4 to 1.7.1

With 1.6-esri, 1.7 and trunk I was seeing this for the geotransform:

Origin = (174.375000000000000,51.923076923076927)
Pixel Size = (-0.223388671875000,-0.006760817307692)
Corner Coordinates:
Upper Left  ( 174.3750000,  51.9230769) (174d22'30.00"E, 51d55'23.08"N)
Lower Left  ( 174.3750000,  41.5384615) (174d22'30.00"E, 41d32'18.46"N)
Upper Right (-168.7500000,  51.9230769) (168d45'0.00"W, 51d55'23.08"N)
Lower Right (-168.7500000,  41.5384615) (168d45'0.00"W, 41d32'18.46"N)

Which does not give the right side bound of 517.5 reported above. I'm not sure how you got that. But this is also wrong, with a negative x pixel size due to the dateline confusion. Even's patch seems to do the reasonable thing and I have applied it in trunk (r18740), 1.7 (r18741) and 1.6-esri (r18742).

The trunk change also includes an autotest with this file.

Gao, could you confirm that this commit fixes things for you, and close the ticket?

Changed 3 years ago by gaopeng

  • status changed from assigned to closed
  • resolution set to fixed

Yes. It fixed my problems.

Note: See TracTickets for help on using tickets.