This discussion is archived
6 Replies Latest reply: May 2, 2012 1:05 AM by 923513 RSS

Problem with SDO_GEOR.generateStatistics() on GeoRaster

923513 Newbie
Currently Being Moderated
Hi forum, I've been using GeoRaster for a while and I'm stuck trying to obtain statistics from my rasters. Here is what I have right now:
DECLARE
  gr SDO_GEORASTER;
  ret VARCHAR2(256);
  window MDSYS.SDO_NUMBER_ARRAY;
BEGIN
  SELECT CAST(SDO_GEOR.generateSpatialExtent(rast,null).sdo_ordinates as MDSYS.SDO_NUMBER_ARRAY) as window
    INTO window 
    FROM winds
   WHERE georid=3;
  SELECT rast 
    INTO gr 
    FROM winds
   WHERE georid=3 FOR UPDATE;
  ret := SDO_GEOR.generateStatistics(gr, 'samplingFactor=1', window, 'TRUE', '0-1', 'FALSE',null,'true');
  UPDATE winds
     SET rast=gr 
  WHERE georid=3;
  COMMIT;
END;
The function finishes without any errors, but when I try to access the statistics like this:
SELECT sdo_geor.getStatistics(rast, 0) FROM winds;
I just got a "null" result.

Some info about my raster:
-It has 1 band.
-SRID = 23030
-NODATA value = -99999

Any help would be very welcome. Thanks!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points