aws.osml.photogrammetry.gdal_sensor_model module
- class aws.osml.photogrammetry.gdal_sensor_model.GDALAffineSensorModel(geo_transform: List, proj_wkt: str | None = None)[source]
Bases:
SensorModel
GDAL provides a simple affine transform used to convert XY pixel values to longitude, latitude. See https://gdal.org/tutorials/geotransforms_tut.html
transform[0] x-coordinate of the upper-left corner of the upper-left pixel. transform[1] w-e pixel resolution / pixel width. transform[2] row rotation (typically zero). transform[3] y-coordinate of the upper-left corner of the upper-left pixel. transform[4] column rotation (typically zero). transform[5] n-s pixel resolution / pixel height (negative value for a north-up image).
The necessary transform matrix can be obtained from a dataset using the GetGeoTransform() operation.
- image_to_world(image_coordinate: ImageCoordinate, elevation_model: ElevationModel | None = None, options: Dict[str, Any] | None = None) GeodeticWorldCoordinate [source]
This function returns the longitude, latitude, elevation world coordinate associated with the x, y coordinate of any pixel in the image. The GDAL Geo Transforms do not provide any information about elevation, so it will always be 0.0 unless the optional elevation model is provided.
- Parameters:
image_coordinate – the x, y image coordinate
elevation_model – an optional elevation model used to transform the coordinate
options – an optional dictionary of hints, does not support any hints
- Returns:
the longitude, latitude, elevation world coordinate
- world_to_image(world_coordinate: GeodeticWorldCoordinate) ImageCoordinate [source]
This function returns the x, y image coordinate associated with a given longitude, latitude, elevation world coordinate.
- Parameters:
world_coordinate – the longitude, latitude, elevation world coordinate
- Returns:
the x, y image coordinate