Package osgeo :: Module ogr :: Class FieldDefn |
[hide private]
[frames] | no frames]

# Class FieldDefn

source code

Proxy of C++ OGRFieldDefnShadow class

Instance Methods | [hide private]
__repr__(self) | source code
__init__(self, *args, **kwargs) __init__(self, char name_null_ok = "unnamed", OGRFieldType field_type = OFTString) -> FieldDefn | source code
char |
GetName(self) | source code
char |
GetNameRef(self) const char* OGR_Fld_GetNameRef(OGRFieldDefnH hDefn) | source code
SetName(self, *args) SetName(self, char name) | source code
OGRFieldType |
GetType(self) OGRFieldType OGR_Fld_GetType(OGRFieldDefnH hDefn) | source code
SetType(self, *args) SetType(self, OGRFieldType type) | source code
OGRJustification |
GetJustify(self) OGRJustification OGR_Fld_GetJustify(OGRFieldDefnH hDefn) | source code
SetJustify(self, *args) SetJustify(self, OGRJustification justify) | source code
int |
GetWidth(self) int OGR_Fld_GetWidth(OGRFieldDefnH hDefn) | source code
SetWidth(self, *args) SetWidth(self, int width) | source code
int |
GetPrecision(self) int OGR_Fld_GetPrecision(OGRFieldDefnH hDefn) | source code
SetPrecision(self, *args) SetPrecision(self, int precision) | source code
char |
GetTypeName(self) | source code
GetFieldTypeName(self, *args) GetFieldTypeName(self, OGRFieldType type) -> char | source code
int |
IsIgnored(self) int OGR_Fld_IsIgnored(OGRFieldDefnH hDefn) | source code
SetIgnored(self, *args) SetIgnored(self, int bIgnored) | source code
Destroy(self) Once called, self has effectively been destroyed. | source code

Class Variables | [hide private]
| __swig_setmethods__ = `{}`
| __setattr__ = `lambda self, name, value:`
| __swig_getmethods__ = `{}`
| __getattr__ = `lambda self, name:`
| __swig_destroy__ = `_ogr.delete_FieldDefn`
| __del__ = `lambda self:`
| width = `property(GetWidth, SetWidth)`
| type = `property(GetType, SetType)`
| precision = `property(GetPrecision, SetPrecision)`
| name = `property(GetName, SetName)`
| justify = `property(GetJustify, SetJustify)`

Method Details | [hide private]

### GetNameRef(self) | source code
    const char*
    OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)

    Fetch name of this field.

    This function is the same as the CPP method
    OGRFieldDefn::GetNameRef().

    Parameters:
    -----------

    hDefn:  handle to the field definition.

    the name of the field definition.
Returns: char

### SetName(self, *args) | source code
    SetName(self, char name)

    void OGR_Fld_SetName(OGRFieldDefnH
    hDefn, const char *pszName)

    Reset the name of this field.

    This function is the same as the CPP method OGRFieldDefn::SetName().

    Parameters:
    -----------

    hDefn:  handle to the field definition to apply the new name to.

    pszName:  the new name to apply.

### GetType(self) | source code
    OGRFieldType
    OGR_Fld_GetType(OGRFieldDefnH hDefn)

    Fetch type of this field.

    This function is the same as the CPP method OGRFieldDefn::GetType().

    Parameters:
    -----------

    hDefn:  handle to the field definition to get type from.

    field type.
Returns: OGRFieldType

### SetType(self, *args) | source code
    SetType(self, OGRFieldType type)

    void OGR_Fld_SetType(OGRFieldDefnH
    hDefn, OGRFieldType eType)

    Set the type of this field. This should never be done to an
    OGRFieldDefn that is already part of an OGRFeatureDefn.

    This function is the same as the CPP method OGRFieldDefn::SetType().

    Parameters:
    -----------

    hDefn:  handle to the field definition to set type to.

    eType:  the new field type.

### GetJustify(self) | source code
    OGRJustification
    OGR_Fld_GetJustify(OGRFieldDefnH hDefn)

    Get the justification for this field.

    This function is the same as the CPP method
    OGRFieldDefn::GetJustify().

    Parameters:
    -----------

    hDefn:  handle to the field definition to get justification from.

    the justification.
Returns: OGRJustification

### SetJustify(self, *args) | source code
    SetJustify(self, OGRJustification justify)

    void
    OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)

    Set the justification for this field.

    This function is the same as the CPP method
    OGRFieldDefn::SetJustify().

    Parameters:
    -----------

    hDefn:  handle to the field definition to set justification to.

    eJustify:  the new justification.

### GetWidth(self) | source code
    int OGR_Fld_GetWidth(OGRFieldDefnH
    hDefn)

    Get the formatting width for this field.

    This function is the same as the CPP method OGRFieldDefn::GetWidth().

    Parameters:
    -----------

    hDefn:  handle to the field definition to get width from.

    the width, zero means no specified width.
Returns: int

### SetWidth(self, *args) | source code
    SetWidth(self, int width)

    void OGR_Fld_SetWidth(OGRFieldDefnH
    hDefn, int nNewWidth)

    Set the formatting width for this field in characters.

    This function is the same as the CPP method OGRFieldDefn::SetWidth().

    Parameters:
    -----------

    hDefn:  handle to the field definition to set width to.

    nNewWidth:  the new width.

### GetPrecision(self) | source code
    int
    OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)

    Get the formatting precision for this field. This should normally be
    zero for fields of types other than OFTReal.

    This function is the same as the CPP method
    OGRFieldDefn::GetPrecision().

    Parameters:
    -----------

    hDefn:  handle to the field definition to get precision from.

    the precision.
Returns: int

### SetPrecision(self, *args) | source code
    SetPrecision(self, int precision)

    void
    OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)

    Set the formatting precision for this field in characters.

    This should normally be zero for fields of types other than OFTReal.

    This function is the same as the CPP method
    OGRFieldDefn::SetPrecision().

    Parameters:
    -----------

    hDefn:  handle to the field definition to set precision to.

    nPrecision:  the new precision.

### IsIgnored(self) | source code
    int OGR_Fld_IsIgnored(OGRFieldDefnH
    hDefn)

    Return whether this field should be omitted when fetching features.

    This method is the same as the C++ method OGRFieldDefn::IsIgnored().

    Parameters:
    -----------

    hDefn:  handle to the field definition

    ignore state
Returns: int

### SetIgnored(self, *args) | source code
    SetIgnored(self, int bIgnored)

    void
    OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)

    Set whether this field should be omitted when fetching features.

    This method is the same as the C function OGRFieldDefn::SetIgnored().

    Parameters:
    -----------

    hDefn:  handle to the field definition

    ignore:  ignore state

### Destroy(self) | source code
Once called, self has effectively been destroyed. Do not access. For backwards compatiblity only