On 9/18/08, Matthieu Rigal <[EMAIL PROTECTED]> wrote: > Hi all, > Since the method of Create, SetGeoTransform, etc... is "complicated" and > unefficient from a performance point of view, what is the way to quickly add > the GeoTransform, taken from a referenced raster to a raster that have lost > the information.
Matthieu, I assume the approach that is complicated is to create a whole new image with Create(), setting the geotransform on that and then copying over all the image data. is that what you mean? What format of imagery are you working with? There are different limitations on different drivers with regard to updating georeferencing "in place". For for some formats you can just open a dataset in update mode, and call SetGeoTransform() to update the georeferencing. For other formats this is not possible. Some formats support world files with various extensions. For these formats the easiest approach might be to just manually write out a world file. >From the commandline the easiest way is to use gdal_translate and the -a_ullr switch though internally this is of course creating a new dataset and copying everything over. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] 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