Opened 15 years ago

Closed 14 years ago

Last modified 11 years ago

#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 );

Change History (4)

comment:1 by Even Rouault, 15 years ago

The test can safely be removed as it is only used for metadata reporting. I let it to Frank to decide as he's the author of the driver.

But I'm curious : is it just a rhetorical remark or did you happen to have ASRP products where PSP != 100 ? I've never seen that in French production and from the standard (http://www.dgiwg.org/digest/documents/asrp_1_2.pdf) : "§3.2.1 : ASRP data consists of colour-coded images with 100 microns (254 lines per inch) sample size", so I guess this implies PSP = 100

in reply to:  1 comment:2 by gewang, 15 years ago

But I'm curious : is it just a rhetorical remark or did you happen to have ASRP products where PSP != 100 ? I've never seen that in French production and from the standard (http://www.dgiwg.org/digest/documents/asrp_1_2.pdf) : "§3.2.1 : ASRP data consists of colour-coded images with 100 microns (254 lines per inch) sample size", so I guess this implies PSP = 100

Yes, I happen to have ASRP products that PSP != 100. 100 micron is the most common case. However, other values are permitted.

In section 3.1.1 of the standard, it is stated that "The total format of a graphic including margin, border, and legend areas are normally scanned at a resolution of 100 microns or less".

The PSP range of {000.0, 100.0} came from page A-9 of the standard.

comment:3 by Even Rouault, 14 years ago

Cc: Alan.Stratford@… added
Keywords: ADRG added
Milestone: 1.7.01.6.4
Resolution: fixed
Status: newclosed
Summary: SRP shall support sampling interval other than 100 micronsSRP & ADRG shall support sampling interval other than 100 microns
Type: enhancementdefect

r18302 (trunk) : Remove unjustified test for PSP == 100 in ADRG and SRP drivers

r18303 (branches/1.6) : Remove unjustified test for PSP == 100 in ADRG driver

comment:4 by Even Rouault, 11 years ago

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.