Golden Software Blog

Helping you learn more about the latest product information, tips, tricks, techniques, and customer stories so you can visualize data and communicate results with ease.

How to show areas of overlap of two contour maps in Surfer 13

I communicated with a user recently who wanted to find the area of overlap of one specific contour line on one contour map with a specific contour line on another contour map. In his case the first contour map was temperature and the second was rainfall. He wanted to find the area where temperature was above one value and rainfall was above another value. Whether this was for agriculture or for some other purpose I’m not sure, but it got me thinking that there could be many applications for a use like this. For example, you may have a contour map of density of one endangered species, and another for a second endangered species, and you’re trying to identify high populations of both in order to create a wildlife refuge. Or maybe you have population of people on one contour map and energy use on another, and you want to find areas with low population but high energy usage so you can send conservationists into that area to notify the population of smart practices. The uses are endless!

So that said, below are the steps to determine the area where two specific contour levels on two different maps intersect. In this case, I’ll be finding the area in Colorado where temperature is greater than 12oC and precipitation is less than 50 hundredths of inches, which may indicate an area that is more prone to wildfires. The data used in this article was obtained from NOAA. January 2015 – November 2015 data was averaged and then gridded in order to produce the attached grids.

  1. Click Map | New | Contour Map.
  2. In the Open Grid dialog, choose the rainfall_avg.grd file and click Open.
  3. In the Object Manager, select the Contours- rainfall_avg.grd layer.
  4. Click on the Levels tab in the Property Manager.
  5. Change the Level method to Advanced.
  6. Click the Edit Levels button.
      a. Click the Delete button until the top level listed is 50.
      b. Click on the next level (55) and click the Delete button until the 50 level is the only level.
      c. Make sure the Label column says No (if it says Yes, double click on the Yes in the Label column to turn it to a No).
      d. Double click on the line.
      e. Change the Color to Blue and click OK.
      f. Click OK.
  7. Click on the Set button on the Coordinate System page in the Property Manager. Setting the coordinate system of the layer will allow us to change the coordinate system of the Map so we can view the area of the overlap in meaningful units.
  8. Navigate to Predefined | Geographic (lat/lon) | World Geodetic System 1984 and click OK.
  9. Click Map | Add | Contour Layer.
  10. In the Open Grid dialog choose the temperature_avg.grd file and click Open.
  11. In the Object Manager select the Contours- temperature_avg.grd layer.
  12. Click on the Levels tab in the Property Manager.
  13. Change the Level method to Advanced.
  14. Click the Edit Levels button.
      a. Click the Delete button until the top level listed is 12.
      b. Click on the next level (12.5) and click the Delete button until the 12 level is the only level.
      c. Make sure the Label column says No (if it says Yes, double click on the Yes in the Label column to turn it to a No).
      d. Double click on the line.
      e. Change the Color to Red and click OK.
      f. Click OK.
  15. Click on the Set button on the Coordinate System page in the Property Manager.
  16. Navigate to Predefined | Geographic (lat/lon) | World Geodetic System 1984 and click OK.
  17. Click on the Map in the Object Manager.
  18. Click on the Change button on the Coordinate System page in the Property Manager.
  19. Navigate to Predefined | Projected Systems | World | Popular Visualisation CRS / Mercator (EPSG 3785) and click OK.

    If we were to fill the areas below the rainfall contour and above the temperature contour, it would look like this:
    image1.png
  20. Uncheck the boxes next to each of the four axes in the Object Manager.
  21. Click File | Export.
  22. In the Export dialog, set the Save as type to GSI Golden Software Interchange, give your file a name (like "overlap"), and click Save.
  23. In the Export Options dialog, make sure the Scaling source is set to Map: Contours-rainfall_avg.grd and then click OK.
  24. Click Map | Add | Base Layer.
  25. In the Import dialog, choose the GSI file and click Open.
  26. Click Yes if you are prompted to expand the map limits to include the new layer.
  27. In the Object Manager, uncheck the boxes next to the two contour maps to turn them off.
  28. Right click on the Base-<filename>.gsi layer in the Object Manager and click Edit Group.
  29. Delete the closed blue polylines that don’t overlap.
    image2.png
  30. Select one of the blue polylines and click Geoprocessing | Edit Boundaries | Break Polyline.
    image3.png
  31. Click where this line intersects with a red line.
  32. Repeat steps 30-31 for the rest of the blue lines, clicking anywhere the line intersects with a red line, until no blue line intersects a red line, but instead the red lines mark where one blue line ends and the next begins.
  33. Repeat steps 30-32 for each of the red lines, clicking at the same locations you clicked for the blue lines, so now no red line intersects a blue line, but instead where red and blue meet this marks the end of one red line and the start of the next.
  34. Select the portion of the polyline that is not part of the overlap (using the image from step 19 if needed) and press DELETE.
    image4.png
  35. Click Draw | Polyline and connect the ends of the two big incomplete polygon. Do the same for the red polyline in the upper right corner and press ESC to exit drawing mode.
    image5.png
  36. Click one polyline in the big area and rename it ‘1’ in the Object Manager.
  37. Click the next polyline in the clockwise direction and name it ‘2’, then click and drag it in the Object Manager so it’s just above ‘1’.
  38. Repeat step 37 for the rest of the polylines in the big area.
  39. Select all of the polylines that make up the big area and click Geoprocessing | Edit Boundaries | Connect Polylines.
  40. Repeat step 39 for the smaller area on the left and then the area in the upper right corner.
  41. Select all of the polylines and click Geoprocessing | Change Boundaries | Polyline to Polygon.
  42. With all polygons still selected, click Geoprocessing | Edit Boundaries | Combine Islands/Lakes.
  43. Right click on the Base layer in the Object Manager and click Stop Editing Group.
  44. You can turn on the axes and contour layers, change the Level method for each contour map back to Simple, and change the line and fill properties of the base layer overlap in the Property Manager, if desired.
  45. To get the area of this polygon, you can select the polygon and click to the Info tab in the Property Manager to view the perimeter and area in map units.
    image6.png

Although the process takes a little time it’s well worth the result. For practically any field of study, this process can be used to accurately identify where two variables intersect, allowing you to identify your region of interest for overlay with other informative maps in Surfer.

image7.png

 

Comments 9

Guest - Leo on Saturday, 16 September 2017 10:29

How did u add the legend at the bottom.?

How did u add the legend at the bottom.?
Katie Yoder on Monday, 18 September 2017 09:49

Hi Leo,

Surfer does not support the creation of standard legends for contour maps so the legend at the bottom of this map was created using drawn rectangle and text objects. The colorscale to the right of the map is the type of legend that is supported in Surfer.

Thanks!
Katie

Hi Leo, Surfer does not support the creation of standard legends for contour maps so the legend at the bottom of this map was created using drawn rectangle and text objects. The colorscale to the right of the map is the type of legend that is supported in Surfer. Thanks! Katie
Guest - Leonard on Tuesday, 19 September 2017 06:00

Ok, thanks Katie. Is it possible to overlay more than two maps, maybe three or four? Trying to produce a groundwater potential map.

Ok, thanks Katie. Is it possible to overlay more than two maps, maybe three or four? Trying to produce a groundwater potential map.
Katie Yoder on Tuesday, 19 September 2017 11:02

Hi Leo. Yes, it is possible to overlay more than two maps in Surfer. In fact, to my knowledge there is not a limit on the number of maps that can be overlaid in Surfer.

Thanks!
Katie

Hi Leo. Yes, it is possible to overlay more than two maps in Surfer. In fact, to my knowledge there is not a limit on the number of maps that can be overlaid in Surfer. Thanks! Katie
Guest - Leon Warrington on Monday, 15 August 2016 03:33

Very strange, looks like the website is trying to parse the formula as per html code.

Once last try,:



IF(A>50,1,0)*IF(B the data based on the user defined parameters, rather than manually adjusting contour lines.

If the grid files are different geometries that I expect that you can use intermediate steps to create interpolated grid files with the same geometry in order to apply the above approach.

Leon

Very strange, looks like the website is trying to parse the formula as per html code. Once last try,: IF(A>50,1,0)*IF(B the data based on the user defined parameters, rather than manually adjusting contour lines. If the grid files are different geometries that I expect that you can use intermediate steps to create interpolated grid files with the same geometry in order to apply the above approach. Leon
Jennifer Woodson on Wednesday, 17 August 2016 12:42

Hi Leon,

It didn't parse my formula correctly either. Maybe an image will work. Please see below.

http://www.goldensoftware.com/images/easyblog_images/2203/gridmath.png

Thanks!
Jennifer

Hi Leon, It didn't parse my formula correctly either. Maybe an image will work. Please see below. [img]http://www.goldensoftware.com/images/easyblog_images/2203/gridmath.png[/img] Thanks! Jennifer
Guest - Leon on Monday, 08 August 2016 01:52

Not sure what happened above. (plus clearer explanation).

Correct formula would be:

IF(A>50,1,0)*IF(Bg the two grids together a new grid is created with a value of 1 where the two previous grids are 1, and 0 elsewhere.

Leon

Not sure what happened above. (plus clearer explanation). Correct formula would be: IF(A>50,1,0)*IF(Bg the two grids together a new grid is created with a value of 1 where the two previous grids are 1, and 0 elsewhere. Leon
Jennifer Woodson on Monday, 08 August 2016 10:59

Hi Leon,

I'm not sure why the formatting isn't working well. I believe the formula you want to use is IF(A12,1,0), where A is the rainfall grid and B is the temperature grid. This will give you a grid with a 1 where the rainfall is under 50 and the temperature is above 12 and 0 elsewhere. An image map displays the resulting grid nicely.

Jennifer Woodson
Technical Support

Hi Leon, I'm not sure why the formatting isn't working well. I believe the formula you want to use is IF(A12,1,0), where A is the rainfall grid and B is the temperature grid. This will give you a grid with a 1 where the rainfall is under 50 and the temperature is above 12 and 0 elsewhere. An image map displays the resulting grid nicely. Jennifer Woodson Technical Support
Guest - Leon Warrington on Friday, 05 August 2016 09:38

Another, (much) quicker approach could be:

If rainfall is Grid A and Temp is Grid B:

1: Use the following formula in grid math: IF(A>50,1,0)*IF(Brid with a 1 value only where both of these conditions are true, 0 else.
2: Plot the resulting grid as a contour plot using the advanced method above.

This assumes the two grids share the same geometry. Done in Surfer 10.

Leon


Computed in Surfer 10. This requires both the grids to be the same geometry.

Another, (much) quicker approach could be: If rainfall is Grid A and Temp is Grid B: 1: Use the following formula in grid math: IF(A>50,1,0)*IF(Brid with a 1 value only where both of these conditions are true, 0 else. 2: Plot the resulting grid as a contour plot using the advanced method above. This assumes the two grids share the same geometry. Done in Surfer 10. Leon Computed in Surfer 10. This requires both the grids to be the same geometry.
Guest
Sunday, 24 September 2017

Captcha Image

Subscribe To Our Blog

Most Popular

This week's new feature series is a tutorial on how to use the new coordinate system dialogs in MapV...
Over the years, one of the most common questions asked is “How can I get my contour map out of Surfe...
For more than 20 years, Surfer mapping software has been used by representatives of nearly all indus...

Exceeding expectations

Go to top