REPROJ

Reproject image and vector data


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples

Back to top

Description


REPROJ reprojects both raster and vector data from a valid projection that is in a supported Generic Database (GDB) format and from known datums. A datum is a mathematical surface used to make geographic computations. This program can also be used to resample pixel resolution.
Back to top

Parameters


Name Type Caption Length Value range
FILI* String Input file name 1 - 192  
DBIC Integer Input channel(s) 0 -   1 -
DBSL Integer Input segment list 0 -   1 -
SLTYPE String Input segment type ID list 0 - 192 Default: ALL
FILO* String Output file 1 - 192  
FTYPE String Output file type format 0 - 4 Default: PIX
FOPTIONS String output file options 0 - 64  
REPMETH String Reprojection method 0 - 3 PLB | PLR | BR
Default: PLB
DBSZ Integer Output number of pixels and lines 0 - 2 0 -
PXSZ Double Output pixel size: x-size, y-size 0 - 2 0.00000001 -
Default: 1.0,1.0
MAXBNDS* String Use maximum bounds for output 1 - 3 YES | NO
Default: YES
MAPUNITS* String Output projection 4 - 192 Pixel | UTM | Long/Lat | Meter | Foot | SPCS | ProjectionName
LLBOUNDS String Output bounds are in longitude and latitude 0 - 3 YES, NO
Default: NO
ULX String Upper-left X coordinate 0 - 192  
ULY String Upper-left Y coordinate 0 - 192  
LRX String Lower-right X coordinate 0 - 192  
LRY String Lower-right Y coordinate 0 - 192  
RESAMPLE String Resampling method 0 - 192 AVERAGE|BILIN|CPLXSAR|CUBIC|GAUSSIAN|LAGRANGE4|LAGRANGE8|MEDIAN|NEAR|SINC8|SINC16
Default: CUBIC
PROC String Processing algorithm 0 - 192
TIPOSTRN String Transformation of tile positioning 0 - 192  
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the path and file name of the GDB-supported input file that contains the data to be reprojected.

DBIC

Lists the input channels containing the images to be reprojected.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

DBSL

Specifies the input segments to be transferred to the new file. Bitmap and vector segments are reprojected, whereas other segment types are simply transferred (copied) to the output file.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

SLTYPE

Specifies the GDB-supported data types that are used for any specified segments (DBSL).

Each segment that has one of the listed types and one of the segment numbers specified in DBSL will be processed. Bitmap and vector data will be reprojected; other types of segment-held data will be copied directly to the output file. If DBSL is not specified, this parameter is set to ALL.

Supported GDB segment types include:

For example:

DBSL=1,3,5
SLTYPE=VEC, LUT

The proceding example uses segments 1, 3, and 5 for each vector and lookup table segment type. If a vector data type (VEC) exists in segments 1 and 3 only, and a LUT type in segment 5, the result is VEC 1, 3 and LUT 5. A standard PIX file does not support more than one segment type per segment; however, other file types may support multiple segment types per segment. In such cases, if vector data exists in segments 1, 3, and 5 and LUT data exists in segment 3, the result is VEC 1, 3, 5 and LUT 3.

For more information about segment types, see the CATALYST Professional online Help.

FILO

Specifies the path and file name of the output file that will contain the reprojected and copied data.

The specified file must not already exist.

FTYPE

Specifies the file format type of the output file. This is the abbreviated code for the file format, as listed in the Generic Database (GDB) Format Reference.

Some examples of supported formats include:

The default value is PIX.

For a complete list of GDB-recognized file types and their codes, see the 'GDB file formats' section of the CATALYST Professional Online Help.

FOPTIONS

Specifies the file creation options that are to be applied when creating the output file. These are specific to the file format; in each case, the default of no options is allowed. FOPTIONS can be used to specify the compression schemes, file format subtypes, and other information.

Different options are available for different file types (see the FTYPE parameter). The options are described in the 'GDB file formats' section of the CATALYST Professional Online Help.

REPMETH

Specifies the output projection method to use for the calculation, based on user-defined parameters.

Supported values are:

DBSZ

Specifies the database image size, in pixels and lines, if the value of REPMETH is PLB or PLR.

PXSZ

Specifies the output horizontal (X) and vertical (Y) resolution, in meters, of one pixel.

For example, a value of 30,30 reprojects to a 30-meter pixel resolution.

The size units for PXSZ are consistent with the value defined in MAPUNITS.

MAXBNDS

Specifies whether to use the maximum bounds of the input for the generated bounds.

This parameter may be used when the reprojection method (REPMETH) is set to PLB and BR. If the maximum bounds are used, REPROJ calculates the bounds from the input. For PLB, only the pixels and lines (DBSZ) are required; for BR, only the resolution (PXSZ) is required.

