Opened 3 years ago

Last modified 4 days ago

#2924 new defect

[raster] bogus handling of identity matrix by _st_gdalwarp

Reported by: strk Owned by: dustymugs
Priority: medium Milestone: PostGIS Fund Me
Component: raster Version: 2.1.x
Keywords: Cc:

Description

As reported in #2911, rotating a raster with scale 1/-1 and offset 0/0 results in wrong output.

Testcase:

select x, y, m.width, m.height, m.skewx, m.skewy
from generate_series(-1, 1) x, generate_series(-1, 1) y, ST_AddBand(ST_MakeEmptyRaster(10, 10, x, y, 1, -1, 0, 0, 0),
  1, '8BUI', 0, 0) r, st_metadata(st_gdalwarp(r,'NearestNeighbor', 
0.125,NULL,NULL,NULL,NULL,NULL,1,1)) m;
 x  | y  | width | height | skewx | skewy 
----+----+-------+--------+-------+-------
 -1 | -1 |    10 |     15 |     1 |     1
  0 | -1 |    10 |     15 |     1 |     1
  1 | -1 |    10 |     15 |     1 |     1
 -1 |  0 |    10 |     15 |     1 |     1
  0 |  0 |     1 |     12 |     1 |     1
  1 |  0 |    10 |     15 |     1 |     1
 -1 |  1 |    10 |     15 |     1 |     1
  0 |  1 |    10 |     15 |     1 |     1
  1 |  1 |    10 |     15 |     1 |     1
(9 rows)

Notice how width/height are different from the others...

Change History (6)

comment:1 Changed 3 years ago by robe

Milestone: PostGIS 2.1.4PostGIS 2.1.5

comment:2 Changed 3 years ago by pramsey

Milestone: PostGIS 2.1.5PostGIS 2.1.6

comment:3 Changed 2 years ago by pramsey

Milestone: PostGIS 2.1.6PostGIS 2.1.7

comment:4 Changed 2 years ago by robe

Milestone: PostGIS 2.1.7PostGIS 2.1.8

comment:5 Changed 2 years ago by dustymugs

Milestone: PostGIS 2.1.8PostGIS Future

comment:6 Changed 4 days ago by robe

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.