(srcFieldDefn, name)
return dstFieldDefn
Clone an existing ogr.FieldDefn with a new name
Clone an existing ogr.FieldDefn with a new name
Clone an existing ogr . FieldDefn with a new name
def clone_shp_field_defn(srcFieldDefn, name):
    """
    Clone an existing ogr.FieldDefn with a new name
    """
    dstFieldDefn = ogr.FieldDefn(name, srcFieldDefn.GetType())
    dstFieldDefn.SetWidth(srcFieldDefn.GetWidth())
    dstFieldDefn.SetPrecision(srcFieldDefn.GetPrecision())

    return dstFieldDefn
def clone_shp_field_defn ( srcFieldDefn , name ) : dstFieldDefn = ogr . FieldDefn ( name , srcFieldDefn . GetType ( ) ) dstFieldDefn . SetWidth ( srcFieldDefn . GetWidth ( ) ) dstFieldDefn . SetPrecision ( srcFieldDefn . GetPrecision ( ) ) return dstFieldDefn