I think it has to be a two step process:
Create an alpha band with the source image's nodata value:
gdalwarp -dstalpha -srcnodata 0 ...
Convert the alpha band into a mask band:
gdal_translate -a_nodata 0 -b 1 -b 2 -b 3 -mask 4 ...
Jason Newmoyer
Newmoyer Geospatial Solutions
843.606.0424
ja...@newmoyergeospatial.com
On Thu, Mar 15, 2018 at 10:33 AM, Niels Charlier <ni...@scitus.be> wrote:
> Thanks for the tip, Jason. I have did
>
> gdal_translate -b mask <name>.tif <name>.tif.msk
>
> on all the images and then set FootprintBehavior:Transparent
>
> but that didn't work :(
>
> Is that what you meant?
>
> Regards
> Niels
>
>
> On 08-03-18 16:14, Jason Newmoyer wrote:
>
> I remember running into this before. There were a few different variations
> of the problem having to do with InputTransparentColor settings. Ultimately
> what worked for me was creating mask bands in all of my geotiffs and using
> FootprintBehavior:Transparent, instead of InputTransparentColor (or
> OutputTransparentColor), both of which are now blank.
>
>
> Jason Newmoyer
> Newmoyer Geospatial Solutions
> 843.606.0424 <(843)%20606-0424>
> ja...@newmoyergeospatial.com
>
>
>
> On Wed, Mar 7, 2018 at 11:03 AM, Niels Charlier <ni...@scitus.be> wrote:
>
>> In the meantime I have found out that the reason that the images do show
>> when only one is inside the bbox, is simply that imagemosaic skips the
>> mosaicing procedure altogether when there is only one image in the result.
>>
>> the blank result is produced by the JAI imagemosaic operation itself. it
>> has to have something to do with the colours inside the images. the
>> transparent background is black, and I have tried specifying that in
>> background values and/or transparent input colour, but then I get an
>> "unsupported format" error. An error that has been reported several times
>> on the users ML when specifying these settings, but without resolution.
>>
>> I have included two sample images, one for the background and one for the
>> foreground. If anyone has any idea what this could be related to or what I
>> could try, thanks in advance.
>>
>> Kind Regards
>> Niels
>>
>>
>> On 05-03-18 12:27, Niels Charlier wrote:
>>
>>> I'm having the strangest issue with imagemosaic.
>>>
>>> I simplified the use case in order to exclude any factors that could
>>> possibly be the cause of the issue, but to no avail.
>>>
>>> This is what I am left with:
>>>
>>> * I create an imagemosaic from a directory with two adjacent GEOTIFF
>>> images in it. I let imagemosaic do all the configuration and build the
>>> catalog.
>>>
>>> * Whenever I zoom into one of the the two granules with a WMS getMap
>>> request, they are displayed perfectly.
>>>
>>> * Whenever I zoom out to see both granules at once, I get a blank result.
>>>
>>>
>>> Does this sound like anything that has ever happened before? Is this not
>>> supposed to work? I'm not sure where to debug at this moment.
>>>
>>>
>>> Kind Regards
>>>
>>> Niels
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Geoserver-devel mailing list
>>> geoserver-de...@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Geoserver-devel mailing list
>> geoserver-de...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users