[Gdal-dev] Help creating NITF file.

Ken Sewell sewell at dramail.com
Wed Dec 1 19:06:38 EST 2004


Sorry, I wasn't clearer.  I'm using the API.  I think I figured it out,
finding the function GDALGCPsToGeoTransform() allowed me to pass in the
corner points and generate the geotransform I needed.  I get a NITF out
and so far it looks correct.

Ken Sewell                   Defense Research Associates
Project Engineer             3915 Germany Lane, Suite 102
937-656-4899 x3004           Beavercreek, Ohio 45431-1608
sewell at dramail.com

On Wed, 1 Dec 2004, Frank Warmerdam wrote:

> On Wed, 1 Dec 2004 13:15:23 -0500 (EST), Ken Sewell <sewell at dramail.com> wrote:
> >
> > I'm trying to write out a NITF file and I need a little help.  This is
> > the first time I've tried writing a file with GDAL so I'm in unfamiliar
> > territory here.  I can write the file with all of the raster data, but
> > I'm getting stuck on the georeferencing.  I know the lat/lon/alt of my
> > images corner points but I'm not sure how to write that to the NITF file.
> > Any help is appreciated.  Thanks.
>
> Ken,
>
> Are you doing this with calls to the API or just using
> gdal_translate?  Usually the easiest way to associate
> georeferencing to a raw image is to write a world file for
> it.  Many of the drivers, notably including the TIFF driver,
> support world files.  Then you could just gdal_translate to
> NITF, also setting the -a_srs WGS84 switch to let GDAL
> know the coordinates are geodetic.
>
> If you need details on how to prepare a world file let me know.
> If you are using the API you should just be able to do
> a SetGeoTransform() call.  The geotransform is essentially
> the same values you would put in a world file though in a
> different order.
>
> 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