pysepal.sepalwidgets.inputs.VectorField#
- class pysepal.sepalwidgets.inputs.VectorField(*args, **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
gee_session (EESession | None) – the Earth Engine session to use (deprecated in favor of gee_interface)
gee_interface (GEEInterface | None) – a shared GEEInterface instance. If provided, takes precedence over gee_session
kwargs – any parameter from a v.Col. if set, ‘children’ will be overwritten.
- Raises:
ValueError – if both gee_session and gee_interface are provided
Added in version 3.0.0: Added gee_interface parameter for sharing GEEInterface instances across components.
Attributes
column_base_itemsthe column compulsory selector (ALL)
dfthe original dataframe without the geometry (for column naming)
feature_collectionthe selected featureCollection
gdfThe selected dataframe
original_gdfThe originally selected dataframe
v_modelxx, 'value': xx}
w_columnThe Select widget to select the column
w_fileThe file selector widget
w_valueThe Select widget to select the value in the selected column
Methods
- VectorField.__init__(label='Vector file', gee=False, gee_session=None, gee_interface=None, **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
gee_session (EESession | None) – the Earth Engine session to use (deprecated in favor of gee_interface)
gee_interface (GEEInterface | None) – a shared GEEInterface instance. If provided, takes precedence over gee_session
kwargs – any parameter from a v.Col. if set, ‘children’ will be overwritten.
- Raises:
ValueError – if both gee_session and gee_interface are provided
- Return type:
None
Added in version 3.0.0: Added gee_interface parameter for sharing GEEInterface instances across components.