Opened 15 years ago

Closed 15 years ago

#2634 closed defect (fixed)

gdal_sieve not weeding out all polygons

Reported by: ysiddiqui Owned by: warmerdam
Priority: normal Milestone: 1.6.0
Component: Utilities Version: svn-trunk
Severity: normal Keywords: sieve
Cc:

Description

Using gdal_sieve.py dated 10/9/2008 produces an unexpected result when trying to weed out small polygons from a salt-and-pepper image of 0s and 1s. Many polygons got removed, but others only got partially removed, and they were much smaller than the threshhold size. The command used was as follows:

python C:\apps\OSGEO4W\apps\gdal-dev\bin\gdal_sieve.py -st 1120 -8 
   sieve_input.tif -of GTiff sieve_output.tif

The same results occur if the output file is not specified and the results overwrite the input data.

Inputs and outputs are attached.

Attachments (2)

sieve_input.zip (85.7 KB ) - added by ysiddiqui 15 years ago.
Input to sieve program
sieve_output.zip (20.6 KB ) - added by ysiddiqui 15 years ago.
Output from sieve program

Download all attachments as: .zip

Change History (4)

by ysiddiqui, 15 years ago

Attachment: sieve_input.zip added

Input to sieve program

by ysiddiqui, 15 years ago

Attachment: sieve_output.zip added

Output from sieve program

comment:1 by warmerdam, 15 years ago

Component: defaultUtilities
Keywords: sieve added
Milestone: 1.6.0
Status: newassigned
Version: 1.5.2svn-trunk

Yusuf,

I have confirmed this. There are situations in which polygons are not filtered out because it is not possible to identify a reasonable neighbour to merge them into but this does not appear to be the issue with this file. So there is some additional bug in play.

comment:2 by warmerdam, 15 years ago

Resolution: fixed
Status: assignedclosed

Corrected in trunk (r15653) and I have added some modest sievefilter testings in the autotest suite (r15652).

Note: See TracTickets for help on using tickets.