SOLVIEWZAZ

Solar and sensor view angles.


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Acknowledgements :: References :: Related

Back to top

Description


Derive per-pixel solar and sensor view zenith and azimuth angles.
Back to top

Parameters


Name Type Length Value range
Input:Input Data to calculate angles* String 1 -    
Output:Output angle layers* String 1 -    
Ouput type String 0 - 1 16S| 32R
Default: 16S

* Required parameter
Back to top

Parameter descriptions

Input:Input Data to calculate angles

Specifies the name of the input file that contains the satellite image. The image should have sufficient metadata to derive the sensor name, product type, and the positions of image center and its four corners, and time of their acquisition.

The supported data are Sentinel-2 Level-1C and Level-2A images and Landsat-8 Level 1TP images. A number of pushbroom sensors in the image acquisition geometry is also supported, provided their file-level metadata include the satellite ephemeris information (state vectors), and the time of the first and last line. The FILI must have all channels at the same resolution.

Output:Output angle layers

Specifies the name of the output file to receive the synthesized per-pixel solar and sensor viewing angle channels. The output file must not exist. The output file will be created with the sensor-dependent number of channels for the solar and sensor view zenith and azimuth angles. All channels will be of the type specified by the CHNTYPE parameter.

For Sentinel-2 images the derived output channels are, in order:
For Landsat-8 images there are four output channels per each band on FILI:
The generic pushbroom images are idealized as having a single straight line of detectors in the focal plane, common to all spectral bands. For such sensors the derived angles apply to all bands of the image. The output channels contain, in order:

Input channels on FILI that are not recognized as spectral bands, such as Landst-8 Quality channel, are omitted from processing.

All angles are measured in degrees relative to the current point on the ground. The zenith angle is measured between the ground-to-zenith direction and ground-to-sun or ground-to-satellite directions. It can vary from 0 to 180 degrees, with zero degrees measured when the sun or satellite is directly above the observed ground position. The azimuth angle is the angle between the ground-to-North direction and the ground-to-sun or ground-to-satellite directions. It can vary from -180 to 180 degrees, with zero degrees measured when the sun or satellite is directly to the North of the observed ground position, 90 degrees if the sun or satellite is to the East of the observed ground position, -90 degrees if the sun or satellite is to the West of the observed ground position.

Ouput type

Specifies the type of the channels to contain the synthesized angle values. All channels will be of the same type.

The supported values are:
For the 16S channels the linear transformation coefficients are stored in each channel metadata tags "offset" and "scaleFactor". Angle values for a given channel are calculated as:
                            Angle = (pixel value) * scaleFactor + offset
                        

Each channel also receives a metadata tag MeanAngle, with the value in degrees averaged for all valid pixels. For azimuth channels the averaging takes into account the transitions between angles close to the due south direction (from 180 to -180 degrees). If there are no valid angles in the channel, MeanAngle is set to the no-data value of the channel.

Note that the mean value of sensor azimuth may be not informative for images acquired with close-to-nadir viewing geometry. For such images the sensor azimuth angle exhibits large variability or even opposing directions along image lines.

Back to top

Details

SOLVIEWZAZ calculates the solar and satellite viewing angles (zenith angle and azimuth) for every pixel in the image.

The zenith angle is measured between the vector pointing straight up from the pixel ground location, and the direction to the sun or the satellite. The direction up has the angle of 0 degrees; the direction tangent to the nominal Earth surface has the zenith angle of 90 degrees.

The azimuth angle is measured between the vector pointing directly North from the pixel ground location, and the ground projection of the direction to the sun or the satellite. The direction due North has the azimuth of 0 degrees; the direction due East has the azimuth of 90 degrees, due South has the azimuth of 180 degrees, and due West has the azimuth of -90 degrees. The azimuth angles are stored in the [-180, 180] degrees range. Note that data stored in the 16S channels may yield values slightly outside the original range due to rounding errors. They should be clipped to be within the original range before their further use in computations.

The angles are computed differently for the different supported sensors:

Sentinel-2

Sentinel-2 Level-1C and Level-2A data provide grids of the angles for all bands and sensing elements. The information must be available in a text segment, stored by default by the PCI data import process. If the required text segment is not detected in the input file, the process aborts with error.

The per-pixel solar angles are derived by bilinear interpolation of the provided gridded values, and extrapolating them towards the upper and left image margins. The single pair of solar angles applies to all bands in the input image.

The sensor angles are computed separately for each band. The provided gridded values are averaged for a current band over all detectors, and then the per-pixel angles are created by bilinear interpolation and extrapolation of the averaged values. The averaging and interpolation process is designed to properly handle transitions between the 360 and 0 degree and 180 and -180 degree azimuth angles.

If any of the provided gridded values has no data, the pixels corresponding to this grid cell are set to no data values. If two grid values are provided at the same location, they are averaged before interpolation.

Landsat-8

Landsat-8 data provide parameters in the "Solar Illumination and Sensor Viewing Angle Coefficient File" for derivation of the per-band solar and sensor view angles. The file is ingested by default during the PCI data import process, and stored in a text segment. If the required text segment is not detected in the input file, the process aborts with error.

The per-pixel solar and sensor angles are derived by setting up and executing the Landsat Angles Creation Tools (l8_angles) executable. It is built from the code provided by the USGS, and included in PCI distribution. The computed angles are ingested, adjusted if necessary, and then copied to the corresponding channels of FILO. The intermediate l8_angles results are deleted from the temporary directory.

Some Landsat-8 results have unprocessed (zero-valued) pixels on the left and right image margins, immediately adjacent to the no-data areas. Such pixels are set to no-data values on ingest.

The l8_angles executable creates a log file l8_angle_run.LOG in the directory where SOLVIEWZAZ runs. If the run is successful, the log file is deleted. However, if the run of l8_angles or SOLVIEWZAZ fails, the log file is retained for examination of the underlying problems.

Generic pushbroom sensors

The angles for pushbroom sensors are computed from the ground location and time of acquisition of every pixel, and the positions of the Sun and the satellite at that time. If the image has a math model segment, it is used to transform from the image to ground coordinates. Otherwise the nominal georeferencing of FILI is used for this purpose.

To process the pushbroom sensor images, FILI must have the following file-level metadata tags: These tags are mandatory, and the process aborts with error if any of them is absent.

The code also checks the tag NominalLocation_Height. If it is found, its value is used in computations. Otherwise the terrain height is assumed to be 0 for all pixels.

The module reports its processing parameters, image bands selected for processing, and the statistics of the computed values for all output channels. Note that if the azimuth angles cluster around the -180/180 boundary, the displayed average value properly accounts for the transition, and may be different from the mean value shown in the Histogram with Statistics panel.

Back to top

Acknowledgements

The Landsat-8 angles are computed by the Landsat Angles Creation Tools, as described at https://landsat.usgs.gov/solar-illumination-and-sensor-viewing-angle-coefficient-file.

The currently implemented version is downloaded from https://landsat.usgs.gov/sites/default/files/documents/L8_ANGLES_2_7_0.tgz.

Back to top

References

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.