sepal_ui.mapping.aoi_control.AoiControl#

class sepal_ui.mapping.aoi_control.AoiControl(**kwargs)[source]#

Widget control providing zoom options for the end user.

The developer can add as many gemetries to the widget and the user will simply have to click on them to move to the appropriate AOI.

Parameters:

m (Map | None) – the map on which he AoiControl is displayed to interact with itszoom and center

Attributes

aoi_bounds

the list of bounds to fit on.

aoi_list

the list of ListItem used in the menu.

m

the map on which he AoiControl is displayed to interact with itszoom and center

fullscreen

Either or not the Menu container should be displayed in fullscreen on top of the map

Methods

__init__

Widget control providing zoom options for the end user.

add_aoi

Add an AOI to the list and refresh the list displayed.

click_btn

Zoom to the total area of all AOIs in self.aoi_bounds.

remove_aoi

Remove an item from the self.aoi_bounds dict and from the ListItem.

update_list

Update the ListItem children of the object based on the content of self.aoi_bounds.

zoom

Zoom on the specified bounds.

AoiControl.__init__(m, **kwargs)[source]#

Widget control providing zoom options for the end user.

The developer can add as many gemetries to the widget and the user will simply have to click on them to move to the appropriate AOI.

Parameters:

m (Map) – the map on which he AoiControl is displayed to interact with itszoom and center

Return type:

None

AoiControl.add_aoi(name, item)[source]#

Add an AOI to the list and refresh the list displayed. the AOI will be composed of a name and the bounds of the provided item.

Parameters:
  • name (str) – the name of the AOI

  • item (BaseGeometry | ComputedObject) – the item to use to compute the bounds. It need to be a shapely geometry or an ee object.

Return type:

None

AoiControl.click_btn(*args)[source]#

Zoom to the total area of all AOIs in self.aoi_bounds. Use the whole world if empty.

Return type:

None

AoiControl.remove_aoi(name)[source]#

Remove an item from the self.aoi_bounds dict and from the ListItem. It will raise a KeyError if the name cannot be found.

Parameters:

name (str) – the name of the aoi to remove

Return type:

None

AoiControl.update_list()[source]#

Update the ListItem children of the object based on the content of self.aoi_bounds.

Return type:

None

AoiControl.zoom(widget, *args)[source]#

Zoom on the specified bounds.

Parameters:

widget (VuetifyWidget) – the clicked widget containing the bounds

Return type:

None