[gdal-dev] Fastest way to add the GeoTransform to a raster file with Python
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. Best regards, Matthieu -- Matthieu Rigal Product Development RapidEye AG Tel: +49-(0)3381-89 04 331 Molkenmarkt 30 Fax: +49-(0)3381-89 04 101 14776 Brandenburg/Havel Germany http://www.rapideye.de RapidEye AG Molkenmarkt 30 14776 Brandenburg an der Havel Germany Head Office/Sitz der Gesellschaft: Brandenburg an der Havel Management Board/Vorstand: Wolfgang G. Biedermann Chairman of Supervisory Board/Vorsitzender des Aufsichtsrates: Axel Schmalz Commercial Register/Handelsregister Potsdam HRB 17 796 Tax Number/Steuernummer: 048/100/00053 VAT-Ident-Number/Ust.-ID: DE 199331235 DIN EN ISO 9001 certified * Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet. The information in this e-mail is intended for the named recipients only. It may contain privileged and confidential information. If you have received this communication in error, any use, copying or dissemination of its contents is strictly prohibited. Please erase all copies of the message along with any included attachments and notify RapidEye AG or the sender immediately by telephone at the number indicated on this page. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Fastest way to add the GeoTransform to a raster file with Python
Frank, ---Original Message--- From: Frank Warmerdam [EMAIL PROTECTED] Subject: Re: [gdal-dev] Fastest way to add the GeoTransform to a raster file with Python Sent: Sep 18 '08 16:09 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. Wouldn't be fair to say that some formats also requires a call to FlushCache() afterwards? 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 Best regards, Ivan ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Fastest way to add the GeoTransform to a raster file with Python
On 9/18/08, Lucena, Ivan [EMAIL PROTECTED] wrote: Frank, ... Wouldn't be fair to say that some formats also requires a call to FlushCache() afterwards? Ivan, FlushCache may help push the updated geotransform out to the file immediately for some formats. But if you are just going to close the dataset then that should already do the equivelent of a FlushCache(). So, FlushCache() is only of use to try and push updates out to a file without closing the file. Whether it is implemented or not varies from driver to driver. 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