Supported values include:

MAPUNITS

Specifies the projection definition for the reprojected output image.

Valid projections include:

For information about all the projections available, see "Projections and earth models" in the Technical Reference section of the CATALYST Professional Online Help.

MAPUNITS (Output Projection) 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 PIXEL), as follows:
LONG/LAT [Ennn]
This parameter can specify the SPCS zone number and earth model as follows:
SPCS [mmmm] [Ennn]

where [mmmmm] is is the four-digit zone number.

If the earth model is not specified, it is assumed to be E000 (Clarke 1866).

LLBOUNDS

Specifies whether the bound values are geographic (longitude and latitude) or geocoded (easting and northing).

Values are:
Note: If MAPUNITS are specified as LONG/LAT, PIXEL, METER, or FEET, this parameter is ignored.

ULX

Specifies the upper-left X coordinate of the bounds, using the coordinate system defined by LLBOUNDS.
Note: The value you specify will be adjusted by TIPOSTRN, if specified, to make the upper-left-corner coordinate fall on a specific raster grid.

ULY

Specifies the upper-left Y coordinate of the bounds, using the coordinate system defined by LLBOUNDS.
Note: The value you specify will be adjusted by TIPOSTRN, if specified, to make the upper-left-corner coordinate fall on a specific raster grid.

LRX

Specifies the lower-right X coordinate of the bounds, using the coordinate system defined by LLBOUNDS.

LRY

Specifies the lower-right Y coordinate of the bounds, using the coordinate system defined by LLBOUNDS.

RESAMPLE

The resampling method to use for reprojection.

The following methods are supported:

With each resampling method, the parameters MIN=[min], MAX=[max], and FILL=[NN or BGD] can be appended as a comma-delimited list. MIN and MAX define the clamp range for output pixels. This is useful when you want to keep pixel values within a certain range; for example, 1 to 2,047 if 11-bit data is stored in a 16-bit file. FILL defines the behavior when the resampling window contains NoData pixels: NN performs resampling by using the nearest-neighbor method, while BGD indicates that the output pixel will be set to the background value. By default, NN is used for FILL.

For more information about the available resampling methods, see Resampling.

PROC

Controls the amount of memory (in megabytes) used by the algorithm.

If the host memory limit is not specified, the function uses a default of 1 GB or half the available physical memory, whichever is smaller.

TIPOSTRN

An adjustment of the upper-left-corner coordinate for the reprojected image.

By specifying an adjustment you can reproject images so that they fall on a specific raster grid. You do so by providing a keyword and either two or four values.

The keyword indicates the relative positioning of the values, as follows:
After you enter the keyword, you can enter up to four values, as follows:

The values define the position of the corner or center in relation to the raster grid.

Of the four values, only Stride_X is required. If not specified, Stride_Y defaults to the value of Stride_X, and Ref_X, Ref_Y default to zero.

For example, to specify that the upper-left corner of the upper-left pixel of the image will be an even 20-unit multiple from the reference point (432345.000, 5438882.000), enter the following:

Depending on the distance of the tile from that point, its upper-left x-coordinate can be 432345.000, 432365.000, or any other multiple, but never 432346.000 or 432355.000.

If you specify values for this parameter, the effect applies in all scenarios, regardless of whether the image-corner coordinates come from the input file, upper-left x or y coordinate, or as a result of automatic computation.

This parameter is optional.

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

REPROJ reprojects both raster and vector data from a valid projection that is in a supported generic database (GDB) format and from known datums. A datum is a mathematical surface used to make geographic computations. Auxiliary segments, such as lookup tables (LUTs), pseudocolor tables (PCTs), and so on, are allowed input and are transferred to the output file.

An ellipsoid defines the dimensions of the Earth. The datum includes the ellipsoid and its position relative to the center of the Earth.

Each datum references one ellipsoid; however, an ellipsoid can be referenced by one or more datums. If you compare the position of a point calculated using one datum and then calculate the same position using a different datum, the coordinates of the point are different, even if the datums refer to the same ellipsoid.

Because a datum is a mathematical surface used to make geographic computations, it is possible to convert from one datum to another; however, reprojecting a file from one ellipsoid to another does not provide the correct results because the critical information contained in a datum is not defined in the ellipsoid.

The following reprojections are possible:

For more information about transformations between different Earth models, see Earth models in the Technical Reference section of the CATALYST Professional Online Help.

User-defined projections used by MAPUNITS must be defined in the 'userproj.txt' file, located in the PCI/etc/ directory.

