[postgis-devel] [WKTRaster] RT_Value function added

Mateusz Loskot Mateusz.Loskot at cadcorp.com
Tue Mar 3 07:49:52 PST 2009


Folks,

I added simple implementation of RT_Value function:

CREATEFUNCTION rt_value(raster, integer, integer, integer)
	RETURNS float8
	AS 'MODULE_PATHNAME','RASTER_getPixelValue'
	LANGUAGE 'C' _IMMUTABLE_STRICT; 

Documented here:

http://www.cef-cfr.ca/index.php?n=Membres.PierreRacineWKTRasterSpecifications

As I have no idea if I can overload functions in C extensions for SQL,
I decided to use FLOAT8 as return type. FLAOT8 seems to be provide enough capacity
and precision for all pixel types supported by WKTRaster.
However, an idea of use of NUMERIC is dangling in my brain.
Would it make sense to use NUMERIC instead of FLOAT8?

Best regards,
-- 
Mateusz Loskot
Senior Programmer, Cadcorp
http://www.cadcorp.com




More information about the postgis-devel mailing list