[postgis-devel] [PostGIS] #985: [raster] ST_Count

PostGIS trac at osgeo.org
Fri May 27 14:06:04 PDT 2011


#985: [raster] ST_Count
-----------------------------+----------------------------------------------
  Reporter:  dustymugs       |       Owner:  dustymugs    
      Type:  task            |      Status:  reopened     
  Priority:  medium          |   Milestone:  PostGIS 2.0.0
 Component:  postgis raster  |     Version:  trunk        
Resolution:                  |    Keywords:  history      
-----------------------------+----------------------------------------------

Comment(by dustymugs):

 Yes, all the functions you mentioned could be changed.

 case 1) SELECT ST_ValueCount(ST_SetBandNodataValue(rast, NULL))

 The above is NOT as fast as

 case 2) SELECT ST_ValueCount(rast, FALSE, ...)

 This isn't as significant for small rasters (100 x 100) versus large
 rasters (10000 x 10000) due to the time required for:

 1. For ST_SetBandNodataValue, deserialize raster

 2. set hasnodata flag

 3. serialize raster

 4. For ST_ValueCount, deserialize raster

 5. process pixels

 6. return counts

 For case 2, on steps 4, 5 and 6 would occur vs steps 1 through 6 for the
 two step.  So, maybe we should keep the "hasnodata" and just give it a
 better name?

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