The specified reprojection method (REPMETH/Method) defines the reprojection bounds. Two parameters for each method are required; the third parameter values are then calculated by the program.

Available reprojection methods include:

The maximum bounds are derived by projecting the upper-left and lower-right corners. The maximum bounds function can also project 441 points or 21 pixel positions by 21 scan line positions, distributed over the entire input image.

When the reprojection method is PLB (Use pixels/lines and bounds), if the Maximum Bounds are not used, all four coordinates are required. If Maximum Bounds are used, REPROJ calculates the coordinates from the input file.

If the reprojection method is PLR (Use pixels/lines and resolution) and the Maximum Bounds are not used, only the upper-left coordinates are required. If the upper-left coordinates are not defined, the upper-left coordinates from the maximum bounds of the input file (reprojected to the projection string) are used. REPROJ calculates the lower-right bounds.

If the reprojection method is BR (Use bounds and resolution) and the Maximum Bounds are not used, you must specify all four coordinates. If Maximum Bounds are used, REPROJ calculates the coordinates from the input file.

The resampling method affects image reprojection only. You can change the resampling method by selecting the nearest-neighbor, bilinear interpolation, or cubic convolution method. Bitmaps are automatically resampled using the nearest-neighbor method.

If TIPOSTRN (Tile positioning transformation) parameter is specified the upper-left coordinate will always be adjusted, and the lower-right corner, dimensions or resolution will be computed based on reprojection method.

When the reprojection method is PLB (Use pixels/lines and bounds), user-specified output dimensions are preserved and resolution is computed to fit reprojected image into adjusted bounds.

If the reprojection method is PLR (Use pixels/lines and resolution), user-specified output dimensions and resolution are preserved and lower-right coordinate is computed.

If the reprojection method is BR (Use bounds and resolution), user-specified resolution is preserved and dimensions are computed to fit reprojected image into adjusted bounds.

Back to top

Examples

Reproject irvine.pix to longitude.

EASI>FILI    =   "irvine.pix"
EASI>DBIC    =   1
EASI>DBSL    =   9,25
EASI>SLTYPE  =   "VEC,BIT"
EASI>FILO    =   "reproject.pix"
EASI>FTYPE   =       ! uses PIX format by default
EASI>FOPTIONS    =       ! no file options are used
EASI>REPMETH =       ! uses pixels, lines, and bounds
EASI>DBSZ    =       ! uses 512 x 512 by default
EASI>PXSZ    =       ! uses 1 x 1 by default
EASI>MAXBNDS =   "NO"    ! uses user-defined bounds
EASI>MAPUNITS    =   "LONG/LAT    E000"
EASI>LLBOUNDS    =   "YES"
EASI>ULX =   "117d46'10.4957\"W"
EASI>ULY =   "33d44'56.4492\"N"
EASI>LRX =   "117d36'10.0364\"W"
EASI>LRY =   " 33d36'41.0468\"N"
EASI>RESAMPLE    =       ! uses NEAR by default
EASI>PROC    =   ""
EASI>TIPOSTRN    =   ""  ! don't use tile positioning transformation

EASI>R REPROJ

Reprojection using BR method, 25 meters resolution in 'SIN D700' map units, maximum bounds and TIPOSTRN=CORNER case with 10 meters stride.

EASI>FILI    =   "51194180611070849262J_ORTHO_MS_100m.pix"
EASI>DBIC    =   1,2,3   ! use channels 1,2,3
EASI>DBSL    =
EASI>SLTYPE  =   ""
EASI>FILO    =   "reproject_25m.pix"
EASI>FTYPE   =   ! uses PIX format by default
EASI>FOPTIONS    =   ! no file options are used
EASI>REPMETH =   "BR"    ! uses bounds and resolution method
EASI>DBSZ    =   ! not used for BR method
EASI>PXSZ    =   25  ! uses 25 meters resolution
EASI>MAXBNDS =   "YES"   ! uses maximum bounds
EASI>MAPUNITS    =   "SIN D700"
EASI>LLBOUNDS    =   "NO"
EASI>ULX =   ""
EASI>ULY =   ""
EASI>LRX =   ""
EASI>LRY =   ""
EASI>RESAMPLE    =   "CUBIC" ! uses CUBIC resample
EASI>PROC    =   ""  ! uses AUTO by default
EASI>TIPOSTRN    =   "CORNER,10" ! uses CORNER tile positioning transformation with 10 meter stride

EASI>R REPROJ

Reprojected file 'reproject_25m.pix' will be in 'SIN D700' map units in 25 meters pixel resolution, containing all data from the input file. Upper-left corner of the output file will fall on the 10-meter grid.

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