Ciao Mark, problem solved then :) Just for the uninitiated a quick explanation.
The BackgroundValues can be used to set the value to be used in gaps for mosaic. In this case a value of 0 means "use the first color in the color table" as the mosaics are paletted images and the 0 index point to a blue color. InputTransparentColor and OutputTransparentColor works in color space (e.g. with color) hence asking black to become transpare really means asking black to become transparent :) So in this case, to be on the safe side, we ask ImageMosaic to turn black pixels in single granules to transparent via the InputTransparentColor, then we fill the gaps with 255 to make the gaps black as well and then we use OutputTransparentColor for black to turn the black pixels in the final mosaic to transparent. Side note, I believe in this case it might be enough to set BackgroundValues and OutputTransparentColor. It is worth a try as it would make image serving faster (less operations). 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 Tue, Jun 4, 2013 at 2:49 PM, Mark <[email protected]> wrote: > Caio Simone, > > Here is the output of gdalinfo and I suppose that explains where the > blue color comes from since the color map defines 0 as exactly that > shade of blue. > > Based on your comments and that colormap I set the BackgroundValues to > 255 and both InputTransparentColor and OutputTransparentColor to > #000000. Now everything works wonderfully. I suppose I should have > studied that gdalinfo dump a little closer! > > Thanks for the help. > > Mark > > Driver: GTiff/GeoTIFF > Files: ***.tif > Size is 2168, 2208 > Coordinate System is: > GEOGCS["WGS 84", > DATUM["WGS_1984", > SPHEROID["WGS 84",6378137,298.257223563, > AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433], > AUTHORITY["EPSG","4326"]] > Origin = (-97.277345999999994,49.416856000000003) > Pixel Size = (0.003600000000000,-0.002700000000000) > Metadata: > AREA_OR_POINT=Area > Image Structure Metadata: > INTERLEAVE=BAND > Corner Coordinates: > Upper Left ( -97.2773460, 49.4168560) ( 97d16'38.45"W, 49d25'0.68"N) > Lower Left ( -97.2773460, 43.4552560) ( 97d16'38.45"W, 43d27'18.92"N) > Upper Right ( -89.4725460, 49.4168560) ( 89d28'21.17"W, 49d25'0.68"N) > Lower Right ( -89.4725460, 43.4552560) ( 89d28'21.17"W, 43d27'18.92"N) > Center ( -93.3749460, 46.4360560) ( 93d22'29.81"W, 46d26'9.80"N) > Band 1 Block=2168x3 Type=Byte, ColorInterp=Palette > Color Table (RGB with 256 entries) > 0: 7,23,178,255 > 1: 247,245,245,255 > 2: 124,137,224,255 > 3: 245,237,226,255 > ... snip ... > 214: 21,47,9,255 > 215: 51,17,66,255 > 216: 0,0,0,255 > 217: 0,0,0,255 > 218: 0,0,0,255 > ... snip ... > 253: 0,0,0,255 > 254: 0,0,0,255 > 255: 0,0,0,255 > > On Tue, Jun 4, 2013 at 6:38 AM, Simone Giannecchini > <[email protected]> wrote: >> Ciao Mark, >> please, read 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 Mon, Jun 3, 2013 at 9:37 PM, Mark <[email protected]> wrote: >>> Hello, >>> >>> I have a number of geotiff files that I'm attempting to mosaic and use >>> as an overlay on top of a base map. My problem is that I can't get rid >>> of the a border on the boundary of the geotiff mosaic. I've set >>> BackgroundValues to -9999 and the OutputTransparentColor to 000000 >>> which takes care of most of the area not occupied by images. >> >> Can you paster here the output of the gdalinfo tool on one of these images? >> >> Rationale. If your geotiff are RGB and they contain black portions we >> can use the InputTransparentColor to remove such areas. >> If the overall mosaic has holes (portions not covered by data) I would >> suggest to set the BackgroundValues to 0 and leave the >> OutputTransparentColor to 000000. >> This is a two steps approach: >> -1- use InputTransparentColor to remove blackportions within the images >> -2- use BackgroundValues to ask for a black background >> -3- use OutputTransparentColor to make the background go away >> >> ok, that was 3 steps, but I guess you got the idea :) >> >>> >>> The border seems to occur at almost all edges. For instance, I've >>> attached an image of the open layers preview for the west coast of the >>> US. (The actual image data is removed and replaced with a gray field.) >>> There are three tiles present in this portion of the mosaic, I'm >>> attempting to get rid of the blue border. The white area to the left >>> is what I want, transparent tiles. This blue border changes width >>> depending on the zoom level and the suggested_tile_size setting. The >>> bigger the tile size the wider the border. >>> >> >> Thinking, this is actually strange. If you configure the geotiff as a >> single geotiff store does it look differently? >> Which version of GeoServer are you working with? >> >> >>> The border isn't part of the geotiffs, I've checked, and I have no >>> idea why it is blue. I can try to make the border insubstantial by >>> changing the suggested_tile_size to something insanely small, but that >>> isn't an acceptable solution (it is already 32,32 in the attached >>> image) >> >> K, this answer partially to my question above, however the gdalinfo >> would be very useful anyway. >> It would be probably also good to have access to a couple of samples >> to reproduce the issue. You can >> send them privately if you wish. >> >>> >>> Any suggestions? >>> >>> Thanks, >>> >>> Mark >>> >>> ------------------------------------------------------------------------------ >>> How ServiceNow helps IT people transform IT departments: >>> 1. A cloud service to automate IT design, transition and operations >>> 2. Dashboards that offer high-level views of enterprise services >>> 3. A single system of record for all IT processes >>> http://p.sf.net/sfu/servicenow-d2d-j >>> _______________________________________________ >>> Geoserver-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>> ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
