Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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)
share|improve this answer
alright, but parsing and reconstructing WKT is not that easy for multipolygon for instance – Below the Radar Aug 6 '14 at 17:25
you might want to take a look at shapely – Matej Aug 6 '14 at 18:07

Also check out Lars Butler's, a pure Python WKT/WKB <-> GeoJSON converter.

share|improve this answer
Yes, I am using it to convert fiona f['geometry'] to WKT. Thank you @sgillies – Below the Radar Aug 6 '14 at 14:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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