Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#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.

Change History (2)

comment:1 by warmerdam, 13 years ago

Cc: ysiddiqui added
Resolution: fixed
Status: newclosed

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).

comment:2 by Even Rouault, 11 years ago

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.