Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.4K Intelligent Advisor
- 75 Insurance
- 537.7K On-Premises Infrastructure
- 138.7K Analytics Software
- 38.6K Application Development Software
- 6.1K Cloud Platform
- 109.6K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.3K Infrastructure Software
- 105.4K Integration
- 41.6K Security Software
GeoRaster NODATA question

I have a single (band) GeoRaster object in a table.
The raster is cookie cut by a polygon to produce statistics using SDO_GEOR.generateStatistics.
Some of the pixels in the raster have -Infinity values. When these are within the polygon generateStatistics fails to produce valid values like MIN. I tried to set the -infinity value as the NODATA value:
DECLARE
gr sdo_georaster;
BEGIN
SELECT raster INTO gr FROM carbon WHERE id=1 FOR UPDATE;
SDO_GEOR.addNODATA(gr, 0, sdo_range_array(sdo_range(-1*binary_double_infinity,0)));
UPDATE carbon SET raster=gr WHERE id=1;
COMMIT;
END;
/
But after doing so the following nodata query returns 0 and not -Infinity.
SELECT SDO_GEOR.getNODATA(raster, 0) NODATA FROM carbon WHERE id=1;
NODATA(LB, UB)
-------------------------------------------------
SDO_RANGE_ARRAY(SDO_RANGE(0, NULL))
The generateStatistics query looks like this:
SELECT rownum as measure,
t.column_value
FROM carbon a,
(select geom from property where id = 524) b,
SDO_GEOR.generateStatistics(
georaster => a.raster,
pyramidLevel => 0,
samplingFactor => 'samplingFactor=1',
samplingWindow => SDO_GEOM.SDO_INTERSECTION(b.geom,a.raster.spatialExtent,0.05),
bandNumbers => '0',
nodata => 'TRUE',
polygonClip => 'TRUE',
parallelParam => NULL
) t
Resulting in:
MEASURE Result Sequence
---------- ---------------
1 -Infinity
2 452.327681
3 -Infinity
4 -Infinity
5 -Infinity
(Doesn't produce all 7 rows for some reason.)
Can anyone help?
Best Answers
-
Currently GeoRaster doesn't support NODATA value as binary_double_infinity. Will it be possible to use an actual value as NODATA in the raster?
-
From your script above, it seems that all of your normal pixel values are above 0. If so, you can use the following script to change the -infinity value to another value <new value>:
declare
gr sdo_georaster;
begin
select raster into gr from carbon where id=1;
sdo_geor_ra.rasterUpdate(gr, 0, SDO_STRING2_ARRAY('{0}<0'), SDO_STRING2_ARRAYSET(SDO_STRING2_ARRAY('<new value>')));
commit;
end;
/
This script changes any cell value less than 0 on band 0 to a new value.
Answers
-
Currently GeoRaster doesn't support NODATA value as binary_double_infinity. Will it be possible to use an actual value as NODATA in the raster?
-
How can I recode the currently loaded GeoRaster with the -Infinite values?
-
From your script above, it seems that all of your normal pixel values are above 0. If so, you can use the following script to change the -infinity value to another value <new value>:
declare
gr sdo_georaster;
begin
select raster into gr from carbon where id=1;
sdo_geor_ra.rasterUpdate(gr, 0, SDO_STRING2_ARRAY('{0}<0'), SDO_STRING2_ARRAYSET(SDO_STRING2_ARRAY('<new value>')));
commit;
end;
/
This script changes any cell value less than 0 on band 0 to a new value.