Ciao Thomas,
please, find my answer inline below...
Regards,
Simone Giannecchini
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
Ing. Simone Giannecchini
@simogeo
Founder/Director
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
On Wed, May 1, 2013 at 4:07 PM, <Thomas.Wanderer@anonymised.com> wrote:
Hello,
we're still searching for possibilities to filter raster layers. As a fact
that raster based layers cannot be queried with a CQL or other filter, we
were thinking to use SLDs to apply filters on a raster layer. The scenario
is that a user has a (radiation) map in an OpenLayers based client. Now he
wants to "filter" the layer based on values, let's say:
"Don't show me parts of the map with values below X and values above Y"
We want to transfer this condition dynamically into a SLD wich we send to
the server. Now my question is what are the best options for creating such a
SLD. many of the layers use ColorMaps with gradients (type="ramp"). The
additional filter rule would only make sense with type="intervals".
Is it possible to mix 2 rules with different ColorMap types and have you
experience with support by other servers?
I have no experience with what other servers can do. But I believe you
can achieve what you are looking for with
SLD and ColorMap. You can actually pass GeoServer the style and modify
it dynamically.
Regardless of the fact that you use ramp or intervals you only have to
fiddle with values at the edges.
As an instance something similar to:
<ColorMap type="ramp">
<ColorMapEntry color="#EEBE2F" quantity="-0" label="label" opacity="0"/>
<ColorMapEntry color="#2851CC" quantity="1E-7" label="values"
opacity="1"/>
<ColorMapEntry color="#211F1F" quantity="50" label="label" opacity="1"/>
<ColorMapEntry color="#EE0F0F" quantity="100" label="label"
opacity="1"/>
<ColorMapEntry color="#AAAAAA" quantity="200" label="label"
opacity="1"/>
<ColorMapEntry color="#6FEE4F" quantity="250" label="label"
opacity="1"/>
<ColorMapEntry color="#3ECC1B" quantity="300" label="label"
opacity="1"/>
<ColorMapEntry color="#886363" quantity="350" label="label"
opacity="1"/>
<ColorMapEntry color="#5194CC" quantity="400" label="label"
opacity="1"/>
<ColorMapEntry color="#2C58DD" quantity="450" label="label"
opacity="1"/>
<ColorMapEntry color="#DDB02C" quantity="600" label="label"
opacity="1"/>
<ColorMapEntry color="#DDB02C" quantity="600.000000000000001"
label="label" opacity="0"/>
</ColorMap>
would cut out values below 0 and above 600 (warning, going from memory
here, you'd better checking this yourself
)
So far I had only errors returning - but this is the best way I could think
of implementing raster layer filsters...any other solutions which do not
involve server side processing?
I would suggest you share some of the SLD you are playing with as well
as some sample data.
That said, I can probably think about a rendering transformation tha
actually does a simple lookup transform on the data prior
to rendering "cutting out" part of the dynamic for the data (e.g.
setting the values to nodata). This would require
some coding, nothing dramatic though and of course it would require
some moderate coding on the server side.
Thank you very much!
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users