hypso.georeference.coordinate_correction
Module Contents
Functions
|
Start coordinate correction process |
|
Generate the coordinate correction matrix |
|
Correct the coordinates of the latitude and longitude 2D arrays |
- hypso.georeference.coordinate_correction.start_coordinate_correction(points_path, satinfo, proj_metadata, correction_type='affine')
Start coordinate correction process
- Parameters:
points_path (pathlib.Path) – Path of the .points file generated with QGIS software
satinfo (dict) – Dictionary containing capture information
proj_metadata (dict) – Dictionary containing projection metadata of the capture
correction_type (Literal[affine, homography, polynomial, lstsq]) – String with the method out of “affine”, “homography”, polynomial” and “lstsq”
- Returns:
Corrected lat and lon coordinate 2D arrays
- Return type:
Tuple[numpy.ndarray, numpy.ndarray]
- hypso.georeference.coordinate_correction.coordinate_correction_matrix(filename, projection_metadata, correction_type)
Generate the coordinate correction matrix
- Parameters:
filename (pathlib.Path) – Absolute path for the .points file generated with QGIS
projection_metadata (dict) – Dictionary containing projection metadata of hypso capture
correction_type (Literal[affine, homography, polynomial, lstsq]) – String indicating the correction type. Options are “affine”, “homography”, polynomial” and “lstsq”
- Returns:
Dictionary with the correction matrix
- Return type:
dict
- hypso.georeference.coordinate_correction.coordinate_correction(point_file, projection_metadata, originalLat, originalLon, correction_type)
Correct the coordinates of the latitude and longitude 2D arrays
- Parameters:
point_file (pathlib.Path) – Absolute path to the .points file generated with QGIS
projection_metadata (dict) – Dictionary containing the projection information of the capture
originalLat (numpy.ndarray) – 2D latitude array
originalLon (numpy.ndarray) – 2D longitude array
correction_type (Literal[affine, homography, polynomial, lstsq]) – String indicate the correction type. Options are “affine”, “homography”, polynomial” and “lstsq”
- Returns:
The corrected latitude 2D array and the corrected longitude 2D array
- Return type:
Tuple[numpy.ndarray, numpy.ndarray]