Mike Grogan created an issue |
Interpolation of data instead of images for non-RGBA rasters |
Issue Type: |
Improvement |
---|---|
Affects Versions: |
2.5, 2.6-beta |
Assignee: |
|
Attachments: |
InterpolateBilinear.java |
Created: |
28/Apr/14 7:59 PM |
Environment: |
All |
Labels: |
raster interpolation wms render-transformations |
Priority: |
Minor |
Reporter: |
Interpolation applied to non-RGB rasters (i.e. single-banded coverages, etc.) should be applied to the underlying DATA, NOT the resulting IMAGE. Otherwise, the result is just a blurry image, not an interpolated raster. (Opening at request of Simone Giannecchini). This issue has been discussed and outlined well in the e-mail list at To summarize, whenever a ColorMap is applied to raster data while oversampling, GeoServer WMS currently interpolates the resulting IMAGE after applying the ColorMap rather than interpolating the underlying DATA before applying the ColorMap. This just ends up interpolating RGB colors and just results in a blurry / fuzzy image rather than a true interpolation of the source data. GeoServer should interpolate the data first before applying the ColorMap. One proposed solution and workaround that I am starting to employ is a Rendering Transformation that interpolates the data first, as described. This allows for the interpolation to be applied on a per-layer basis, rather than globally through whatever choice is made in the WMS settings. I am highly recommending this method for accomplishing this improvement. It would seem to touch much less of the codebase than changing the way it is done globally in the WMS, and leaves open options for choosing or changing interpolation on a per-layer basis. The downside is that it will need the WPS extension installed. At Simone’s request, I am attaching some very rough, early code I am using to do this Rendering Transformation. Again, it’s very early … and any pointers on this are welcome. I am especially interested in getting the invertGridGeometry method working in order to expand the bounding box to provide for a smoother transition between tile boundaries. I have also been looking at the Biliniear Interpolation code used by the Barnes surface transformation(s) that may be better than the JAI method I am calling now. |
This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c) |