Re: [gdal-dev] Rotate unreferenced tiff file by -90 degrees

2011-03-17 Thread Frank Warmerdam

On 11-03-17 05:09 AM, Wesley Roberts wrote:

Dear gdal'ers

I am working with TRMM rainfall data from an HDF5 file (converted from hdf4
to hdf5). I am able to use gdal_translate to extract the gridded data from
the HDF file using the following command.

gdal_translate -of GTiff
HDF5:3A25.071201.6A.h5://DATA_GRANULE/PlanetaryGrid2/e_surfRainMean2
test.tif

Gdal_translate works a treat and writes out the test.tif file perfectly,
however, the file is unreferenced and needs to be rotated by -90 degrees. Is
it possible to do this using gdal_translate or do I need to make use of
gdalwarp as well? My tiff world file needs to look something like this

0.50 0.000 0.000 -0.50 -179.75 36.75

Am I correct in assuming that a suitable proj4 statement might do the trick,
wrt assigning projection info and defining rotation? If so can someone point
me towards a document explaining the various proj4 declaration parameters,
or give me some advice on how to go about getting the data properly
referenced.


Wesley,

I think the easiest approach is to prepare a worldfile representing the
current georeferencing in east-up or west-up orientation.  Then use
gdalwarp to transform it to north up.

  gdalwarp input.tif output.tif

For east up I think the world file might look something like:

0.0
0.5
0.5
0.0
top-left-x
top-left-y

You might need to fiddle around with the orientation a bit to get it
right.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Rotate unreferenced tiff file by -90 degrees

2011-03-17 Thread Zoltan Szecsei

On 2011-03-17 15:34, Frank Warmerdam wrote:

On 11-03-17 05:09 AM, Wesley Roberts wrote:

Dear gdal'ers

I am working with TRMM rainfall data from an HDF5 file (converted 
from hdf4
to hdf5). I am able to use gdal_translate to extract the gridded data 
from

the HDF file using the following command.

gdal_translate -of GTiff
HDF5:3A25.071201.6A.h5://DATA_GRANULE/PlanetaryGrid2/e_surfRainMean2
test.tif

Gdal_translate works a treat and writes out the test.tif file perfectly,
however, the file is unreferenced and needs to be rotated by -90 
degrees. Is

it possible to do this using gdal_translate or do I need to make use of
gdalwarp as well? My tiff world file needs to look something like this

0.50 0.000 0.000 -0.50 -179.75 36.75

Am I correct in assuming that a suitable proj4 statement might do the 
trick,
wrt assigning projection info and defining rotation? If so can 
someone point
me towards a document explaining the various proj4 declaration 
parameters,

or give me some advice on how to go about getting the data properly
referenced.


Wesley,

I think the easiest approach is to prepare a worldfile representing the
current georeferencing in east-up or west-up orientation.  Then use
gdalwarp to transform it to north up.

  gdalwarp input.tif output.tif

For east up I think the world file might look something like:

0.0
0.5
0.5
0.0
top-left-x
top-left-y

You might need to fiddle around with the orientation a bit to get it
right.

Best regards,


But presumable the pixel sizes (1st  4th) would not be zero?
--

===
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.

65 Main Road, Muizenberg 7945
Western Cape, South Africa.

34° 6'16.35S 18°28'5.62E

Tel: +27-21-7884897  Mobile: +27-83-6004028
Fax: +27-86-6115323 www.geograph.co.za
===



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1498/3510 - Release Date: 03/16/11

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Rotate unreferenced tiff file by -90 degrees

2011-03-17 Thread Frank Warmerdam

On 11-03-17 10:49 AM, Zoltan Szecsei wrote:

For east up I think the world file might look something like:

0.0
0.5
0.5
0.0
top-left-x
top-left-y

You might need to fiddle around with the orientation a bit to get it
right.

Best regards,


But presumable the pixel sizes (1st  4th) would not be zero?


Zoltan,

For east-up or west-up I believe that the 1st and 4th elements in the
world file *should* be zero and the 2nd and 3rd will be the pixel size
though I may be mixed up about the signs.  More detail on the meaning
of the world file is available at:

  http://en.wikipedia.org/wiki/World_file

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev