Ticket #2735 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Cutline with blend gives wrong results inside cut polygon

Reported by: asgerpetersen Owned by: warmerdam
Priority: normal Milestone: 1.6.1
Component: Algorithms Version: 1.6.0
Severity: normal Keywords: blend forceToMultiLineString
Cc:

Description

Outside the cut polygon the rasters are correctly blended together over the specified blending distance. Inside the cut polygon the rasters are blended 50/50 all over.

Please find a simple example attached. In the example a white (one band, all values = 255) and a black (one band, all values = 0) are cut together using blending. Outside the polygon everything looks perfect. Inside the polygon all pixels are gray (value = 128).

Attachments

Small.zip Download (11.5 KB) - added by asgerpetersen 3 years ago.
Zip file containing input raster files, shp cut polygon, bat-script and the resulting output

Change History

Changed 3 years ago by asgerpetersen

Zip file containing input raster files, shp cut polygon, bat-script and the resulting output

Changed 3 years ago by warmerdam

  • keywords forceToMultiLineString added
  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 1.6.1

I have determined that the problem was OGRGeometryFactory::forceToMultiLineString() was not working for MultiPolygons? (though it does for Polygons). This resulted in points inside always being at a distance of zero from the cutline and so being treated as 50% intensity.

I have fixed this in trunk (r15944), and 1.6 branch (r15945).

I see forceToMultiLineString() is significantly less useful in 1.5 so no point in backporting this change.

Note: See TracTickets for help on using tickets.