[postgis-devel] [wktraster] Core tests failure for r5841
strk
strk at keybit.net
Thu Jan 13 05:47:32 PST 2011
On Thu, Jan 13, 2011 at 01:33:02PM +0000, Mateusz Loskot wrote:
> Once the truncation rules are defined for integral types, it should be
> not a problem to implement them. For instance, what choices we have to
> cope with -32769 value for 16BSI?
> - cast to int16_t and document result as undefined
> - truncate towards Zero by storing SHRT_MIN (SHRT_MAX for positive)
> - wrap around
> - store NODATA value
> - ...
To keep things simple I'd always clamp any number < -32768 to -32768
and any number > 32767 to 32767.
Makes sense from a sampling point of view too after all..
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
More information about the postgis-devel
mailing list