Chapter 7 Geometric Corrections 7.1 gcpmatch Command name gcpmatch [-options] Nnyymddhh … Options -O <dir> -P <dir> -R <dir> -C <dir> -D <dir> -G <dir> -B <dir> -M <dir> specify the directory holding the GCP matching image file specify the directory holding the parameter file specify the directory holding the pre-data file specify the directory holding the control file specify the directory holding the coastline data file specify the directory holding the GCP position data file specify the directory holding the orbital element file specify the output directory to store the results of the GCP matching Environment variables PANDAWORKDIR file) PANDAIMAGEDIR PANDACOASTDIR PANDAGCPDIR (parameter file, control file, orbital element file, pre-data file, and GCP matching result (GCP matching image file) (coastline data file) (GCP position data file) Descriptions GCP matching is carried out. Reference directory Input/output files get access to the files under the directory specified by the options. When no options are specified, files in the directory specified by the environmental variables get accessed instead. When neither option nor environment variable is specified, the files in the current directory are accessed. Input files Nnyymddhh.pam Nnyymddhh.cnt Nnyymddhh.pre Nnyymddhh.obt Nnyymddhh.GCP NnyymddhhHGCP coastal.gcp gcpll.fil parameter file control file pre-data file orbital elements file GCP matching image file GCP matching image header file coastline data file GCP position data file Output files Nnyymddhh.gcp file contains the results of the GCP matching Flow chart Start - Select blocks that contain GCPs under consideration - Extract GCPs under consideration from each block Select matching area centered around each GCP - Remove noise and clouds from the area to be matched (create masks) - Extract coastlines from the matching area - Transfer coastlines for matching onto the original image - Select GCPs for each block - End. Error messages 7.2 getorbit Command name getorbit [-options] Nnyymddhh … Options -A <dir> -O <dir> specify the directory storing the orbital information database file specify the output directory to store the orbital element file Environment variables PANDAWORKDIR PANDAORBITDIR (orbital element file) (orbital information database file) Descriptions Search the orbital information database file for the orbital elements computed for some specified time and write to the orbital element file. Reference directory Input/output files get access to the files under the directory specified by the options. When no options are specified, files in the directory specified by the environmental variables get accessed instead. When neither option nor environment variable is specified, the files in the current directory are accessed. Input files orbit.fil orbital information database file Output files Nnyymddhh.obt orbital element file Error messages 7.3 bandle5 Descriptions Estimate the position and attitude of the satellite using collinearity conditions applied in the photogrametry, Program structures MAIN --- ORIENT --| --- HEADER READIN (Subroutines and their descriptions) ANGL compute coefficients of the orientation element polynomials BTWB compute TW CHLSKY solve *** equations using Cholesky method and compute errors in orientation elements COEFOE evaluate the coefficient matrix (, , F) of the collinearity equations COROUT print out a table of the orientation element correlation CORREL compute correlation coefficients of the orientation elements DEGDMS convert from degrees to (degrees, minutes, and seconds) DMSDEG convert from (degrees, minutes, and seconds) to degrees DXYZ compute measurement errors in the ground coordinates ECRBLH versa HEADER INVERT INVRT3 MJDMK MTIME NORMAL OBJVXY ORBIT ORIENT ORIMAT ORTHOG OUTPUT PANDQ READIN SORTNG TRACE transform the earth fixed coordinate system into the longitude latitude coordinate system and vice read in the program title and control data for the orientation computation compute a inverse matrix of the coefficient matrix in the *** equation compute a inverse of 3 x 3 matrix compute Modified Julian Date from the pre-data compute ephemeris time Form a coefficient matrix from *** Print out the residual of the measured points on the image and the ground and compute*** read in the orbital information compute orientations compute a orientation matrix for each line compute coefficients of polynomials for all the image points output the title for the printout compute TW and (TW) (TW)-1 read in the ground control points, image point data, and orbital information etc. sort the image points according to their numbers create a ground coordinate file Input data limits Maximum number of images Maximum number of image data Maximum number of ground control points Maximum unknown variables 1 scene 100 100 100 Input files Control file for orientation computation Control file for unknown variables Temporary file -- Default values included Ground Control point file Image point data file Orbital element file Pre-data file Image header file Control file Parameter file Scheduling file -- Automatically generated Output files Final orientation element file Ground coordinate file (per 16 lines, 32 pixels) Input parameters and file descriptions We will describe each of the input files (underlined are default values) in this section. Note that when you use the GCPs you obtained, you would need to modify the ground control point file and image point data file, however, it is generally not necessary to modify the rest of the files. (A) Contents of the control file for orientation computation <Input parameters> 1st data: Orientation computation title TITLE (format; A70) 2nd data: Number of iterations for the orientation computation (MIN, MAX) and types of the orientation elements. MINITR Minimum iteration number which is in general 3. MAXITR Maximum iteration number which is in general 12. NPAR Number of orientation elements (fixed at 7). 3rd data: Control parameter data for the orientation computation and convergence limit and *** KONTRL, EPSIT, EPSEP (format; ) <KONTRL>; Control parameter for the orientation computation. KONTRL(1) Set the order of unknowns in the orientation elements (fixed at 3)??*** (1 = constant, 2 = 1st, 3 = 2nd, …) KONTRL(2) Spare. KONTRL(3) Spare. KONTRL(4) Orbital element setting up codes = 0 indicating 1day data is used to interpolate; =1 indicating 2 days of data. KONTRL(5) Residual testing codes for the orientation elements entered = 0 indicates no residual testing; = 1 indicates testing. KONTRL(6) - (11) Spares. KONTRL(12) Coefficient output codes for normal equations = 0 indicates no output; = 1 indicates output. KONTRL(13) Output codes for the iteration of orientation computation (1 - 5). The larger the number, the more precise the output content becomes. KONTRL(14) Output codes for the initial estimate of the ground coordinates = 0 indicates no output; = 1 indicates output. KONTRL(15) Output codes for divergence, ***matrices = 0 indicates no output; = 1 indicates output. KONTRL(16) *** the orientation elements = 0 indicates no action; = 1 computes the standard deviation of the orientation KONTRL(17) Output codes for the final results of GCP residuals computed for the image and elements. the ground = 0 indicates no output; = 1 indicates output. KONTRL(18) *** the ground coordinates = 0 indicates no output; = 1 computes the standard deviation about the control points; = 2 computes the standard deviation about all the measured points. <EPSIT>; <EPSEP>; 4th data: KONTRL(19) Output codes for correlation table about the orientation elements = 0 indicates no output; = 1 indicates output. KONTRL(20) Correction code for the ground coordinates (fixed at 0) = 0 indicates no correction (when they are all control points). Convergence limit for the iterative computation of the unit weight < = EPSIT then we assume the convergence. Normally, EPSIT = 0.00001. Maximum value *** Normally, EPSET = 0.100 (unit mm), EPSET = 5.000 (unit pixel). Convergence limit for each of the orientation elements PLMT (format; 9F8.0). PLMT (1) Convergence limit given to a (=0.001) unit km PLMT (2) Convergence limit given to e (=0.000001) dimensionless PLMT (3) Convergence limit given to M (=0.000001) unit radian PLMT (4) PLMT (5) PLMT (6) PLMT (6) PLMT (8) PLMT (9) 5th data: Convergence limit given to (=0.000001) unit radian Convergence limit given to i (=0.000001) unit radian Convergence limit given to w (=0.001) unit radian Convergence limit given to (=0.001) unit radian Convergence limit given to (=0.001) unit radian – never been used Convergence limit given to (=0.001) unit radian –never been used Standard deviation of computational errors. RERRIC Standard deviation of measurement errors about image point data (about 1 pixel ~ 1.5 pixel). RERRXY RERRZ Standard deviation of ground coordinate (X, Y) measurement errors. Relative to the topographical map scale used in the measurement Standard deviation of ground coordinate (Z) measurement errors Relative to the interval of contour lines on a topographical map used in the measurement (B) Descriptions of the unknown variable control file <Input parameters and data> 1st data: Calibration code for orientation elements used in orientation computations. Set the order of unknowns in the orientation elements (this has precedence over KONTRL(1)). 2nd data: Calibration code used in the orientation computation of orientation elements. Number of unknowns. Calibration code used in the orientation computation of the orientation element, a. Will be specified in the order of constant, first order, second order, and third order. = 0 no calibration (use an initially estimated value); = 1 do calibration (set orientation elements to be unknowns) IOBJ (6) – (9) IOBJ (10) – (13) IOBJ (14) – (17) IOBJ (18) – (21) IOBJ (22) – (25) IOBJ (26) – (29) IOBJ (30) – (33) IOBJ (34) – (37) Calibration code for the orientation element e Calibration code for the orientation element M. Calibration code for the orientation element . Calibration code for the orientation element i. Calibration code for the orientation element w. Calibration code for the orientation element . Calibration code for the orientation element . Calibration code for the orientation element . (C) Descriptions of the ground control point file <Input parameters and data> 1st data: Parameter code for the coordinate transformation of the ground coordinated values. = 0 no coordinate transformations; = 1 Transform the latitude longitude coordinate system to the earth fixed coordinate system. Orientation computation is carried out using the earth fixed coordinate system. When ISYS = 1, the following parameters must be specified. JCODE IES Earth fixed coordinate system code Earth oblateness code (refer to the table below) Table Earth oblateness code list 2nd data: JPN JCD Input of the coordinate of the ground control points and weights Ground control point names Control point codes Control point coordinates Control point weights (D) Descriptions of the image point data file <Input parameters and data> 1st data: Orbit number (fixed at 1) 2nd data: Image point data (E) Control file data required IMAGEDIR: directory where the image data is stored GEODIR: directory that contains geofiles (F) Parameter file data required GCP: use of GCPs = 0; do not use GCPs = 1; use GCPs (G) Scheduling file data required Rsmpl4: to specify the image data header file (H) Header file data required LINE: total number of lines LSMP: information about the clipping direction PSMP: information about the pixel direction Output file descriptions (A) Contents of the final orientation element file 1st data: 2nd - 9th data 10th data: 11th data: 12th data (B) Ground coordinate files Output the ground coordinate and the sun position (latitude, longitude, sun elevation angle, and sun azimuth angle, in this order) corresponding to each pixel of the original image ***every 16 lines *** 32 pixels*** Hence, the 16th line corresponds to the 1st line of actual image. All the units are in degrees. How to read the output A section of the final results of the orientation is given below. Error messages (1) (2) (3) 7.4 rsmpl4 Descriptions Create an geometrically corrected image using the results of orientation computation. Here the nearest neighbor interpolation method is used. Program structures (Subroutines and their descriptions) AREA2 BILIN BIPIN CALUV DMSDEG GEOXYZ system IMGOT MERCAT system MSHPRT ORIMAT PARAIN POLAR system POLAR2 PXSIZE RECIMG SOLAR TRANS Find the initial estimate for the image coordinate corresponding to the output coordinate Read in image data (BIL format) Read in image data (BIP format) Find the original image coordinate corresponding to the output coordinate Conversion from (degrees, minutes and seconds) to degrees Transformation between the earth fixed coordinate system and the latitude longitude coordinate Output corrected images Transformation between the Mercator coordinate system and the latitude longitude coordinate Display the address for the input image corresponding to the mapping area Compute the orientation matrix Read input data Transformation between the Polar Stereo coordinate system and the latitude longitude coordinate Resampling processing using the Polar Stereo coordinate system Compute line and pixel numbers corresponding to the output pixel size Create a geometrically corrected image using ***image point grid data*** Compute the sun elevation angle Compute the ground coordinate values corresponding to the ***unknown points*** Input files Final orientation element file Ground coordinate file Image data file Image header file Pre-data file Control file Parameter file Scheduling file Output files Image file with geometric corrections Image header file Descriptions of the input parameter and input file (A) Control file data required IMAGEDIR: directory holding the image data GEODIR: directory holding the geofiles (B) Parameter file data required GEOLIST: channel number for geometric corrections BGVAL: padding values for the missing image area MAP: output coordinate system MITYPE: type of mapping area specifications PTYPE: mapping area OFLN: ***longitude*** NSID: the northern or southern hemisphere (for the Polar Stereo projection only) (C) Scheduling file data required rsmp14: specify the image file identifier before and after the correction Output file descriptions Two kinds of information (pixel number and the sun elevation angle), in addition to the channel data specified in the geolist, will always be added to the image file with geometric corrections. Error messages (1) (2) (3)