Fix localcomparator 871

fixed raster local comparator bug. issue 871.