[gdal-dev] python bindings

Robert Denham r.denham at f...
Wed May 2 18:07:22 EDT 2001


Hi gdal-developers,
can someone help me understand how to modify
and
create images using the gdal and gdalnumeric python modules?

I have no trouble reading the files in, but am a bit confused about how to
save changes and close the image.

For example, under gdalnumeric, you can use:

from Numeric import *
import gdalnumeric

array=gdalnumeric.LoadFile("/some/image.tiff")
array2=array*-1

but now I am unsure how to save array2 to a new tiff, but keep or copy the
projection information from "/some/image.tiff".
If I use SaveArray(array2,'/some/newimage.tiff') it doesn't have the same
projection information as image.tiff, and I am not sure how to copy that
information across.

It would be great if someone could fill the last few lines in for me.

Thanks,
Robert


------------------------------------
| Robert Denham |
| School of Mathematical Sciences |
| Queensland University of Technology |
| denham at f... |
------------------------------------






More information about the Gdal-dev mailing list