Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-362

RS_BandAsArray truncates the decimal part of float/double pixel values.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.1
    • 1.5.0

    Description

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

      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]|
      +-------------------------+--------------------+
      

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kontinuation Kristin Cowalcijk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m