Opened 10 years ago

Last modified 7 years ago

#2924 new defect

[raster] bogus handling of identity matrix by _st_gdalwarp

Reported by: strk Owned by: Bborie Park
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 by robe, 10 years ago

Milestone: PostGIS 2.1.4PostGIS 2.1.5

comment:2 by pramsey, 9 years ago

Milestone: PostGIS 2.1.5PostGIS 2.1.6

comment:3 by pramsey, 9 years ago

Milestone: PostGIS 2.1.6PostGIS 2.1.7

comment:4 by robe, 9 years ago

Milestone: PostGIS 2.1.7PostGIS 2.1.8

comment:5 by Bborie Park, 9 years ago

Milestone: PostGIS 2.1.8PostGIS Future

comment:6 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.