[postgis-devel] [PostGIS] #1043: ST_ValueCount proto returns integer instead of bigint

PostGIS trac at osgeo.org
Tue Jun 21 07:11:51 PDT 2011


#1043: ST_ValueCount proto returns integer instead of bigint
----------------------------+-----------------------------------------------
 Reporter:  robe            |       Owner:  pracine      
     Type:  defect          |      Status:  new          
 Priority:  low             |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by dustymugs):

 I just took a look at all the ST_ValueCount functions and they are all
 correctly defined.  I also took a look at the draft docs and it looks like
 the base ST_ValueCount functions with the "searchvalue" parameter are
 incorrectly listed as returning bigint.  They all return integer.

 ''bigint ST_ValueCount(raster rast, double precision searchvalue, double
 precision roundto=0);''

 ''bigint ST_ValueCount(raster rast, integer nband, boolean
 exclude_nodata_value, double precision searchvalue, double precision
 roundto=0);''

 ''bigint ST_ValueCount(raster rast, integer nband, double precision
 searchvalue, double precision roundto=0);''

 All three of the protos above return integer instead of bigint.  The
 following example query is of the second proto above and returns an
 integer.

 {{{
 SELECT * FROM ST_ValueCount(
         ST_SetValue(
                 ST_SetValue(
                         ST_SetValue(
                                 ST_AddBand(
                                         ST_MakeEmptyRaster(10, 10, 10, 10,
 2, 2, 0, 0,-1)
                                         , 1, '64BF', 0, 0
                                 )
                                 , 1, 1, 1, -10
                         )
                         , 1, 5, 4, 0
                 )
                 , 1, 5, 5, 3.14159
         )
 , 1, TRUE, -10, 0);
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1043#comment:4>
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