[postgis-devel] [PostGIS] #593: [raster] Add a ST_BandIsNoData function
PostGIS
trac at osgeo.org
Wed Jan 26 04:58:48 PST 2011
#593: [raster] Add a ST_BandIsNoData function
-----------------------------+----------------------------------------------
Reporter: pracine | Owner: jorgearevalo
Type: task | Status: closed
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: trunk
Resolution: fixed | Keywords:
-----------------------------+----------------------------------------------
Comment(by pracine):
Actually, tell me if I'm wrong, your change in raster2pgsql.py do not
change anything in the database. To actually change the raster permanently
you must do an UPDATE.
And still it is not wise to load the raster and then UPDATE it.
raster2pgsql.py should check the pixel values while loading them and set
the flag properly BEFORE writing the INSERT statement. (I don't know if
this is possible right now because the flag has to be set so early).
Doing a full check of one table to reset the flag if needed is also
problematic since ST_BandIsNoData just return TRUE or FALSE, not the
updated raster with the flag correctly set. I guess we will need a
ST_SetBandIsNoData returning a raster so we can do:
UPDATE rastertable SET rast = ST_SetBandIsNodata(rast, 2) WHERE
ST_BandIsNodata(rast, 2) != ST_BandIsNodata(rast, 2, TRUE);
to update a complete table. (Any better way?)
Anyway this ST_BandIsNoData is not a big optimization and should be low
priority in comparison with the the other things needed for MapAlgebra. I
would maybe just deactivate it until we have all the functions to synch it
better with all the other edit functions. Sorry if this wasn't clear
enough.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/593#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