Opened 16 months ago

Last modified 6 months ago

#5317 new defect

ST_Union(rast, uniontype) treat bands with different classes as the same as first band — at Initial Version

Reported by: shenzhuxi Owned by: pramsey
Priority: medium Milestone: PostGIS 3.5.0
Component: raster Version: 3.0.x
Keywords: Cc:

Description

POSTGIS="3.0.0 r17983" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " PROJ="6.3.1" GDAL="GDAL 3.0.4

Related to https://trac.osgeo.org/postgis/ticket/2200 ST_Union support multiple bands issue

If the $RASTER has multiple bands like ARRAY['8BUI', '16BUI'], the result of

            ST_Union(
              $RASTER,
              ARRAY[
                ROW(1, 'SUM'),
                ROW(2, 'MAX')
              ]::unionarg[]
            )

will be like ARRAY['8BUI', ' 8BUI'].

ST_Union always uses the first band class to process the 2nd band and ignore the original class.

The same problem also can be triggered with ST_Union(setof raster rast, 2, text uniontype), if the first band is different from the second one.

Change History (0)

Note: See TracTickets for help on using tickets.