Opened 7 years ago

Closed 7 years ago

#2560 closed defect (fixed)

gdal_proximity fails if output band is Byte

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


The gdal_proximity algorithm fails to produce the right results if the output proximity file has a Byte data type (or likely any unsigned type) for the output band. In particular, the second pass from bottom to top seems to have no effect and proximity to things below is lost (or always set to zero?). small.tif out.tif -ot Byte

Note that the out.tif is all zeros but it should have increasing proximities from the middle up as the bottom of the source image is non-zero.

Attachments (1)

small.tif (1.6 KB) - added by warmerdam 7 years ago.
input file with data in bottom half.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by warmerdam

input file with data in bottom half.

comment:1 Changed 7 years ago by warmerdam

  • Status changed from new to assigned

comment:2 Changed 7 years ago by warmerdam

  • Resolution set to fixed
  • Status changed from assigned to closed

The algorithm has been modified to create a temporary file for the working proximity information if the output proximity data type is unsigned (r15576).

Note: See TracTickets for help on using tickets.