[gdal-dev] Get real and turf imaginary from complex float...

Frank Warmerdam warmerdam at pobox.com
Tue Apr 14 17:02:55 EDT 2009


Derek Mueller wrote:
> I am new to gdal and it looks very promising ...but I am trying to make 
> a geotiff with four bands from an RSat-2 SLC image but I don't need or 
> want the imaginary part of the CFloat32 for now.
> 
> So far I have been able to extract the data and warp it to my favourite 
> projection.  Can gdal separate the CFloat32 and save the just real part?
> 
> gdal_translate.exe "RADARSAT_2_CALIB:SIGMA0:product.xml" out.tif
> gdalwarp -s_srs wgs84.prf -t_srs aeaIS.prf -r bilinear out.tif image.tif

Derek,

gdal_translate "RADARSAT_2_CALIB:SIGMA0:product.xml" -ot Float32 out.tif

should be sufficient to discard the imaginary portion.  I'm not aware of any
easy way of taking the magnitude of the data which is also often desirable.

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