[GRASS-dev] [GRASS GIS] #3084: i.segment: notnullcells defined as long too limited
GRASS GIS
trac at osgeo.org
Tue Jun 28 01:20:25 PDT 2016
#3084: i.segment: notnullcells defined as long too limited
-------------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Imagery | Version: unspecified
Keywords: i.segment variable type | CPU: Unspecified
Platform: Unspecified |
-------------------------------------+-------------------------
In iseg.h, notnullcells is defined as long. On Windows this has a range of
–2147483648 through 2147483647.
We are working on a region that has over 7 billion pixels and so the
nonnullcells variable overflows, becomes negative and i.segment fails with
"insufficient number of non-null cells".
Two reflections:
* Shouldn't this be unsigned ?
* Maybe a long long would be safer, seeing that pixel numbers don't stop
increasing.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3084>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list