Ticket #3193 (closed defect: fixed)
SRP & ADRG shall support sampling interval other than 100 microns
| Reported by: | gewang | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | GDAL_Raster | Version: | svn-trunk |
| Severity: | normal | Keywords: | SRP ADRG |
| Cc: | Alan.Stratford@… |
Description
Thanks for providing SRP support in GDAL.
According to the ASRP Edition 1.2 specification, General Infromation File - General Information Record - GEN Field - PSP Subfiled contains a floating point value between 000.0 and 100.0 that specifies the sample (pixel) spacing at which the data was originally captured (in microns). Current srpdataset.cpp only handles the PSP == 100 case. The following simple patch helped me to work around the limitation. However I am not sure about its implications regarding transformations etc. Experts' opinions are appreciated.
*** old Mon Oct 19 08:59:49 2009 --- new Mon Oct 19 09:00:16 2009 *************** *** 478,484 ****
double PSP = record->GetFloatSubfield?( "GEN", 0, "PSP", 0, &bSuccess ); CPLDebug("SRP", "PSP=%f", PSP);
! if (PSP != 100)
return FALSE;
ARV = record->GetIntSubfield?( "GEN", 0, "ARV", 0, &bSuccess );
--- 478,484 ----
double PSP = record->GetFloatSubfield?( "GEN", 0, "PSP", 0, &bSuccess ); CPLDebug("SRP", "PSP=%f", PSP);
! if (PSP > 100)
return FALSE;
ARV = record->GetIntSubfield?( "GEN", 0, "ARV", 0, &bSuccess );
