Assign NoData

The Grids | Edit | Assign NoData command is used to remove grid node data from a grid in areas not supported by original data or in areas where you do not want to display contours on a map. The Assign NoData command assigns the NoData value (1.70141e+038) to specified groups of grid nodes in a grid file. Grids used with Assign NoData contain the same number of grid nodes and the same grid limits as the original grid file. The grid nodes in the new grid are identical to the values in the original grid except in those locations where the NoData values are assigned.

 

NoData polygon boundaries are defined in a vector file or in a base layer. The blanking file format can be used and is a special ASCII format file containing the X, Y coordinates defining the NoData polygon boundary. Blanking *.BLN files can be made in the Surfer worksheet. Blanking *.BLN files can also be created with the Digitize command. The NoData values can be assigned to areas inside or outside the polygon boundary. Regions can be assigned the NoData value using the Eraser command in the Grid Editor window.

 

Nearly any feature type can be used when specifying boundaries with a base layer: polygon, range ring, rectangle, rounded rectangle, or ellipse. A polyline or spline polyline can also be used, but unexpected behavior may occur if the line is open. The most common feature for defining NoData polgyon boundaries is the polygon. The features must be in a base layer to be used with the Assign NoData command. Features in paper space cannot be used. Create new features in an empty base layer if you wish to assign NoData values with features created in Surfer.

 

To automatically assign the NoData value to areas outside the original data, click the Grids | New Grid | Grid Data command. In the Grid Data dialog, check the Assign NoData outside convex hull of data. Any grid nodes outside the boundary created by connecting the original data is automatically assigned the NoData value.

 

In Surfer 14 and prior versions, the Assign NoData command was referred to as Grid Blank.

 

Assign NoData to Grid Dialog

The Assign NoData to Grid dialog is displayed by clicking the Grids | Edit | Assign NoData command. Specify the input grid layer or file, vector file or layer, output grid file, and optional output map layer in the Assign NoData to Grid dialog.

 

Assign the NoData value to regions of a grid file or map layer with the Assign NoData to Grid dialog.

 

Input Grid

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.

 

NoData Polygon Boundary

Specify the region or regions to be assigned the NoData value and whether or not to use only selected objects in the NoData Polygon Boundary section. Select either a map layer or vector file in the NoData Polygon Boundary section:

The number of polygons and vertices is displayed below the NoData polygon boundary once a file or map layer has been selected. If the boundaries have blanking flags or BLN_Flag attributes, the total number of inside and outside flags is displayed.

 

Polyline Boundaries

Polylines can be used for NoData polygon boundaries. The polylines in the base layer or vector file will be treated as polygons while assigning NoData values. The Assign NoData command is not recommended with open polylines, unexpected results my occur. Before clicking Grids | Edit | Assign NoData, consider converting polylines to polygons with the Polyline to Polygon command, and edit features with the Reshape command.

 

If the layer you wish to use contains both polygons and polylines, but you only wish to use some or all of the polygons, select the objects you wish to use before clicking Grids | Edit | Assign NoData and select the Selected objects only option. If the file you wish to use contains both polylines and polygons, first load the file as a base layer, and then use the Assign NoData command with the Selected objects only option.

 

NoData Inside, Outside, or Mixed

Select NoData Inside to assign the NoData value to the region inside the NoData polygon boundary or boundaries. Select NoData Outside to assign the NoData value to the region outside the NoData polygon boundary or boundaries. Select Mixed to use the blanking flag or BLN_Flag attribute values from the file or layer. The Mixed option is only available when the layer or file contains both blanking flags or BLN_Flag attributes: assign NoData inside (1) and assign NoData outside (0). If all blanking flags or BLN_Flag attributes are the same, the NoData Inside or NoData Outside option is selected automatically, and the Mixed option is not available.

 

Selected Objects Only

Select the Selected objects only option to use only the selected objects in the base layer to assign NoData values to the grid. When the Selected objects only box is checked, the Loaded polygons and vertices values are updated. Select a base layer in the NoData Polygon Boundary field to use the Selected objects only option. The Selected objects only option is not available when the NoData Polygon Boundary is a vector file. A single polygon may be selected without entering editing mode. However, to select multiple polygons in a base layer, you must first begin editing mode. The polygon or polygons must be selected before clicking the Grids | Edit | Assign NoData command.

 

