s2d2.checking.mapping

Module Contents

Functions

zenit_angle_check(theta)

check if the solar zenit angle is within range

lat_lon_angle_check(lat, lon)

param lat:

latitude

is_crs_an_srs(crs)

is the coordinate reference system given in degrees, or a spatial

correct_geotransform(geoTransform)

check if image information in the form of its size is also provided

s2d2.checking.mapping.zenit_angle_check(theta)[source]

check if the solar zenit angle is within range

Parameters:

theta (np.ndarray, dtype=float, unit=degrees, range=-90...+90) – solar zenith angle

Notes

The angles related to the sun are as follows:

      *                     * sun
^    /                ^    /|
|   /                 |   / | nadir
|-- zenith angle      |  /  v
| /                   | /|
|/                    |/ | elevation angle
└----- surface        └------
s2d2.checking.mapping.lat_lon_angle_check(lat, lon)[source]
Parameters:
  • lat (np.ndarray, dtype=float, unit=degrees, range=-90...+90) – latitude

  • lon (float, unit=degrees, unit=degrees, range=-180...+180) – longitude

Returns:

lat,lon – latitude and longitude

Return type:

float

See also

deg2arg

transform angle to range of -180…+180

s2d2.checking.mapping.is_crs_an_srs(crs)[source]

is the coordinate reference system given in degrees, or a spatial reference system (with a metric scale).

Parameters:

crs (string) – osr.SpatialReference in well known text

Returns:

verdict – is the reference system a mapping system

Return type:

bool

s2d2.checking.mapping.correct_geotransform(geoTransform)[source]

check if image information in the form of its size is also provided

Parameters:

geoTransform (tuple, size={(6,), (8,)}) – affine transformation coefficients.

Returns:

geoTransform – affine transformation coefficients.

Return type:

tuple, size=(8,)