Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: References :: Related |
Back to top |
Back to top |
geocodedem(mfile, dbec, dbscore, dbiw, failvalu, backelev, demedit, demclip, filo, elevref, elevunit, mapunits, upleft, loright, pxszout, mergeopt, memsize)
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
MFILE* | str | Input file name, directory, or text file | 1 - | |
DBEC | List[int] | Input epipolar DEM channel | 0 - 1 | |
DBSCORE | List[int] | Input correlation score channel | 0 - 1 | |
DBIW | List[int] | Raster input window | 0 - 4 | Xoffset, Yoffset, Xsize, Ysize |
FAILVALU | List[float] | DEM extraction failure value | 0 - 1 | Default: -100 |
BACKELEV | List[float] | Background value | 0 - 1 | |
DEMEDIT | str | Edit DEM | 0 - 3 | YES | NO Default: YES |
DEMCLIP | str | DEM Clip | 0 - 16 | |
FILO* | str | Output geocoded DEM file | 1 - | |
ELEVREF | str | Vertical reference for elevation values | 0 - | MSL | ELLIPS |
ELEVUNIT | str | Elevation value units | 0 - 7 | METER | FEET | US_FEET Default: METER |
MAPUNITS | str | Output projection units | 0 - | Default: None |
UPLEFT | List[float] | Output image upper-left coordinate | 0 - 2 | |
LORIGHT | List[float] | Output image lower-right coordinate | 0 - 2 | |
PXSZOUT | List[float] | Output pixel size | 0 - 2 | |
MERGEOPT | str | DEM merge option | 0 - 7 | LAST | AVERAGE | SCORE | BLEND Default: BLEND |
MEMSIZE | List[int] | Working memory size | 0 - 1 | Default: 2000 |
Back to top |
MFILE
Specifies the name of a folder, image file, or text file that contains the input epipolar or interferometric SAR (InSAR) DEM images to be processed. Wildcards (*) can be used.
DBEC
Optionally specifies the input channel that contains the digital elevation model (DEM) to be extracted.
If this parameter is not specified, the function automatically searches the image, DEM, and, optionally, the correlation score (DBSCORE) channels from the input file. By default, the function will geocode the second channel in the input file.
DBSCORE
Specifies the channel that contains the correlation score. It is not used for the interferometric SAR DEMs.
DBIW
Specifies the raster window, in pixel and line coordinates, that is read from the input epipolar images. If this parameter is not specified, the entire layer is used by default.
Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.
If UPLEFT (Upper Left Coordinate) and LORIGHT (Lower Right Coordinate) are specified, this parameter is ignored.
FAILVALU
Specifies the value given to pixels for which the generation of elevation values failed. This value should be outside the range of valid elevation values. The failure value identifies the areas that can be interpolated and filled.
BACKELEV
Optionally specifies the background elevation value of the input and output DEM.
When the empty DEM file is first created, the function fills the entire DEM channel with the specified background elevation value. In the final DEM file, this value indicates areas that have no stereo images from which to extract elevation values.
Select a value that is different from the Elevation Failure Value (FAILVALU) and that is not a valid extracted elevation value for the area. For example, setting this parameter to 0 in a coastal area is a poor choice because a valid extracted elevation can match this value. If the FAILVALU and the NO_DATA_VALUE/BACKELEV value are the same then the algorithm will exit with an error.
If this parameter is not specified, the function checks for ELEVATION_BACKGROUND or NO_DATA_VALUE metadata tags, first at the channel level, then at the file level. If this value is not specified or found in the metadata, the function uses the default value of -32768.
DEMEDIT
Specifies whether to automatically edit the DEM.
DEMCLIP
Specifies the amount of data to be clipped from the epipolar DEMs before merging and geocoding them. This functionality is possible only when FILEDEM is specified..
This parameter specifies the amount of the actual image data that is clipped, either as a number of pixels or, if specified, as a percentage of the image size.
For example, if a value of 5,10 is entered, five pixels are clipped from the left and right edges, while ten pixels are clipped from the top and bottom edges.
If a single value is specified and the value is positive, clipping is applied to all edges of the image; for example, if the specified value is 5, five pixels are clipped from all four edges.
To clip based on a percentage of the image size, enter the % symbol after the value: for example, if a value of 5%,7% is entered, five percent is clipped from the left and right edges and seven percent from the top and bottom edges.
In some cases it is better to clip the output geocoded image based on the height computed from DEM world. This is because the extracted DEM may contain large elevation errors due to noise (such as water). If a negative %value is entered such as -10%, the geocoded extent would not exceed the extent computed using DEM world plus 10% on each side.
The default is blank, which means no clipping occurs. The maximum percentage value is 49%.
FILO
Specifies the name of the generated geocoded digital elevation model (DEM) file.
ELEVREF
The vertical reference for the elevation values in the generated geocoded DEM. If not specified, the value will be read from the epipolar DEM and the math model.
ELEVUNIT
The units of the elevation values that are stored as pixel values in the generated geocoded DEM.
If you specify the elevation values as FEET, the conversion factor to meters is 0.3048 (corresponding to International Feet); if you specify US_FEET, the conversion factor is 1200/3937 (corresponding to U.S. Survey Feet).
If you do not specify a value for this parameter, the value of the ELEVATION_UNITS metadata tag of the DEM channel specified by DBEC is used. If the tag does not exist in the DEM, the default value is used.
MAPUNITS
Specifies the projection string for the output DEM. If not specified, the map units are determined automatically.
If METER or FEET is specified, the math model and DEM must be METER or FEET.
If a regular, Earth-referenced projection is specified, the math model and DEM must also use a regular projection (not necessarily the same one); METER and FEET are not allowed.
LCC D350 | 0 0 3.0 46.5 44.0 49.0 700000 6600000 0 0 0 0 0 0 0 0 0 -1
This parameter can specify the UTM grid zone number and row, and Earth model, as follows:
UTM [mm] [r] [Ennn]
where:
The Earth model can be specified for LONG/LAT (and other units except METER or FEET), as follows:
LONG/LAT [Ennn]
This parameter can specify the SPCS zone number and Earth model as follows:
SPCS [mmmm] [Ennn]
where [mmmm] is is the four-digit zone number.
If the Earth model is not specified, it is assumed to be E000 (Clarke 1866).
UPLEFT
Optionally specifies the upper-left ground X and Y coordinates, in map units, for the output geocoded DEMs.
If this parameter is not specified, GEOCODEDEM calculates and uses the upper-left corner coordinate from the input DEM file.
LORIGHT
Optionally specifies the lower-right ground X and Y coordinate, in map units, for the output geocoded DEMs.
If this parameter is not specified, GEOCODEDEM calculates and uses the lower-right corner coordinate from the input DEM file.
PXSZOUT
Optionally specifies the resolution of the generated pixels. If this parameter is not specified, the resolution is automatically determined from the input epipolar DEM files.
The units of this parameter must be the same as the units of the math models used to generate the epipolar DEM. For images using the RPC math model, this is generally LONG/LAT; for most other math models, it is a projected coordinate system in meters or feet.
If multiple epipolar DEMs are provided, the first DEM processed is used to determine the units and resolution.
MERGEOPT
Optionally specifies the DEM merging option to use when multiple epipolar DEMs are geocoded and added to the output DEM file.
When a new geocoded DEM is added to the file and it overlaps an existing geocoded DEM, you must specify the method by which to determine the pixel value to use.
SCORE (Highest score): uses the highest score to replace the pixel values in the overlapped area by the pixel value with the highest correlation score between the existing geocoded DEM and the one that is added to the file.
This option is used only if you create the score channel (SCORCHAN) during the epipolar DEM creation.
BLEND (Blending): uses the mosaicking method to mosaic the DEMs together with blending between DEMs. This is the default value.
MEMSIZE
The amount, in megabytes (MB), of internal memory to allocate to processing.
Back to top |
Returns: execution status
Type: PCI_INT
Back to top |
Geocoding reprojects the epipolar digital elevation model (DEM) to the ground coordinate system at a given ground resolution. This component uses a set of epipolar DEMs, geocodes them, and then merges them into one file. Alternatively, it can process one or more interferometric SAR (InSAR) DEMS in the raw SAR image geometry, and with rational function math model. The InSAR DEMs have no score channel, and no SAR image is expected in the input DEM file.
Back to top |
Geocode epipolar DEM file S188_S189_DEM.pix and place the generated geocoded DEM into a PCIDSK file name "geocoded_DEM.pix".
from pci.geocodedem import * mfile = r"C:\demo\airphoto\S188_S189_DEM.pix" # file to process dbec = [1] # epipolar DEM channel dbscore = [2] # correlation score channel dbiw = [3000,3000,1000,1000] # input window offset 3000, size 1000 failvalu = [-100] # if DEM cannot be extract, use elevation value of -100 backelev = [-150] # background value demedit = "NO" # do not fill holes demclip = '' # do not clip DEM filo = r"C:\demo\geocoded_DEM.pix" # output file elevref = "MSL" # elevation reference elevunit = "METER" # elevation unit mapunits = "utm 11 d0" # output DEM file map units upleft = [] # upper-left coordinate of geocoded DEM loright = [] # lower-right coordinate of geocoded DEM pxszout = [1.2,1.2] # pixel/line resolution 1.2 meters mergeopt = "AVERAGE" # use AVERAGE to replace pixel values in overlap areas memsize = [] # Working memory size geocodedem( mfile, dbec, dbscore, dbiw, failvalu, backelev, demedit, demclip, filo, elevref, elevunit, mapunits, upleft, loright, pxszout, mergeopt, memsize )
Back to top |
DEM Geocoding Module Refactor Report. PCI Report.
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.