[GRASS-dev] Re: [GRASS GIS] #1279: i.pca metadata truncated
GRASS GIS
trac at osgeo.org
Tue Feb 15 07:04:46 EST 2011
#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 |
-----------------------------------+----------------------------------------
Comment(by hamish):
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.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1279#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list