'Transform this geometry to a different spatial reference system.
May take a CoordTransform object, a SpatialReference object, string
WKT or PROJ.4, and/or an integer SRID.  By default, return nothing
and transform the geometry in-place. However, if the `clone` keyword is
set, return a transformed clone of this geometry.'

def transform(self, coord_trans, clone=False):

    if clone:
        klone = self.clone()
        klone.transform(coord_trans)
        return klone
    if isinstance(coord_trans, CoordTransform):
        capi.geom_transform(self.ptr, coord_trans.ptr)
    elif isinstance(coord_trans, SpatialReference):
        capi.geom_transform_to(self.ptr, coord_trans.ptr)
    elif isinstance(coord_trans, (int, str)):
        sr = SpatialReference(coord_trans)
        capi.geom_transform_to(self.ptr, sr.ptr)
    else:
        raise TypeError('Transform    only    accepts    CoordTransform,    SpatialReference,    string,    and    integer    objects.')
