#!/usr/bin/env python3 ## @file # # @brief Scene API definitions. # # @history # - Alex Ken (alexander.ken@noaa.gov), Mar 2019, initial version # # @ingroup PyAPI import _sapf_api from enum import IntEnum class Dim(IntEnum): """Dimensions.""" COLUMN = -1, ROW = -2, PLANE = -3, TIME = -4 def cur_seg(): """Get segment ID.""" return _sapf_api._scn_cur_seg() def num_seg(): """Get number of segment.""" return _sapf_api._scn_num_seg() def resolutions(): """Get list of available resolutions.""" return _sapf_api._scn_resolutions() def dims_for_res(resId): """Get list of available dimensions for a resolutions.""" return tuple(Dim(i) for i in _sapf_api._scn_dims_for_res(resId)) def file_ctx(resId, dim): """Get file context for the resolution and dimension.""" return _sapf_api._scn_file_ctx(resId, dim) def input_ctx(resId, dim): """Get input context for the resolution and dimension.""" return _sapf_api._scn_input_ctx(resId, dim) def uri_input_ctx(uri, dim): """Get input context for the URI and dimension.""" return _sapf_api._scn_uri_input_ctx(uri, dim) def uri_cur_seg_ctx(uri, dim): """Get segment context in input coordinates system for the URI and dimension.""" return _sapf_api._scn_uri_cur_seg_ctx(uri, dim) def cur_seg_ctx(resId, dim): """Get segment context in input coordinates system for the resolution and dimension.""" return _sapf_api._scn_cur_seg_ctx(resId, dim) def seg_ctx(resId, dim, segNum): """Get segment context in input coordinates system for the resolution, dimension, and segment number.""" return _sapf_api._scn_seg_ctx(resId, dim, segNum)