The Grids | Resize | Extract command creates a subset of an existing grid file. Grid files consist of rows and columns (lines of constant Y and X value) containing Z values. When you extract information from a grid file, you can specify the starting and ending rows and columns to extract. For example, you can create a new grid file that consists of only the center portion of an existing grid by specifying the middle columns and rows from the original grid.
Consider a grid file that has 100 rows and 100 columns. You might want to create a grid that contains the information from row 25 to row 75 and column 25 to column 75. In this example, specify 25 as the first row and first column to extract and 75 as the last row and last column to extract. The grid file you create in this case would consist of 51 rows and 51 columns of data (from 25 to 75 rows and columns, inclusive).
Subsets can also be based on every nth row or column read from the input grid file, reducing the density of the grid. In this case, you specify a step factor that skips rows and columns when reading information from the original grid file.
Click the Grids | Resize | Extract command to open the Open Grid dialog. Select a grid file and click Open to open the Extract Grid dialog.
The Extract Grid dialog displays information about the input grid file, lets you specify a subset of a grid, and writes the subset to a new grid file.
Specify the source map layer or grid file in the Input Grid section. Click the current selection and select a map layer from the list. Only map layers created from grid files are included in the Input Grid list. Click Browse to load a grid file with the Open Grid dialog.
In the Input Grid section, the file name and statistics about the grid are listed. The information includes the # of Nodes, Minimum, Maximum, and Spacing in both the X and Y directions. This is provided as information only for adjusting the output grid. This information cannot be changed.
Type a file path and file name, including the file type extension, in the Output Grid field, or click the button and specify the path and file name for the grid file in the Save Grid As dialog.
The First and Last boxes show the first and last rows and columns from the input grid file. The number of nodes and the map coordinates are displayed to the right. As you change the First and Last values, the number of nodes and map coordinates change accordingly.
The Read Every boxes specify a skip factor to "thin out" a grid. A value of one reads every row or column within the selected limit. A value of two reads every other row or column, and so on.
Check the Add grid as layer to check box to automatically add the created grid to a new or existing map. Select [New Map] in the Add grid as layer to field to create a new map. Click the current selection and select an existing map to add a new layer to the map. Select the layer type by clicking the current selection in the New layer type field and selecting the desired layer type from the list.
Note: If you are saving the grid file in the DEM grid format, clear the Add grid as layer check box and add the map or layer with a Home | New Map or Home | Add to Map | Layer command.
Click the Grids | Resize | Extract command.
In the Open Grid dialog, select the grid file from which you want to extract a subset and click Open.
In the Extract Grid dialog, specify the First, Last, and Read Every values in the Rows (Y) and Cols (X) boxes.
Click the button to display the Save Grid As dialog.
In the Save as type list, select the format for the output file. Specify the path and file name for the file to be created, and click Save .
In the Extract Grid dialog, click OK and the grid is created with the subset of grid information from the original grid file.
When the input .GRD file for a Grids | Resize | Extract command has a defined .GSR2 file with coordinate system information, this information is used for the output .GRD file. The Export Options dialog appears with the option to save the coordinate system information. It is recommended to check the GS Reference (Version 2) file if you intend to use the grid file in Surfer, as the GSR2 retains all of the information needed. The grid has the same coordinate system as the original file, but the .GSR2 is required to define the coordinate system.