GeoServer

Rotated images are not displayed correctly anymore (regression)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.2
  • Fix Version/s: 1.6.3, 1.7.0-beta1
  • Component/s: WMS
  • Labels:
    None
  • Number of attachments :
    1

Description

Both on trunk and on 1.6.x the attached image does not display correctly after a couple of zoom (starts displaying rotated 90°, as expected,and then jumps back forgetting the rotation after a couple of zooms

Issue Links

Activity

Hide
Andrea Aime added a comment -

I assume this is a side effect of fixing GEOT-1747, thought I have no proof of that.

Show
Andrea Aime added a comment - I assume this is a side effect of fixing GEOT-1747, thought I have no proof of that.
Hide
Andrea Aime added a comment -

Debugged the code a little bit. The problem occorrs at the cropping level, that is, the original coverage has the right grid geometry with rotation parameters included:

GridGeometry2D[GeneralGridRange[0..482, 0..634], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", -0.000005270943], 
  PARAMETER["elt_0_1", 0.112851313689], 
  PARAMETER["elt_0_2", 1402796.794050454], 
  PARAMETER["elt_1_0", 0.112851313599], 
  PARAMETER["elt_1_1", 0.000005270973], 
  PARAMETER["elt_1_2", 5000064.879096299]]]

The grid coverage getting out of crop instead has not:

GridGeometry2D[GeneralGridRange[48..401, 138..633], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 0.15835311940789393], 
  PARAMETER["elt_0_2", 1402804.7950626754], 
  PARAMETER["elt_1_1", -0.08046017968744942], 
  PARAMETER["elt_1_2", 5000121.1819685]]]

I did not see any significant change in how the crop operation has been called, so it might be a problem with the crop operation itself?

Show
Andrea Aime added a comment - Debugged the code a little bit. The problem occorrs at the cropping level, that is, the original coverage has the right grid geometry with rotation parameters included:
GridGeometry2D[GeneralGridRange[0..482, 0..634], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", -0.000005270943], 
  PARAMETER["elt_0_1", 0.112851313689], 
  PARAMETER["elt_0_2", 1402796.794050454], 
  PARAMETER["elt_1_0", 0.112851313599], 
  PARAMETER["elt_1_1", 0.000005270973], 
  PARAMETER["elt_1_2", 5000064.879096299]]]
The grid coverage getting out of crop instead has not:
GridGeometry2D[GeneralGridRange[48..401, 138..633], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 0.15835311940789393], 
  PARAMETER["elt_0_2", 1402804.7950626754], 
  PARAMETER["elt_1_1", -0.08046017968744942], 
  PARAMETER["elt_1_2", 5000121.1819685]]]
I did not see any significant change in how the crop operation has been called, so it might be a problem with the crop operation itself?
Hide
Andrea Aime added a comment -

Nah, forget about this. I just reverted the patch Daniele included for GEOT-1747 and now it renders ok so there may be some difference in how the crop is being called. Investigating further.

Show
Andrea Aime added a comment - Nah, forget about this. I just reverted the patch Daniele included for GEOT-1747 and now it renders ok so there may be some difference in how the crop is being called. Investigating further.
Hide
Andrea Aime added a comment -

Ok, I've found out what's going on. In the old code the cropping was not called at all if the grid coverage GridToCRS transformation was not the "scale/translate" type. This is needed because evidently the crop operation is not able to crop rotated coverages.
Doing the same in the new coverage renderer makes the grid coverage appear just fine. Thought the real fix would be to make Crop rotation aware...

Show
Andrea Aime added a comment - Ok, I've found out what's going on. In the old code the cropping was not called at all if the grid coverage GridToCRS transformation was not the "scale/translate" type. This is needed because evidently the crop operation is not able to crop rotated coverages. Doing the same in the new coverage renderer makes the grid coverage appear just fine. Thought the real fix would be to make Crop rotation aware...
Hide
Andrea Aime added a comment -

Fixed in geotools, thought the fix is more reinstating an old workaround, the real fix would be to fix the Crop operation in GeoTools

Show
Andrea Aime added a comment - Fixed in geotools, thought the fix is more reinstating an old workaround, the real fix would be to fix the Crop operation in GeoTools

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: