Define a Warp
Use the Coordinates > Georeferencing > Define a Warp menu option (WARPFILE GX) to create an output warp file.
Define a Warp dialog options
Output Warp file name (.wrp) |
Specify the output warp file name. Script Parameter: WARPFILE.FILE (See the Application Notes below) |
Warp type |
Specify the warp type. See the Application Notes below for details. Script Parameter: WARPFILE.TYPE (See Script Note below) 1: 1-Point, 2: 2-Point, 3: 3-Point, 4:Quadrilateral, 5: Multipoint |
Definition mode |
Interactive mode defines both old and new points directly by selecting them on the current map. Semi-interactive mode lets the user select the original point from the current map, then prompts for the new position using a dialog box. Manual mode uses a dialog box to prompt for both the old and new positions. In both the interactive and semi-interactive modes, the input warp points are annotated on the current map; the old point is circled, and a line is drawn from this circle to the new position. These marks are temporary, and are removed on exit from the GX. Script Parameter: WARPFILE.MODE (See Script Note below) 0:Interactive, 1:Semi-interactive, 2: Manual |
Application Notes
This GX is suitable for warping from one coordinate system to an entirely different coordinate system.
You will be prompted to enter a number of control points, depending on the warp type. If the 4-point quadrilateral warp is chosen then the points must be specified in a clockwise or anti-clockwise direction to avoid a mid-point twist of the output data. Each control point will have an old coordinate and a new coordinate. In the Interactive mode, both the old and new coordinates are defined using the mouse on the current map. In the Semi-interactive mode, the old coordinate is defined on the current map, but the new coordinate is entered in a dialog, using the old positions as default values. In the Manual mode, both the old and new positions are entered in a dialog window:
-
To relocate data, define one control point.
-
To scale in X and Y and rotate, define 3 control points.
-
To perform a quadrilateral warp, define 4 control points (control points must be specified in a clockwise or anti-clockwise direction).
-
The multipoint warp takes 2 or more points (see notes below).
A warp file will be created. This can be used to warp data using the warping options.
Scripts
Because the interactive methods require you to locate positions interactively on the current map, only the manual mode is valid for use in a script. The script file parameters for control points are defined as follows:
WARPFILE.X1_OLD
WARPFILE.Y1_OLD
WARPFILE.X1_NEW
WARPFILE.Y1_NEW
... etc. for point 2, 3, and up to the number of points required.
A maximum of 1000 points are allowed for the multipoint warp.
The Multipoint Non-rotational Warp Method
The 'Multipoint' warp method is useful for warping one image to match another, for instance, making a photographic image of a city line up with an underlying grid of streets and intersections. The method is especially powerful because it is able to warp the output image so that all selected points are exactly corrected.
The method relies on the nearest-neighbour tinning algorithm to calculate local corrections from the fixed corrections at the given correction points. Normally, values outside the "convex hull" or outer perimeter formed by joining the correction nodes cannot be calculated using this method. To overcome this, four "boundary nodes" are added to those you will input.
The positions are determined from the input points as follows:
Xmin = Minimum X value in all the points
Xmax = Maximum X value in all the points
Ymin = Minimum Y value in all the points
Ymax = Maximum Y value in all the points
range = MAX(Xmax – Xmin, Ymax – Ymin)
X0 = Xmin – 5*range
X1 = Xmax + 5*range
Y0 = Ymin – 5*range
Y1 = Ymax + 5*range
The four boundary points are at (X0, Y0), (X0, Y1), (X1, Y0), and (X1, Y1).
The "corrections" assigned to these points are the average corrections for X and Y of all the input points. The weakness of this scheme is evidenced when the input points are closely grouped on the original image, and there are grid edges more than five times as far away from the nearest node as the calculated spread in the nodes. Values beyond this range are set to dummies and will not display on the warped image. To prevent this, define a set of correction points that is fairly well spaced over the image to be warped.
The multipoint warp, as it is presently defined, is only operational in the area where the points that define the warp are located. More precisely, if the "old' locations are in the range Xmin to Xmax, and Xrange = Xmax - Xmin, then the warp will work only if the points are in the range Xmin - 2.5*Xrange to Xmax + 2.5*Xrange.
Got a question? Visit the Seequent forums or Seequent support
© 2023 Seequent, The Bentley Subsurface Company
Privacy | Terms of Use