[Gdal-dev] RE: Kakadu georeferencing
Frank Warmerdam
warmerdam at pobox.com
Thu Oct 16 09:54:02 EDT 2003
Gerald Buckmaster wrote:
> Frank,
>
> This is a bit off-topic, development-wise, but the thread touched off a
> question.
>
> I am using geotifcp, and gdal_translate.exe with Kakadu to georeference and
> compress BMP files, first converting the BMP to a regular TIF, then TIF to
> GeoTIFF, and finally GeoTIFF to JP2 format. I use a VBScript to do the
> number crunching and passing of variables to the executables for processing.
> Is there a way I can go straight from BMP to JP2 using only a geotiff tag,
> like the one below, without the 2 intermediate conversion steps? I'm looking
> to reduce the processing time per image (currently 60 seconds per 82mb BMP
> file)?
>
> v/r
>
> Buck
>
> Geotiff_Information:
> Version: 1
> Key_Revision: 1.0
> Tagged_Information:
> ModelTransformationTag(4,4):
> 3.17756913644005E-07 1.56182512826881E-06 0 -147.895661114049
> 1.56182512826881E-06 -3.17756913644005E-07 0 33.2643388859509
> 0 0 0 0
> 0 0 0 1
> End_Of_Tags.
> Keyed_Information:
> GTModelTypeGeoKey (Short,1): ModelTypeGeographic
> GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
> GeographicTypeGeoKey (Short,1): GCS_WGS_84
> End_Of_Keys.
> End_Of_Geotiff.
Gerald,
You can do the translation in one step using gdal_translate if you write
out your ModelTransformationTag info to a .wld file along side the .bmp file.
Assuming your .bmp has the appropriate .wld the following command would
translate to JP2 format with the WGS84 LL coordinate system:
gdal_translate -a_srs WGS84 -of JP2KAK input.bmp output.jp2
Hopefully the world file format is pretty obvious, but one easy way to
verify the correct argument order is to run the "listgeo" utility with the
-tfw flag against a geotiff file and a corresponding world file (with the
.tfw extension) will be written out. From that you can ensure you know what
order to put in the coefficients.
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