[gdal-dev] Problem in viewing NITF images created by GDAL_TRANSLATE

Frank Warmerdam warmerdam at pobox.com
Wed Sep 17 15:46:00 EDT 2008

On Wed, Sep 17, 2008 at 2:26 PM, Mo Wang <mo at discover-aai.com> wrote:
> Hi all,
> I used gdal_translate to make a complete copy of a nitf file and it ran to
> completion. But the output image file can only be viewed partially on a
> IMAGINE Viewer while the whole original image file can be viewed on the
> Viewer. I believe that the data is there just it can not be viewed.


It looks like the NITF writer normally writes the entire
NITF file as a single block image (regardless of the blocking
of the input image).  Possibly a single large block causes
problems for imagine, though I'm not sure why that would

You can force blocking using the BLOCKXSIZE and BLOCKYSIZE
parameters.  So,if you add -co BLOCKXSIZE=1024 -co BLOCKYSIZE=1024
when running gdal_translate you should get 1024x1024 tiles.

Check if that helps.

Note that the GDAL NITF writer is not really very sophisticated, and
will often be inadequate to reproduce an original NITF given as
input.  However, it is certainly my intent that it should produce a
valid file.

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