ValidROICollectionGeoJSON#
- class movement.validators.files.ValidROICollectionGeoJSON(file)[source]#
Bases:
objectClass for validating GeoJSON FeatureCollection files.
The validator ensures that the file:
is well-formed JSON.
conforms to the RoI Collection GeoJSON schema, which checks that the file contains a GeoJSON FeatureCollection containing
movement-compatible regions of interest (as produced bysave_rois()).
Additionally, it performs a custom validation step to ensure that each Feature’s
roi_typeproperty is consistent with its geometry type (e.g. “PolygonOfInterest” must have geometry type “Polygon”).- file#
Path to the GeoJSON file.
- data#
Parsed JSON data from the file.
- Raises:
ValueError – If the file is not valid JSON or does not match the expected schema.
TypeError – If
roi_typeproperty does not match the actual geometry type.
See also
movement.roi.save_roisSave a collection of RoIs to a GeoJSON file.
movement.roi.load_roisLoad a collection of RoIs from a GeoJSON file.