On Fri, Oct 7, 2011 at 5:33 PM, Ruth Garry <[email protected]> wrote:

> Andrea,
>
> Thank you very much -  saving a custom palette file as you described and
> appending "&palette=mypalette" to the GetMap request has solved this
> problem.
>
> (As an aside, I'm not sure why you would be asked to pay to download the
> source data - it should be free of charge :-
> http://www.ordnancesurvey.co.uk/oswebsite/business/licences/using-and-creating-data-with-os-products/os-opendata/index.html
> )
>
> The issue I now have is that ideally I need to associate this palette with
> the layer by a method other than via the GetMap URL. (This layer is
> requested as part of a layer group and display is scale-dependent). Do you
> know if this can somehow be added to the style associated with this layer?
>

Nope, that is unfortunately not possible at the moment.

It's also somewhat harder than considering the style or the layer by
themselves.
A WMS client can ask for a certain number of layers superimposed, and ask
for alternate styles,
other than the default one, so the set of colors that end up in the map is
completely dynamic.

It would make sense to associate the palette to a layer only if the layer is
requested alone and with
its default style (the style can be reused for multiple layers, which would
potentially result in
different set of colors as styles can pick colors for data attributes too).

A generic solution that would still make sense would be to have a set of
default palettes that are to
be applied to certain layer/style combinations, by default, when png8 or gif
are requested.
As suggested above, a less generic solution that coudl still work would be
to associate the
palette to the layer, and enable it only if the layer is requested alone,
and with its default style.

Hmm... wondering... can't you reduce the image to paletted in
pre-processing? GeoServer
should then use directly the colors in the original image without trying to
create a new one
on the fly.

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

-------------------------------------------------------
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to