cars.core.roi_tools =================== .. py:module:: cars.core.roi_tools .. autoapi-nested-parse:: This module contains tools for ROI Functions --------- .. autoapisummary:: cars.core.roi_tools.generate_roi_poly_from_inputs cars.core.roi_tools.resample_polygon cars.core.roi_tools.geojson_to_shapely cars.core.roi_tools.parse_roi_file cars.core.roi_tools.bounds_to_poly Module Contents --------------- .. py:function:: generate_roi_poly_from_inputs(roi) Generate ROI polygon from roi inputs :param roi: roi file path or Geojson :type roi: str Or GeoJson Dict :return polygon, polygon epsg :rtype: Tuple(Shapely Polygon, int) .. py:function:: resample_polygon(roi_poly, roi_epsg, resolution=100) Resample input polygon to given resolution. No interpolation is applied. :param roi_poly: input polygon or multipolygon :type roi_poly: Shapely Polygon or MultiPolygon :param roi_epsg: roi epsg :type roi_epsg: int :param resolution: resolution in meter to resample to :type resolution: float :return: resampled polygon :rtype: Shapely Polygon or MultiPolygon .. py:function:: geojson_to_shapely(geojson_dict: dict) Transform Geojson dict to Shapely polygon :param geojson_dict: geojson :type geojson_dict: dict :return: shapely polygon :rtype: Shapely Polygon .. py:function:: parse_roi_file(arg_roi_file: str) -> Tuple[List[float], int] Parse ROI file argument and generate bounding box :param arg_roi_file : ROI file argument :return: ROI Polygon + ROI epsg :rtype: Shapely polygon, int .. py:function:: bounds_to_poly(bounds) Convert bounds to polygon :param bounds: bounds: [xmin, ymin, xmax, ymax] :type: bounds: list :return polygon