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?
Thanks again,
Ruth
--------------------------------------------------------------------------
Ruth Garry
GIS Specialist
DNetIT - working smarter with IBM
Supporting Defra, Animal Health, Natural England and RPA
Mobile: 07725 070269 IBM Mobex: 37276847
Landline: 0300 0602757
Email: [email protected]
Note: My working days are Monday, Tuesday, Thursday and Friday.
--------------------------------------------------------------------------
From:
Andrea Aime <[email protected]>
To:
Ruth Garry/UK/IBM@IBMGB
Cc:
[email protected]
Date:
06/10/2011 17:47
Subject:
Re: [Geoserver-users] ImageMosaic WMS output in GIF or PNG8 - land and sea
same colour
Sent by:
[email protected]
On Thu, Oct 6, 2011 at 10:27 AM, Ruth Garry <[email protected]> wrote:
> Hi,
>
> We have GeoServer 2.0.0, providing raster background mapping for Great
> Britain as a WMS service within an Intranet-based application. Maps are
> delivered in GIF format.
>
> There is a problem with one layer - Ordnance Survey 1:250 000 Scale
Colour
> Raster GeoTIFFs. This data layer is made up of 56 source images and is
> configured as a GeoServer ImageMosaic. There are 256 unique colours in
the
> source images.
>
> For some output maps in coastal areas, the white land (source image RGB
is
> 252,252,254) appears as exactly the same colour as the blue sea (source
> image RGB is 228,240,254). It doesn't happen at all scales or for all
map
> extents and appears to more prevalent where image requests include or
are
> close to the edges of the input image tiles. Please see attached image
for
> an example.
>
> This only happens for map outputs in GIF or PNG8 formats, with JPEG and
PNG
> producing maps with distinct land and sea areas. PNG isn't an option for
our
> application for performance reasons. Changing to JPEG may be an option,
but
> we're still investigating this.
>
> Changing the WMS "Default Interpolation Option" from Bilinear to Nearest
> Neighbour in GeoServer produces images with distinct land and sea areas,
but
> the image quality is too poor.
>
> I've also tried pre-processing the images to create overviews within the
> GeoTIFFs using "gdaladdo". The gauss resampling algorithm resulted in
images
> with white land and blue sea for some of the source images when loaded
into
> GeoServer, but not others. (I tried using the other resampling
algorithms
> for gdaladdo, but all except gauss resulted in the blue map background
on
> the sample tile).
>
> The source images can be downloaded from the Ordnance Survey Open Data
> website
> (
http://www.ordnancesurvey.co.uk/oswebsite/products/250k-raster/index.html
).
Downloaded? As far as I can see one can download it after paying for it?
> Any help on understanding on how the interpolation / conversion to GIF
or
> PNG8 is creating this effect gratefully received!
I'd suggest you to use an external software to reduce the image to 256
colors
(photoshop, irfanview, psp, gimp) and then save the result as a png or gif
file,
and then use it as the source for your custom palette:
http://docs.geoserver.org/latest/en/user/tutorials/palettedimage/palettedimage.html
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
-------------------------------------------------------
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
------------------------------------------------------------------------------
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