[gdal-dev] gdal_translate help
Frank Warmerdam
warmerdam at pobox.com
Tue Jun 23 08:37:56 EDT 2009
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