ContourProcess is not working properly for areas with equal data values

Description

I'm seeing some unexpected results when using the ContourProcess for data sets where there are non-trivial sized areas (i.e.: more than 1 or 2 data points) with equal values. When these areas are processed, a "waffle" pattern appears; that is, instead of the expected contour being generated, a number of connected squares are generated.

The attachments includes a GeoTIFF test file, a WPS request/response, the SLD used to invoke the WPS (using GeoServer), and the rendered image from the OpenLayers preview in GeoServer which shows the issue a bit clearer.

I believe this issue may be what Andrea Aime referred to as "misbehavior in flat areas" when testing with DEM data in this comment: https://jira.codehaus.org/browse/GEOT-3864?focusedCommentId=279855&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-279855 - https://jira.codehaus.org/browse/GEOT-3864?focusedCommentId=279855&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-279855

Environment

None

Assignee

Andrea Aime

Reporter

codehaus

Triage

None

Components

Fix versions

Priority

Medium
Configure