load_rois#

movement.roi.load_rois(file)[source]#

Load a collection of regions of interest (RoIs) from a GeoJSON file.

Parameters:

file (str | Path) – Path to the GeoJSON file to load.

Returns:

The loaded regions of interest.

Return type:

list[LineOfInterest | PolygonOfInterest]

See also

save_rois

Save a collection of RoIs to a GeoJSON file.

Examples

Load a collection of RoIs from a GeoJSON file and inspect their names:

>>> from movement.roi import load_rois
>>> rois = load_rois("/path/to/rois.geojson")
>>> # rois is a list of RoI objects
>>> [roi.name for roi in rois]
["square", "diagonal"]

Examples using load_rois#

Compute distances and angles to regions of interest

Compute distances and angles to regions of interest