To select multiple polygons in a base layer, you must first begin edit group mode.

  1. Select the base layer in the Contents window.

  2. Click Features | Group | Start Editing.

  3. Select the desired polygons in the plot window or Contents window.

  4. Click Grids | Edit | Assign NoData.

Once you have assigned NoData values to the grid, stop editing the group by clicking Features | Group | Stop Editing.

 

Supported Vector Formats

The following file formats can be used to assign NoData values to a grid:

BLN Golden Software Blanking

GSI Golden Software Interchange

BNA Atlas Boundary

KML Google Earth Keyhole Markup Language

DDF SDTS TVP

MIF MapInfo Interchange Format

DLG USGS Digital Line Graph

PLT Golden Software PlotCall

DXF AutoCAD Drawing

PLY Stanford Polygon

E00 Esri AcrInfo Export Format

SHP Esri Shapefile

EMF Windows Enhanced Metafile

STL Stereo Lithograph

GML Geo Markup Language

WMF Windows Metafile

GSB Golden Software Boundary

 

 

Output Grid

In the Output Grid group click the image\open2.png button to open the Save Grid As dialog. Specify a path or file name for the grid file to be created and click Save.  A variety of output grid file types can be specified. Alternatively, type a file path and name, including the file type extension, in the Output Grid field.

 

Add New Map or Layer

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.

 

Assign NoData Example

In this example, some of the nodes in the Demogrid.grd sample file will be assigned the NoData value with the Demorect.bln sample file.

  1. Click the Home | New Map | Contour command.

  2. In the Open Grid dialog, select the Demogrid.grd sample file and click Open.

  3. Click on the contour map in the plot window.

  4. Click the Home | Add to Map | Layer | Base command.

  5. In the Import dialog, select the DemoRect.bln sample file and click Open.

  6. In the plot window, click the Grids | Edit | Assign NoData command.

  7. In the Assign NoData to Grid dialog, click <None> in the Input Grid field and select Contours-Demogrid.grd from the list.

  8. Click <None> in the NoData Polygon Boundary field and select Base-DemoRect.bln from the list.

  9. Click the button next to NoData Outside.

  10. Specify a file name and path in the Output Grid field.

  11. Verify the Add grid as layer to check box is checked.

  12. Verify [New Map] is displayed in the Add grid as layer to field.

  13. Click the current selection in the New layer type field and select Contour.

  14. Click OK in the Assign NoData to Grid dialog.

A new grid is created and saved to the file name specified in step 10. A new contour map is created and displayed in the plot window.

 

Before Assign NoData:

After Assign NoData:

The Blanking *.BLN file is displayed as a base map layer on the contour map.

This is a contour map created from the new grid file.


If the edges of the NoData region are jagged, the original grid file can be recreated with a higher grid density (i.e. more rows and columns). Use the more dense grid file and follow the steps to assign the NoData values to the grid file again. Assigning NoData values marks areas of a grid or map as "no data" areas. In NoData areas of a grid:

Example 2

The left map shows an unfilled contour map with a base map layer displaying the circular NoData polygon boundary. Contour lines are truncated within one grid cell width of the boundary. The right map shows a filled contour map with a forward slash fill pattern assigned to NoData areas. 

 

NoData regions appear as low flat regions on a 3D wireframe. This wireframe is produced from the same grid file used to produce the contour maps in the example above .

 

Assigning NoData to Areas within a Grid

There are several ways to assign the NoData value to areas within a grid.

 

Starting with a data file, the Grids | New Grid | Grid Data command assigns the NoData value to grid nodes:

Starting with a grid file, nodes are assigned NoData if:

 

Assign NoData and .GSR2 Files

When the input .GRD file for a Grids | Edit | Assign NoData command has a defined .GSR2 file with coordinate system information, this information is used for the output .GRD file. The .BLN file must be in the same coordinate system as the input .GRD file, otherwise the file is not assigned the NoData value. 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.

 

 

See Also

Creating a Blanking File with the Digitize Command

Digitize