id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 3725,[raster] ST_Clip with multiple band raster throws exception when geometry only touches,yosukesabai,Bborie Park,"I realized that ST_Clip(raster, geometry) gives following error message under particular condition: ERROR: RASTER_clip: Could not get band from working raster CONTEXT: PL/pgSQL function st_clip(raster,integer[],geometry,double precision[],boolean) line 8 at RETURN This happens, I think, when (1) raster has multi-band and (2) raster and geometry (polygon) touches with no shared interior. Below is example sql command for demo. My version version()\\ PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.9.1, 64-bit postgis_full_version()\\ POSTGIS=""2.3.1 r15264"" GEOS=""3.6.0-CAPI-1.10.0 r0"" PROJ=""Rel. 4.9.3, 15 August 2016"" GDAL=""GDAL 2.1 .2, released 2016/10/24"" LIBXML=""2.9.4"" LIBJSON=""0.12.1"" RASTER {{{ -- This fails SELECT ST_Summary( ST_Clip( ST_AddBand( ST_MakeEmptyRaster(16, 16, 0, 0, 1, 1, 0, 0), ARRAY[ ROW(1, '8BUI'::text, 0, 255), ROW(2, '8BUI'::text, 0, 255), ROW(3, '8BUI'::text, 0, 255) ]::addbandarg[] ), ST_GeomFromText('POLYGON((16 0, 16 1, 17 1, 17 0, 16 0))') ) ); }}} ",defect,closed,medium,PostGIS 3.0.0,raster,2.3.x,wontfix,,