Opened 14 years ago
Closed 14 years ago
#3252 closed defect (fixed)
Reading additional metadata, SkipFactor and IgnoredValues
Reported by: | gaopeng | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | HFA |
Cc: |
Description
Attached IMG image contains metadata SkipFactorX, SkipFactorY, and IgnoredValues. Could these metadata can be read and converted to metadata item as named.
Attachments (2)
Change History (9)
by , 14 years ago
comment:1 by , 14 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | HFA added |
Status: | new → assigned |
comment:2 by , 14 years ago
comment:4 by , 14 years ago
Milestone: | → 1.7.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I have added support for reading the skipx,skipy and excludedvalues items as metadata STATISTICS_SKIPFACTORX, STATISTICS_SKIPFACTORY and STATISTICS_EXCLUDEDVALUE.
Note that unlike some of the histogram related metadata, these values are not written to new datasets if present in the source dataset of a CopyCreate().
Changes are in trunk (r18114) and 1.6-esri branch (r18115). There is also a limited test in the test suite now (r18113).
comment:5 by , 14 years ago
The STATISTICS_EXCLUDEDVALUE can contain multiple values, e.g. 0,1. Can it be renamed to STATISTICS_EXCLUDEDVALUES?
comment:6 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Gao,
Yes, but the current implementation will only capture one value. Could you provide a sample data file with more than one exclude value?
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I have renamed the metadata item to STATISTICS_EXCLUDEDVALUES, added support for multiple values and also corrected so the values are fetched as double rather than integers. The dem10.img file now reports:
STATISTICS_SKIPFACTORX=1 STATISTICS_SKIPFACTORY=1 STATISTICS_EXCLUDEDVALUES=0,8,9
The changes are in trunk with a test (r18157), and in 1.6-esri without a test (r18158).
Gao,
This image has these values in both the HistogramParameters and StatisticsParameters nodes. Which did you want exposed?