Re: [OpenMap Users] Border around raster imagery with WMS and TRANSPARENT=TRUE

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Thu, 6 Dec 2012 20:24:50 -0500

Hi Daniel,

Interesting problem, I think Tore may be asking the right question. I
usually see something like this when an image with transparent pixels is
saved into an image format that doesn't support transparency. The gif
format should be handling the transparency, though. Do you get the same
results asking for a PNG image?

What does the resulting image look like for just the country layer with a
transparent background, for GIF and PNG?

- Don




On Wed, Dec 5, 2012 at 6:55 AM, Tore Halset <halset_at_pvv.ntnu.no> wrote:

> Hello.
>
> Do you see the same effect if you use image/png instead of image/gif?
>
> Sorry if this is a stupid question. I have not used the wms server with
> OMRaster.
>
> Regards,
> Tore Halset.
>
> On 4. des. 2012, at 18:20, Daniel A Hale <Daniel.A.Hale_at_Raytheon.com>
> wrote:
>
> > Hello,
> >
> > I've been looking into updating our map server from OpenMap 4.6.5 to use
> OpenMap 5.0, as we've noticed some image anomalies have disappeared (and
> I'm sure we'll see some better performance, too). There's one sticking
> point that I'm trying to resolve, and I thought I'd ask for some input.
> >
> > We've been using the WmsServlet to handle requests for imagery. In the
> past, we'd pass in requests like the following:
> >
> >
> http://localhost:8080/OMWMS/wms?LAYERS=shapePolitical%2Cjrpf%2Cjcib&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-118.125,28.125,-112.5,33.75&WIDTH=256&HEIGHT=256
> >
> > I don't think this should be too surprising. What we're seeing with this
> request after making the switch to 5.0 is that whenever there is raster
> imagery that extends over water, the empty space in the last tile is
> getting padded out with a black fill. For instance, a tile like the one
> shown here, where the raster imagery at the top in California and Mexico is
> fine, but the water around the country shape imagery in the Baja is black.
> The next tile to the South of this returns to normal, with the shape layer
> being rendered with a white background, as shown in the second image.
> >
> > <0F179250.gif> <0F071906.gif>
> >
> > It appears that to some degree this is a problem with transparency. In
> the request I shared, you'll notice that there are no BGCOLOR or
> TRANSPARENCY parameters. If TRANSPARENCY is set to TRUE, then the image
> will display as above (ignoring the BGCOLOR property if it is set).
> Supplying just BGCOLOR essentially fixes the problem. I'm wondering if
> there is a way to maintain the TRANSPARENCY setting without displaying the
> black background?
> >
> > I've checked a few things trying to troubleshoot this: selected = false
> in the OMRasterObject, and the 'finer' logging flag is not set (mentioned
> in the "Border around OMRaster object" thread:
> http://openmap.bbn.com/mailArchives/openmap-users/2012-06/6920.html). The
> country shape file renders first, and the background is white until the the
> raster imagery is rendered. I also tried reverting the
> BufferedImageRenderPolicy to the StandardRenderPolicy, as I noticed it was
> handling the graphics object rather differently. Still the same.
> >
> > We can probably get by with specifying a background color if we need to,
> but I'd like to make sure I understand this issue better and see if there's
> a fix before I make a recommendation about upgrading.
> >
> > Thanks,
> >
> > Daniel Hale
> >
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Dec 06 2012 - 20:26:53 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT