shareloc.geofunctions.dtm_intersection ====================================== .. py:module:: shareloc.geofunctions.dtm_intersection .. autoapi-nested-parse:: This module contains the DTMIntersection class to handle DTM intersection. Classes ------- .. autoapisummary:: shareloc.geofunctions.dtm_intersection.DTMIntersection Module Contents --------------- .. py:class:: DTMIntersection(dtm_image_epsg, dtm_image_alt_data, dtm_image_nb_rows, dtm_image_nb_columns, dtm_image_transform) DTMIntersection class dedicated to earth elevation handling with a DTM we work in cell convention [0,0] is the first cell center (not [0.5,0.5]) .. py:attribute:: origin_x :value: None .. py:attribute:: origin_y :value: None .. py:attribute:: pixel_size_x :value: None .. py:attribute:: pixel_size_y :value: None .. py:attribute:: alt_min_cell :value: None .. py:attribute:: alt_max_cell :value: None .. py:attribute:: tol_z :value: 0.0001 .. py:attribute:: epsg .. py:attribute:: alt_data .. py:attribute:: alt_max .. py:attribute:: alt_min .. py:attribute:: plane_coef_a .. py:attribute:: plane_coef_b .. py:attribute:: plane_coef_c .. py:attribute:: plane_coef_d .. py:attribute:: plans .. py:attribute:: trans_inv .. py:attribute:: transform .. py:attribute:: nb_rows .. py:attribute:: nb_columns .. py:method:: eq_plan(i, position) return evaluation of equation on a plane on DTM cube :param i: face index :type i: int :param position: position :type position: numpy.array (1x3) :return: evaluation on the plan :rtype: float .. py:method:: ter_to_index(vect_ter) terrain to index conversion :param vect_ter: terrain coordinate (lon,lat) :type vect_ter: array (1x2 or 1x3) if dimension is 3 , last coordinate is unchanged (alt) :return: index coordinates (col,row) :rtype: array (1x2 or 1x3) .. py:method:: ters_to_indexs(vect_ters) terrain to index conversion :param vect_ters: terrain coordinates :type vect_ters: array (nx2 or nx3) if dimension is 3 , last coordinates is unchanged (alt) :return: index coordinates :rtype: array (nx2 or nx3) .. py:method:: index_to_ter(vect_dtm) index to terrain conversion :param vect_dtm: index coordinate (col,row) :type vect_dtm: array (1x2 or 1x3) if dimension is 3 , last coordinate is unchanged (alt) :return: terrain coordinates (lon,lat) :rtype: array (1x2 or 1x3) .. py:method:: get_footprint_corners() get_footprint_corners method :return: footrpint corners of dtm :rtype: np.ndarray(4x2) top_left, top_right, bottom_right, bottom_left .. py:method:: interpolate(pos_row, pos_col) interpolate altitude if interpolation is done outside DTM the penultimate index is used (or first if d is negative). :param pos_row: cell position row :type pos_row: float :param pos_col: cell position col :type pos_col: float :return: interpolated altitude :rtype: float .. py:method:: init_min_max() initialize min/max at each dtm cell .. py:method:: intersect_dtm_cube(los) DTM cube intersection :param los: line of sight :type los: numpy.array :return: intersection information (an intersection has been found ?, (lon,lat) of dtm position, altitude, line of sight in index frame) :rtype: tuple (bool, numpy.array, float, numpy.array) .. py:method:: intersection(los_index, point_b, h_intersect) DTM intersection :param los_index: line of sight in index frame :type los_index: numpy.array :param point_b: position of intersection in DTM cube in index frame :type point_b: numpy.array :param h_intersect: altitude in DTM cube :type h_intersect: float :return: intersection information (True,an intersection has been found ?, position of intersection) :rtype: tuple (bool, numpy.array) .. py:method:: intersection_n_los_dtm(los) Compute intersection of los on dtm :param los: los extrema of los to intersect with dtm :type los: numpy.ndarray 3D dimension with (points_nb,nb_alt,3) shape :return: ground position (lon,lat,h) in dtm coordinates system :rtype: numpy.ndarray 2D dimension with (points_nb,3) shape .. py:method:: get_alt_min() .. py:method:: get_alt_max() .. py:method:: get_epsg() .. py:method:: get_transform()