On Fri, Aug 5, 2011 at 2:50 AM, rgohagan <[email protected]> wrote:

> Hi,
>
> I'm a newbie to geoserver so apologies if this is already covered somewhere
> but I haven't been able to find anything.
>
> I have a large image pyramid of elevation data that I would like to style
> dynamically. Specifically, I want to be able to make the color values
> dependent on the elevation values for the requested tile(s). So the actual
> colors would stay the same, but would be mapped to different elevation
> values depending on what elevation values exist in the area you are
> currently looking at. This is so in areas where there is little difference
> in elevation, what changes there are are still visible and you don't get an
> image all of one color.
>
> I realise that I can set up rules for different zoom levels, but this still
> wouldn't allow colors to be mapped to e.g. the top 10%, 10-20%, 30-50% etc
> of elevation values.
>
> Is this feasible using some form of filter or transformation?
>

While we don't have, out of the box, the tools to do this, it would be
possible
to achieve what you want on trunk (what will one day become 2.2.0)
using the "rendering transformations" feature:
http://geo-solutions.blogspot.com/2011/01/developers-corner-have-your-sld.html

The examples above chain on the fly a WPS process that extracts isolines
from a raster, in your case you'd need one that normalizes the raster values
between 0 and 100 instead.
That sounds pretty feasible with JAI, first use the Extrema operation to
find out
max and min of your data set, and then apply a linear transformation to your
data
to rescale them to the expected range (which can be done in a number of
ways,
but I guess for this simple case using AddConst and MultiplyConst operations
could be the fastest route).

The WPS process would be rather similar to this one:
http://svn.codehaus.org/geoserver/trunk/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/gs/ScaleCoverage.java

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to