Utils.GridStatisticsToShapefile is behaving unexpectedly

Description

I have a grid and a shapefile. When I run GridStatisticsToShapefile I get this result:


The labels are the number of pixels which is used for the statistics.
And the edge of the grid more pixels are used than expected.

It looks like every pixel that is intersecting the shape is used, I expect only the pixels which have their center within the shape are used.

Activity

Show:
Paul Meems
June 3, 2017, 2:03 PM

After a long day of debugging I seem to have found a solution:

I've asked for a more permanent solution. My suggestion is to add a parameter to set the method (CenterWithin or Intersection).

Paul Meems
June 4, 2017, 8:34 AM

Just committed optional parameter 'useCenterWithinMethod' to Utils.GridStatisticsToShapefile() to let the developer decide which method is uses: CenterWithin or Intersection.

Assignee

Paul Meems

Reporter

Paul Meems

Labels

None

Epic Link

None

Affects versions

Fix versions

Priority

High
Configure