[Gdal-dev] How to get the affine information

=?GBK?B?yfK98M/p?= shenjinx at 126.com
Sun Sep 30 12:26:23 EDT 2007


Hello ,everyone:     It is my first time here,and i am very happy to share all kinds of information here! I am a gdal newer ,now i have a problem need your help.    I have an image and it format is erdas image(.img),when i open it with erdas,i can see the image information as follow:              upper Left X:565946.1197      upper Left Y:4439207.688       Lower Left X:351363.3907      upper Left Y:3363647.278       pixel sizeX:N/A               pixel Size Y:N/A       unit:meters                  Geo model:Affine    Now ,i want to get it affine parameters with gdal function GetGeotransform with python,but this image haven't such function. i use the Open Function open the image ,and dir()function to view its function ,but i just looked the following information: >>> da=gdal.Open("d:\input\aa.img")
>>> dir(da)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__'] On the other hand,i try another image with the same course,the result as following: >>> da=gdal.Open("d:\output\yy.img")
>>> dir(da)
['AddBand', 'AdviseRead', 'BuildOverviews', 'FlushCache', 'GetDescription', 'GetDriver', 'GetGCPCount', 'GetGCPProjection', 'GetGCPs', 'GetGeoTransform', 'GetMetadata', 'GetProjection', 'GetProjectionRef', 'GetRasterBand', 'GetSubDatasets', 'RasterCount', 'RasterXSize', 'RasterYSize', 'ReadAsArray', 'ReadRaster', 'RefreshBandInfo', 'SetDescription', 'SetGCPs', 'SetGeoTransform', 'SetMetadata', 'SetProjection', 'WriteRaster', '__del__', '__doc__', '__init__', '__module__', '_band', '_o'] I am so wonder what the matter of this,and if one of you ever met such problem or known it ,can you tell me in detailed, and i am very grateful!     Thank you for your attention!                                                                                                                                                                                                               Jinxiang Shen               
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20071001/26182105/attachment.html


More information about the Gdal-dev mailing list