[postgis-devel] [PostGIS] #1030: [raster] ST_SummaryStats on coverage crashes with the sample_percent parameter

PostGIS trac at osgeo.org
Fri Jun 17 07:46:16 PDT 2011


#1030: [raster] ST_SummaryStats on coverage crashes with the sample_percent
parameter
----------------------------+-----------------------------------------------
 Reporter:  pracine         |       Owner:  pracine      
     Type:  defect          |      Status:  new          
 Priority:  high            |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by dustymugs):

 Now this gets very strange.  It appears that PostgreSQL is passing your
 second example

 {{{
 SELECT *
 FROM st_summarystats('srtm_22_03_tiled_100x100', 'rast', FALSE, 1.0);
 }}}

 to the function

 ST_SummaryStats(rast raster, nband int DEFAULT 1, exclude_nodata_value
 boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1)

 I tested this by deleting all ST_SummaryStats functions and adding them
 back one at a time.  If you explicitly cast the first parameter of your
 example, you get the appropriate message "No function matches the given
 name and argument types. You might need to add explicit type casts.".

 {{{
 SELECT *
 FROM st_summarystats('srtm_22_03_tiled_100x100'::text, 'rast', FALSE,
 1.0);
 }}}

 It appears that PostgreSQL is interpreting 'srtm_22_03_tiled_100x100' as a
 raster type and 'rast' as an integer.  I don't know what I can do about
 the function parameter type conversion.

 http://www.postgresql.org/docs/8.4/static/typeconv-func.html

 Besides, no function exists for your second example.  Granted, we could
 modify one function declaration to add a parameter for the sample_percent.
 If we don't modify that one declaration though, it would be best to
 consider this ticket as a "won't fix".

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