[gdal-dev] osr transformto error
abhay.menon at gmail.com
Fri Aug 8 11:46:43 EDT 2008
On Fri, Aug 8, 2008 at 9:00 PM, Michael ODonnell <odonnems at yahoo.com> wrote:
> I am trying to run a simple script and the class transformto does not
> appear to be working for me. I have used GDAL before for raster analysis,
> but I have little experience with OSR. Does anyone have any ideas as to why
> this is not working? I have also run a script I found online called
> test_transformation_osr.py and it also produces errors when transforming
> between spatial references. In other words, there seems to be a problem with
> the installation or something was not installed that I should have
> installed. I installed gdal1.5.2 binaries on win32 xp OS system.
> Thanks for the help.
> import osr, ogr
> # CREATE WKT STRING OF POINT COORDS
> sample = (' 776041.000', ' 3386618.000')
> x = sample
> y = sample
> wkt = 'POINT(%s %s)' % (x, y)
> # CREATE PROJECTION OBJECTS
> utm16N = osr.SpatialReference ()
> wgs84 = osr.SpatialReference()
> # CREATE OGR POINT OBJECT, ASSIGN PROJECTION, REPROJECT
> point = ogr.CreateGeometryFromWkt(wkt)
> print wkt
> print point
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Have you setup GDAL_DATA in the environment variable?
Please go through the following link
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev