Create a grid file from a paper or scanned map in Surfer

Surfer's Grid from Contours and Georeference Image features streamline the process of recreating scanned contour maps.  To recreate a scanned contour map you will need to georeference and digitize the scanned data.  The digitized data can then be gridded and mapped using the Grids | New Grid | Grid from Contours command. Follow the steps below to do this:


Step 1. Load and Georeference the Image

Click Home | New Map | Base, select your image file and click Open. This will load the scanned image map into Surfer as a base map. If the image was already georeferenced, you can skip to Step 2. If the image is not already georeferenced, you can georeference the image base map, by using one of these methods:

  1. If you know the real world coordinates of the image corners, follow the steps in this article: How Can I Georeference (Assign Coordinates To) An Image Base Map In Surfer?
  2. If you don’t know the corner coordinates, but know 3 points interior to the image, you can use the instructions in this article: A detailed look at how to georeference (assign coordinates to) an image in Surfer
  3. If you don’t care what your X and Y coordinates are, you can simply leave the coordinates as they are in pixel units (0,0 in the lower left corner).

Georeference an image in Surfer

Step 2. Digitize the Image

  1. Select the map and click Home | Add to Map | Layer | Empty Base. This adds a new base layer to the map.
  2. Click the new empty Base layer in the Contents window to select it. Once selected, an orange arrow will indicate you're in Edit mode for that layer.
  3. Digitize the first object. If you are digitizing point locations, click Features | Insert | Point and click on the map on the first point location. If you are digitizing contour lines or other lines, click Features | Insert | Polyline and trace the line on the image.
  4. After the first object is created, expand the Base layer in the Contents window, right-click it and click Open Attribute Table.
  5. In the Attribute Table window, click the green + button to add a new attribute field.
  6. For the Attribute name, enter ZLEVEL to assign the Z value for the object and click OK.
  7. For the object you drew, enter the Z value for that object in the Attribute Table under the ZLEVEL field.
  8. In the plot window, draw the rest of the objects. For each object you draw, enter the Z value for that object in the Attribute Table under the ZLEVEL field.
  9. Once all the points or polylines have been digitized, exit the Attribute Table.

Asxsigning ZLEVEL attributes to polylines in Surfer

Step 3. Create a grid and contour map from the digitized contours

Note: If you digitized point data in Step 2, grid the results normally using the Grids | Grid Data | Grid Data command.

  1. Click Grids | New Grid | Grid from Contours.
  2. In the Grid Contours dialog, click in the Contour Source field and select the Base layer containing the digitized contours.
  3. In the Select Field dialog, select ZLEVEL and then click OK.
  4. In the Output Grid Geometry section, set the desired limits for the grid file and the grid spacing/number of nodes.
  5. In the Options section, 
    1. Check the box next to Blank grid outside convex hull of data in order to assign NoData values to all grid nodes that fall outside of the convex hull of the data.
    2. If you chose to blank the grid outside the convex hull of the data, you can inflate or deflate the convex hull by a certain amount by entering a positive or negative value (in map units) into the Inflate convex hull by box.
    3. Enter a positive value for the Extrapolation factor if you wish to control the rate of change of z values for grid nodes with only one bounding contour (usually near the peaks and basins of your contours). The slope between the nearest two contour lines is multiplied by the Extrapolation factor to perform linear extrapolation. Values are explained in the table below.
      Value Explanation
      0 Generates a grid with flat peaks and basins
      >0 and <1 Lessens the rate of change in Z with distance from the nearest contour (generates lower peaks and shallower basins)
      1 Default
      >1 Increases the rate of change in Z with distance from the nearest contour (generates higher peaks and deeper basins)
    4. Check the box next to Close open contours in order to convert polyline contours with endings near their beginnings into polygons so they can be filled with a designated fill color.
    5. If you've chosen to close open contours, enter a distance tolerance into the Ends within box. If the starting and ending points of the contour line are the same or close enough that they are within this distance tolerance, and the contour would not cross another contour line by closing the polyline, the polyline will be converted into a polygon.
    6. Check the box next to Partial contour cleanup to improve performance around open contours that terminate in the interior of the map, especially near the edges of the map or when the contour lines indicate faulting.  
  6. In the Output Grid section, give your output grid file a name and file path. If you wish to save to a specific grid file type, click the open file icon to access more save options.
  7. Check the box next to Add grid as layer to to create a new map layer from this grid, and then choose which map to add it to from the drop-down list.
  8. Choose the type of map to create from the New layer type drop-down list.
  9. Click OK to create the grid file and map layer.

Creating a Grid from Contours in Surfer

See also:

How can I load a scanned map into Surfer, digitize the data and create a vector base map?


Updated December 20, 2021

Was this article helpful?
7 out of 16 found this helpful



Please sign in to leave a comment.