#1279: i.pca metadata truncated
-----------------------------------+----------------------------------------
Reporter: Barney2011 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Default | Version: 6.4.0
Keywords: i.pca metadata r.info | Platform: Linux
Cpu: x86-64 |
-----------------------------------+----------------------------------------
Due to character limits the full metadata of the i.pca module is not
recorded to the resulting raster files.
Here is the command (as created through the gui in GRASS7.0)
i.pca
input=1_jan_4789.1@PERMANENT,1_jan_4789.10@PERMANENT,1_jan_4789.11@PERMANENT,\
1_jan_4789.12@PERMANENT,1_jan_4789.13@PERMANENT,1_jan_4789.14@PERMANENT,\
1_jan_4789.2@PERMANENT,1_jan_4789.3@PERMANENT,1_jan_4789.4@PERMANENT
output=Jan_Pca_test
Metadata file attached.
I'm actually using the pca module for airborne spectral data (14 bands
from the CASI2 sensor).
}}}
so it is getting chopped at char 80.
by my calculations 14 bands would need ~140 characters.
maps written by grass 7's i.pca should be ok as they don't have the 80x40
limit. although instead of allocating 256 chars for i.pca/support.c's
tmpeigen we might allocate (bands * 8) + 30 instead. (or perhaps just
1024 and push the problem away a few years)
as for a fix in GRASS 6, I think we need to insert a "\n" then 15 spaces
after each 6th band is
printed (if there's more to come). so it would look like:
{{{
PC14 67.08 ( 0.0188, 0.0040,-0.0002, 0.0096, 0.0023,-0.0056,
0.0126,-0.0173,-0.0002, 0.0096, 0.0023,-0.0056,
0.0126,-0.0173 ) [ 88.07% ]
}}}
but in the case of 14 bands it would then make the history file 50 lines
long, and so more than the max 40 lines long, at which the command history
would be truncated.