#3872 closed defect (fixed)
Sieve fails on polygon larger than 2gigapixels
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Algorithms | Version: | 1.6.3 |
Severity: | normal | Keywords: | sieve |
Cc: | ysiddiqui |
Description
An effort to run gdal_sieve.py on a raster with 3.8 gigapixels consisting of one two very large polygons (a mask and areas outside the mask) resulted in all zeros in the output.
The problem turns out to be use of a 32bit integer for accumulating polygon sizes. This presumably went negative when it exceeded 2gigapixels for the mask polygon and that got remapped to the background value.
Note:
See TracTickets
for help on using tickets.
I have adjusted the code to limit the polygon size to MAX_INT. It is implausible to imagine a sieve size this large, and there is no real need for accuracy once it goes over the seive size.
Fixed in trunk (r21213), 1.7 (r21214) and 1.6 (r21215).