[gdal-dev] How to use TransformPoints in python?

Jose Gómez-Dans jgomezdans at gmail.com
Fri Jan 16 09:10:15 EST 2009


Hi,
On Friday 16 January 2009 12:31:01 Hogendoorn, Rene wrote:
> TypeError: in method 'CoordinateTransformation_TransformPoints', argument 3
> of type 'double *'
>
> I also tried straight python lists of doubles.
> So what type of arguments does TransformPoints expect (as there is
> obviously nothing like double* in python)?


I don't know what's up with TransformPoints, I suspect a bug here,  but you 
can do what you want point by point, or by bundling all your points into an 
ogr geometry and the transforming the whole geometry (and you can output it 
as a KML file or whatever). An example with your data is in 
<http://pastebin.com/f686f8e69>

Jose

-- 
Remote Sensing Unit           | Env. Monitoring and Modelling Group
Dept. of Geography            | Dept. of Geography
University College London     | King's College London


More information about the gdal-dev mailing list