Experimental
Adds a new attribute field with an optional default value.
vector schema attributes
| Name | Description | Required | Default |
|---|---|---|---|
input | Input vector layer. | Required | input.shp |
field | New field name. | Required | NEW_FIELD |
field_type | Field type: integer, float, text, boolean. | Required | float |
default | Optional default value. | Optional | — |
output | Output vector path. | Required | — |
Adds a typed field to the layer schema.
wbe.add_field(default=0.0, field='NEW_FIELD', field_type='float', input='input.shp', output='add_field.shp')