Skip to content

Commit

Permalink
msResampleGDALToMap(): fix issue that cause line pattern in image mos…
Browse files Browse the repository at this point in the history
…aic (#1715)
  • Loading branch information
rouault committed Jan 17, 2017
1 parent 506c173 commit 026847b
Show file tree
Hide file tree
Showing 40 changed files with 989 additions and 977 deletions.
12 changes: 12 additions & 0 deletions mapresample.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,18 @@ int msResampleGDALToMap( mapObj *map, layerObj *layer, imageObj *image,
adfSrcGeoTransform[4] *= (sDummyMap.cellsize / dfNominalCellSize);
adfSrcGeoTransform[5] *= (sDummyMap.cellsize / dfNominalCellSize);

/* In the non-rotated case, make sure that the geotransform exactly */
/* matches the sSrcExtent, even if that generates non-square pixels (#1715) */
/* The rotated case should ideally be dealt with, but not for now... */
if( adfSrcGeoTransform[2] == 0 && adfSrcGeoTransform[4] == 0 &&
adfSrcGeoTransform[5] < 0 )
{
adfSrcGeoTransform[1] = (sSrcExtent.maxx - sSrcExtent.minx) *
dfNominalCellSize / nLoadImgXSize;
adfSrcGeoTransform[5] = -(sSrcExtent.maxy - sSrcExtent.miny) *
dfNominalCellSize / nLoadImgYSize;
}

papszAlteredProcessing = CSLDuplicate( layer->processing );
papszAlteredProcessing =
CSLSetNameValue( papszAlteredProcessing, "RAW_WINDOW",
Expand Down
Binary file modified msautotest/gdal/expected/average_rgb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/gdal/expected/average_rgb_plug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/gdal/expected/wmsclient_3543.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/misc/expected/runtime_sub_test012.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/misc/expected/runtime_sub_test013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/average_rgb.cairo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/average_rgb.pdf
Binary file not shown.
Binary file modified msautotest/renderers/expected/average_rgb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion msautotest/renderers/expected/average_rgb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/rgb_overlay_res.cairo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/rgb_overlay_res.pdf
Binary file not shown.
Binary file modified msautotest/renderers/expected/rgb_overlay_res.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion msautotest/renderers/expected/rgb_overlay_res.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/rgb_overlay_res_to8bit.cairo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/rgb_overlay_res_to8bit.pdf
Binary file not shown.
Binary file modified msautotest/renderers/expected/rgb_overlay_res_to8bit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion msautotest/renderers/expected/rgb_overlay_res_to8bit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/rgba_overlay_res.cairo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified msautotest/renderers/expected/rgba_overlay_res.pdf
Binary file not shown.
Binary file modified msautotest/renderers/expected/rgba_overlay_res.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 026847b

Please sign in to comment.