Opened 13 years ago

Closed 13 years ago

#1298 closed task (fixed)

[raster] ST_MinPossibleValue

Reported by: Bborie Park Owned by: Bborie Park
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: history Cc:

Description

A helper function that provides the smallest value possible for a pixeltype. By the looks of it, this would mostly be used to build plpgsql functions.

ST_MinPixelValue(pixtype text) -> integer
ST_MinPixelValue(rast raster, band integer) -> integer

Change History (5)

comment:1 by pracine, 13 years ago

Isn't there a PostgreSQL function retuning the min and max for a type?

A more sophisticated variant would return a value that is NOT the nodata value of the raster. The underlying code could be used to fix #1139

comment:2 by Bborie Park, 13 years ago

I don't think there are PostgreSQL functions for a type's min and max. We do have our own C function that provides the minimum possible, which I was planning on exposing to the SQL level.

comment:3 by Bborie Park, 13 years ago

Milestone: PostGIS Raster FuturePostGIS 2.0.0
Priority: lowblocker

Evidently Pierre added a pure plpgsql version to rtpostgis.sql.in.c that is NOT ideal. Will need to expose the existing C API function rt_pixtype_size before 2.0.

comment:4 by Bborie Park, 13 years ago

Status: newassigned
Summary: [raster] ST_MinPixelValue[raster] ST_MinPossibleValue

comment:5 by Bborie Park, 13 years ago

Keywords: history added
Resolution: fixed
Status: assignedclosed

Added in r8436

Note: See TracTickets for help on using tickets.