Opened 13 years ago

Closed 13 years ago

#1546 closed defect (fixed)

[raster] ST_AddBand() does not clamp the nodata value

Reported by: pracine Owned by: pracine
Priority: low Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description

If I do:

SELECT ST_BandNodataValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, 200));

the nodata value is set to -56. It should be clamped to 127 instead.

Change History (4)

comment:1 by pracine, 13 years ago

Summary: [raster] ST_SetBandNodataValue() does not clamp value[raster] ST_AddBand() does not clamp the nodata value

comment:2 by pracine, 13 years ago

ST_SetBandNodataValue() does it properly...

SELECT ST_BandNodataValue(ST_SetBandNodataValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, 2), 200));

comment:3 by Bborie Park, 13 years ago

Problem lies in rt_band_new_inline. Same problem in rt_band_new_offline. Fixing now.

comment:4 by Bborie Park, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in r9055.

Note: See TracTickets for help on using tickets.