[gdal-dev] Proper input for TransformPoint

Jamie Adams jaadfoo at gmail.com
Fri Oct 23 17:20:38 EDT 2009

I have it working for KML output like this:

*projection = dataset.GetProjection()*

*in_projection = osr.SpatialReference()
out_projection = osr.SpatialReference()

coortran = osr.CoordinateTransformation(in_projection, out_projection)

(x_out, y_out, z_out) = coortran.TransformPoint(x_coor, y_coor)*

Even though there is no z input in the transform, it will bail with
"ValueError: too many values to unpack" if you don't include it.

- Jamie

On Fri, Oct 23, 2009 at 1:57 PM, Mano Marks <mmarks at google.com> wrote:

> Developing in Python, I've tried a number of inputs for
> TransformPoint, and can't seem to figure out how to get this right.
> And web searches reveal several people asking similar questions
> without an answer. Anyone?
> Here's the error I get:
> NotImplementedError: Wrong number of arguments for overloaded function
> 'Coordina
> teTransformation_TransformPoint'.
>  Possible C/C++ prototypes are:
>    TransformPoint(double [3])
>    TransformPoint(double [3],double,double,double)
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091023/e271374b/attachment.html

More information about the gdal-dev mailing list