[postgis-devel] [PostGIS] #1536: [raster] There should be an option for setting the nodata value in certain variants of ST_Intersection(raster, raster) (was: [raster] There should be an option for certain variants of ST_Intersection(raster, raster))
PostGIS
trac at osgeo.org
Tue Feb 7 06:58:48 PST 2012
#1536: [raster] There should be an option for setting the nodata value in certain
variants of ST_Intersection(raster, raster)
---------------------+------------------------------------------------------
Reporter: pracine | Owner: pracine
Type: defect | Status: new
Priority: low | Milestone: PostGIS 2.0.0
Component: raster | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
Comment(by pracine):
Also: At first I was thinking that those nodata value parameters should be
used only when the requested band do not have a nodata value defined but I
think this will become confusing.
I think in the absence of such an argument, if the raster do not have a
nodata value defined the ST_MinPossibleValue() should be used.
If the argument is provided and the provided raster DO have a nodata value
defined then the provided value should replace the nodata value of the
raster (actually it does not replace it as we have to produce a new raster
anyway).
You can achieve this by passing the provided nodata value as the alternate
expressions. Here is an example I use in ST_Tile():
ST_SetBandNodataValue(ST_MapAlgebraExpr(rast, 1, geomrast, 1, 'RAST1',
newpixtype, 'SECOND', newnodata::text, newnodata::text, newnodata),
newnodata);
As I said previously it is the responsability of the caller of
ST_MapAlgebraExpr() to determine and set the new nodata value and the new
pixel type.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1536#comment:18>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list