Kristin Cowalcijk created SEDONA-362:
----------------------------------------

             Summary: RS_BandAsArray truncates the decimal part of float/double 
pixel values.
                 Key: SEDONA-362
                 URL: https://issues.apache.org/jira/browse/SEDONA-362
             Project: Apache Sedona
          Issue Type: Bug
    Affects Versions: 1.4.1
            Reporter: Kristin Cowalcijk
             Fix For: 1.5.0


When retrieving array from float/double bands using {{RS_BandAsArray}}, the 
band data were truncated. Here is an example:

{code:sql}
WITH t AS (SELECT RS_AddBandFromArray(RS_MakeEmptyRaster(1, 2, 2, 0, 0, 1), 
ARRAY(1.1, 2.2, 3.3, 4.4), 1) rast)
SELECT RS_BandPixelType(rast, 1), RS_BandAsArray(rast, 1) as band FROM t
+-------------------------+--------------------+
|rs_bandpixeltype(rast, 1)|                band|
+-------------------------+--------------------+
|              REAL_64BITS|[1.0, 2.0, 3.0, 4.0]|
+-------------------------+--------------------+
{code}

While the expected result is {{[1.1, 2.2, 3.3, 4.4]}}.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to