[Gdal-dev] Help With Transparent Colors

Frank Warmerdam warmerdam at pobox.com
Tue Jan 24 18:06:48 EST 2006


On 1/24/06, Dolloff, Matthew D. (JSC-ER7) <matthew.d.dolloff at nasa.gov> wrote:
>
>
>
> Hello.  I am trying to convert some MrSID images into Geotiffs and tiling
> them together.  The MrSIDs are in state plane coordinate system and I need
> them in WGS84.  So I convert the MrSIDs to geotiffs using mrsiddecode from
> lizard tech.  Then I use gdal warp to change the projection type.  Then use
> gdal_merge to merge them together.  The problem is that I end up with a
> black collar when I warp the images and then when I merge them the images
> cover each other up.  Is there anyway, that I can crop those collars out?
> Here is the link where I am getting the sids
> http://www.nysgis.state.ny.us/gateway/mg/2001/suffolk/01ic_t_babylon_l06col.htm

Matt,

A couple of approaches would be:

 o Use gdal_merge to merge the TIFFs before
    reprojecting them.  Then gdalwarp the resulting
    mosaic.

 o Or create a big WGS84 mosaic file and gdalwarp
    each non-WGS84 file into that, mosaicing at the
    same time as reprojecting.

In the future gdalwarp will support multiple input
files, essentially replacing gdal_merge for many
purposes.  This is already in CVS if you were building
from source.  Another option would be to generate a
nodata value or better yet an alpha channel in the files
output by gdalwarp to keep track of the nodata pixels.

My suggestion would be the top most option, mosaic
then reproject.  Keep in mind that GeoTIFF only
supports file sizes up to 4GB.  So if your mosaic is
going to be large, you may need to do it in a format
like Erdas Imagine.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list