[Geoserver-devel] New function

Hi everyone, I finally made up the function I needed in geoserver. This function return a fill color for a polygon based on a feature attribute without the needs to give color parameter in input (color gradient is from red to green but we can add new colors) . I found some works of Michael Bedward but I couldn’t use it in Geoserver so I had to adapt it (I took the interpolate function as model to understand how we can get parameters from the SLD for use in the java class) and make a function factory. It seems to work now . I think it could be interesting to have this function. I am new in this community so I wanted to ask you how can I publish it so people can use it.

Thank you, have a good day

···

Matthieu BONVENTI

I would hope the interpolate, recode and categorize functions can be used for this purpose without having to code up new functions?

What does your function do that you could not do with interpolate?

···

On 28 January 2015 at 07:37, Bonventi Matthieu <matthieu.bonventi@anonymised.com> wrote:

Hi everyone, I finally made up the function I needed in geoserver. This function return a fill color for a polygon based on a feature attribute without the needs to give color parameter in input (color gradient is from red to green but we can add new colors) . I found some works of Michael Bedward but I couldn’t use it in Geoserver so I had to adapt it (I took the interpolate function as model to understand how we can get parameters from the SLD for use in the java class) and make a function factory. It seems to work now . I think it could be interesting to have this function. I am new in this community so I wanted to ask you how can I publish it so people can use it.

Thank you, have a good day

Matthieu BONVENTI


Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

Well, As you may have noticed I’m not a Geoserver expert but with the interpolate function you have to hardcode colors and corresponding values in the SLD. I just wanted to do something simpler (and that I can understand better regarding my knowledges) and more “automatic”.

Matthieu Bonventi

I would hope the interpolate, recode and categorize functions can be used for this purpose without having to code up new functions?

What does your function do that you could not do with interpolate?

···


Jody Garnett

On 28 January 2015 at 07:37, Bonventi Matthieu <matthieu.bonventi@anonymised.com> wrote:

Hi everyone, I finally made up the function I needed in geoserver. This function return a fill color for a polygon based on a feature attribute without the needs to give color parameter in input (color gradient is from red to green but we can add new colors) . I found some works of Michael Bedward but I couldn’t use it in Geoserver so I had to adapt it (I took the interpolate function as model to understand how we can get parameters from the SLD for use in the java class) and make a function factory. It seems to work now . I think it could be interesting to have this function. I am new in this community so I wanted to ask you how can I publish it so people can use it.

Thank you, have a good day

Matthieu BONVENTI


Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

guess it depends what you consider hard coded, are you not hard coding the colours inside your function now?

···

On 30 January 2015 at 00:16, Bonventi Matthieu <matthieu.bonventi@anonymised.com> wrote:

Well, As you may have noticed I’m not a Geoserver expert but with the interpolate function you have to hardcode colors and corresponding values in the SLD. I just wanted to do something simpler (and that I can understand better regarding my knowledges) and more “automatic”.

Matthieu Bonventi

I would hope the interpolate, recode and categorize functions can be used for this purpose without having to code up new functions?

What does your function do that you could not do with interpolate?


Jody Garnett


Jody Garnett

On 28 January 2015 at 07:37, Bonventi Matthieu <matthieu.bonventi@anonymised.com> wrote:

Hi everyone, I finally made up the function I needed in geoserver. This function return a fill color for a polygon based on a feature attribute without the needs to give color parameter in input (color gradient is from red to green but we can add new colors) . I found some works of Michael Bedward but I couldn’t use it in Geoserver so I had to adapt it (I took the interpolate function as model to understand how we can get parameters from the SLD for use in the java class) and make a function factory. It seems to work now . I think it could be interesting to have this function. I am new in this community so I wanted to ask you how can I publish it so people can use it.

Thank you, have a good day

Matthieu BONVENTI


Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

By hardcoded I mean :

for any value = 1 / colorcode #xxxxxx
for any value = 2 / colorcode #yyyyyy

I rescale my values to a [0-1] scale to get a color in the HSB colorspace and then convert it in RGB and return the rgbcode .

Matthieu Bonventi

      1. 오후 4:22에 “Jody Garnett” <jody.garnett@anonymised.com>님이 작성:
···


Jody Garnett

On 30 January 2015 at 00:16, Bonventi Matthieu <matthieu.bonventi@anonymised.com> wrote:

Well, As you may have noticed I’m not a Geoserver expert but with the interpolate function you have to hardcode colors and corresponding values in the SLD. I just wanted to do something simpler (and that I can understand better regarding my knowledges) and more “automatic”.

Matthieu Bonventi

I would hope the interpolate, recode and categorize functions can be used for this purpose without having to code up new functions?

What does your function do that you could not do with interpolate?


Jody Garnett

On 28 January 2015 at 07:37, Bonventi Matthieu <matthieu.bonventi@anonymised.com> wrote:

Hi everyone, I finally made up the function I needed in geoserver. This function return a fill color for a polygon based on a feature attribute without the needs to give color parameter in input (color gradient is from red to green but we can add new colors) . I found some works of Michael Bedward but I couldn’t use it in Geoserver so I had to adapt it (I took the interpolate function as model to understand how we can get parameters from the SLD for use in the java class) and make a function factory. It seems to work now . I think it could be interesting to have this function. I am new in this community so I wanted to ask you how can I publish it so people can use it.

Thank you, have a good day

Matthieu BONVENTI


Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel