[gdal-dev] gdal_translate help

Matthew Golczak mgolczak at yahoo.com
Wed Jun 24 04:06:06 EDT 2009



Hi Frank,
Thank you very much for your suggestion. I've followed your idea with  success . I've got nitif file with geo-spatial references but gdalwarp  during execution was not entirely happy   please see output dump.
gdalwarp run.tiff -of nitf    run1.nitf
Copying color table from run1linux.tiff to new file.
Creating output file that is 12595P x 1851L.
ERROR 6: NITF file should have been created with creation option 'ICOORDS=G'.
 
ERROR 6: Apparently no space reserved for IGEOLO info in NITF file.
NITFWriteIGEOGLO() fails.
ERROR 1: Unable to write all 256 LUT entries, only able to write 0.
Processing input file run1linux.tiff.
0...10...20...30...40...50...60...70...80...90...100 - done.
I'm not sure that those two errors are critical especially that I have got nitif image which is correctly displayed by openev and ESRI tools. In this circumstance could you comment those errors and advice me  what needs to be done to eliminate those errors?
Thank you very much for your advice .

regards

Maciek


--- On Tue, 6/23/09, Frank Warmerdam <warmerdam at pobox.com> wrote:

> From: Frank Warmerdam <warmerdam at pobox.com>
> Subject: Re: [gdal-dev] gdal_translate help
> To: "Matthew Golczak" <mgolczak at yahoo.com>
> Cc: gdal-dev at lists.osgeo.org
> Date: Tuesday, June 23, 2009, 4:37 PM
> Matthew Golczak wrote:
> > Hello, I’m new to gdal concept and I’ll appreciate
> if you could help me. I’m
> > trying to use gdal_translate to geo-referencing aerial
> images but with
> > limited success so far. The image is generated as gif
> file plus
> > information about geo-location of each corner. Due to
> the fact that the
> > corner geo-location is calculated based on GPS, the
> datum and projection is
> > specified as EPSG:4326. The following translation
> works very well for me gdal_translate -of GTiff -a_srs
> EPSG:4326 -gcp 0 0 138.792939 -34.721669
> > -gcp 1784 0 138.791485 -34.753698 -gcp 0 12515
> 138.519595 -34.713290 -gcp
> > 1784 12515 138.518036 -34.745320  run.gif
> run.tiff but I need also this
> > image in nitif format  so I have tried  the
> following  translation gdal_translate -of nitf run1tiff
> run.nitf.  Unfortunately in this case
> > nitif file has not any geospatial references. 
> The gdalinof in regards to
> > tiff contains geospatial information and none in
> respect to nitif.  It seems
> > to me that is something wrong but what? Any support in
> this matter highly
> > appreciated. 
> 
> Maciek,
> 
> The GDAL NITF driver does not support writing GCPs in NITF
> format.  In fact,
> I'm not aware of a general mechanism for storing GCPs in
> NITF format.  I
> think you will need to georeference it using affine
> georeferencing.  If
> the image is not north up, you may need to rectify the
> image first with
> gdalwarp.  In fact gdalwarp can write directly to nitf
> format so perhaps
> you could do:
> 
> eg.
> 
> gdalwarp run.tiff -of NITF run.nitf
> 
> 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