<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008>Hello. I am
using GDAL/OGR with Python (2.5) bindings. I am wondering if there are any
ready examples that demonstrate the correct process for reprojecting a
geometry. I am iterating through features coming from a shapefile, and the
relevant code I have so far looks similar to this...</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578464418-15052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008>input_ds =
self.get_driver().Open(r'C:/path/to/my/shapefile.shp')<BR>input_layer =
input_ds.GetLayer(0)<BR>input_feature = input_layer.GetNextFeature()<BR>while
input_feature is not None:<BR> geometry =
input_feature.GetGeometryRef()
<BR> print geometry.ExportToWkt() # Looks like
good WKT! Hooray!</SPAN></FONT></DIV><FONT><SPAN
class=578464418-15052008>
<DIV><SPAN class=578464418-15052008></SPAN><FONT face=Arial size=2> <SPAN
class=578464418-15052008> #</SPAN><BR> # At this
point, I seem to have the geometry... but I need to<BR> #
reproject it to WGS-84. </FONT></DIV>
<DIV></SPAN></FONT><SPAN class=578464418-15052008><FONT face=Arial
size=2> #</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008> #
...then I do some other stuff (destroying the feature, moving to the next one,
etc.)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578464418-15052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008>I have found
discussion of creating spatial references in the documentation and I have the
idea that I can create a spatial reference simply enough using the
osr.SpatialReference class and SetWellKnownGeogCS( "WGS84" ). However, I'm
unsure how to use it once I have it. Is it possible for me to do
this?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578464418-15052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008>Any examples or
links to more detailed discussion or documentation would be immensely helpful to
me.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578464418-15052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008>Many
thanks.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578464418-15052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578464418-15052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=578464418-15052008><FONT size=2>
<P align=left></FONT><FONT
size=2> </P></FONT></SPAN></FONT></DIV></BODY></HTML>