sepal_ui.sepalwidgets.inputs.VectorField#
- class sepal_ui.sepalwidgets.inputs.VectorField(**kwargs)[source]#
A custom input widget to load vector data.
The user will provide a vector file compatible with fiona or a GEE feature collection. The user can then select a specific shape by setting column and value fields.
- Parameters:
label (str) – the label of the file input field, default to ‘vector file’.
gee (bool) – whether to use GEE assets or local vectors.
folder – When gee=True, extra args will be used for AssetSelect
kwargs – any parameter from a v.Col. if set, ‘children’ will be overwritten.
Attributes
column_base_items
the column compulsory selector (ALL)
df
the original dataframe without the geometry (for column naming)
feature_collection
the selected featureCollection
gdf
The selected dataframe
original_gdf
The originally selected dataframe
v_model
xx, 'value': xx}
w_column
The Select widget to select the column
w_file
The file selector widget
w_value
The Select widget to select the value in the selected column
Methods
A custom input widget to load vector data.
Return the field to its initial state.
- VectorField.__init__(label='Vector file', gee=False, **kwargs)[source]#
A custom input widget to load vector data.
The user will provide a vector file compatible with fiona or a GEE feature collection. The user can then select a specific shape by setting column and value fields.
- Parameters:
label (str) – the label of the file input field, default to ‘vector file’.
gee (bool) – whether to use GEE assets or local vectors.
folder – When gee=True, extra args will be used for AssetSelect
kwargs – any parameter from a v.Col. if set, ‘children’ will be overwritten.
- Return type:
None