Opened 15 years ago

Closed 15 years ago

#2735 closed defect (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (2)

by asgerpetersen, 15 years ago

Attachment: Small.zip added

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

comment:1 by warmerdam, 15 years ago

Keywords: forceToMultiLineString added
Milestone: 1.6.1
Resolution: fixed
Status: newclosed

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.