Is it possible to use pyproj to transform WKT without creating geometry objects such shapely geometry, GEOS geometry or OGR geometry.

If not what is the fastest way to do it?

2 Answers 2


Sure. In that case, you need to transform each point separately. First parse WKT and extract point coordinates, then loop over coordinates and perform transformation like:

import pyproj

srcProj = pyproj.Proj(init='epsg:%i' % epsg_in, preserve_units=True)
dstProj = pyproj.Proj(init='epsg:%i' % epsg_out, preserve_units=True)

x_out,y_out = pyproj.transform(srcProj, dstProj, x_in, y_in)

Also check out Lars Butler's https://github.com/larsbutler/geomet, a pure Python WKT/WKB <-> GeoJSON converter.

  • Yes, I am using it to convert fiona f['geometry'] to WKT. Thank you @sgillies Commented Aug 6, 2014 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.