Opened 7 years ago

Closed 7 years ago

#1875 closed defect (fixed)

[raster] ST_SummaryStats should return null stats on nodata rasters

Reported by: pracine Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.0.1
Component: raster Version: 2.0.x
Keywords: history Cc:

Description

SELECT ST_SummaryStats(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 0, 0, 4326), '16BSI'::text, 0, 0));

returns:

"(0,0,0,-1,0,0)"

If zero pixel were taken into account in the stats, then there should be no results for the other metrics. If I fetch only the min, the max, or the average, how do I know there are actually not significant? It should return:

"(0,null,null,null,null,null)"

Change History (7)

comment:1 Changed 7 years ago by Bborie Park

Owner: changed from pracine to Bborie Park
Status: newassigned

robe, can I make this change to 2.0? Or only in trunk (2.1)?

comment:2 Changed 7 years ago by robe

hmm -- your and Pierre's call I would say. Technically I guess you could say its a change in behavior but then if you say the behavior was a bug in the first place, then its a bug fix and can go in 2.0.1 as long its not an invasive change that risks breaking something else.

comment:3 Changed 7 years ago by Bborie Park

Bug it is!

comment:4 Changed 7 years ago by Bborie Park

Fixed in r9931. Still need to commit changes for trunk.

comment:5 Changed 7 years ago by Bborie Park

Keywords: history added
Milestone: PostGIS 2.0.2PostGIS 2.0.1

comment:6 Changed 7 years ago by Bborie Park

Fixed in r9943 for trunk.

comment:7 Changed 7 years ago by Bborie Park

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.