[Geoserver-users] Ideas for visualising raster filers

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?
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?

Thank you very much!

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 :slight_smile: )

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

Hello,

The way to do this is indeed to change the style parameter in your geoserver call to have an other "visual" without the values in it.

Best regards,

Eric Smets

Op 2/05/2013 18:39, Simone Giannecchini schreef:

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 :slight_smile: )

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

------------------------------------------------------------------------------
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

--
Eric Smets eric.smets@anonymised.com
FKS bvba - Formal and Knowledge Systems http://www.fks.be/
Schampbergstraat 32 Tel: ++32-(0)11-21 49 11
B-3511 Hasselt Fax: ++32-(0)11-22 04 19

Thank you both for the answers. I will post some SLDs I'm working on but first will try to it the way you suggested.
We were thinking that maybe Geoserver's internally "Map Painting" would work in a sequence, thus applying one rule after another.
Therefore we thought we leave the original SLD Color Map and only inject at the end our transparency/masking ColorMapEntry which ultimately sets pixels to transparent that were colore before by the original ColorMapEntries.
Building a new SLD with correct interval edges (not overlapping) is probably not too hard but you need to "understand" the SLD while the first idea could be done by simply injecting a new rule at the end.

> 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 :slight_smile: )
>
>> 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
>>
> ----------------------------------------------------------------------
> -------- 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
>

--
Eric Smets eric.smets@anonymised.com
FKS bvba - Formal and Knowledge Systems http://www.fks.be/
Schampbergstraat 32 Tel: ++32-(0)11-21 49 11
B-3511 Hasselt Fax: ++32-(0)11-22 04 19

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free
troubleshooting tool designed for production Get down to code-level detail
for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Fri, May 3, 2013 at 10:03 AM, <Thomas.Wanderer@anonymised.com> wrote:

Thank you both for the answers. I will post some SLDs I'm working on but
first will try to it the way you suggested.
We were thinking that maybe Geoserver's internally "Map Painting" would
work in a sequence, thus applying one rule after another.

It does

Therefore we thought we leave the original SLD Color Map and only inject
at the end our transparency/masking ColorMapEntry which ultimately sets
pixels to transparent that were colore before by the original
ColorMapEntries.

Once a pixel is painted, there is no way to make it transparent again, if
the pixel is, say, red, painting transparent on top of it leaves it red.

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Ok,

very good to know! So there is no other option then understanding the “edges” of the intervals and injection transparency intervals in an intelligent way. With Ramp color maps we had the experience that the transparency doesn’t work in a sharp way as intervals.

···

Von: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] Im Auftrag von Andrea Aime
Gesendet: Freitag, 3. Mai 2013 10:23
An: Wanderer, Thomas
Cc: GeoServer Mailing List List
Betreff: Re: [Geoserver-users] Ideas for visualising raster filers

On Fri, May 3, 2013 at 10:03 AM, <Thomas.Wanderer@anonymised.com> wrote:

Thank you both for the answers. I will post some SLDs I’m working on but first will try to it the way you suggested.
We were thinking that maybe Geoserver’s internally “Map Painting” would work in a sequence, thus applying one rule after another.

It does

Therefore we thought we leave the original SLD Color Map and only inject at the end our transparency/masking ColorMapEntry which ultimately sets pixels to transparent that were colore before by the original ColorMapEntries.

Once a pixel is painted, there is no way to make it transparent again, if the pixel is, say, red, painting transparent on top of it leaves it red.

Cheers

Andrea

==

GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


Ciao Thomas,
you need to use the trick I put in the sample colormap i sent
yesterday, creating a very steep intervale to go from opaque to
transparent.

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 Fri, May 3, 2013 at 10:27 AM, <Thomas.Wanderer@anonymised.com> wrote:

Ok,

very good to know! So there is no other option then understanding the
“edges” of the intervals and injection transparency intervals in an
intelligent way. With Ramp color maps we had the experience that the
transparency doesn’t work in a sharp way as intervals.

Von: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] Im Auftrag von
Andrea Aime
Gesendet: Freitag, 3. Mai 2013 10:23
An: Wanderer, Thomas
Cc: GeoServer Mailing List List
Betreff: Re: [Geoserver-users] Ideas for visualising raster filers

On Fri, May 3, 2013 at 10:03 AM, <Thomas.Wanderer@anonymised.com> wrote:

Thank you both for the answers. I will post some SLDs I'm working on but
first will try to it the way you suggested.
We were thinking that maybe Geoserver's internally "Map Painting" would work
in a sequence, thus applying one rule after another.

It does

Therefore we thought we leave the original SLD Color Map and only inject at
the end our transparency/masking ColorMapEntry which ultimately sets pixels
to transparent that were colore before by the original ColorMapEntries.

Once a pixel is painted, there is no way to make it transparent again, if
the pixel is, say, red, painting transparent on top of it leaves it red.

Cheers

Andrea

--

==

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

-------------------------------------------------------

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users