i.segment: allow more than 2147483647 cells
|Reported by:||mlennert||Owned by:|
|Keywords:||i.segment variable type||Cc:|
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".
- Shouldn't this be unsigned ?
- Maybe a long long would be safer, seeing that pixel numbers don't stop increasing.
Change History (13)
follow-up: 3 comment:2 by , 6 years ago
|Milestone:||7.0.5 → 7.2.0|
|Summary:||i.segment: notnullcells defined as long too limited → i.segment: allow more than 2147483647 cells|
|Type:||defect → enhancement|