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.

Create a Regularly Spaced Grid in any Irregular Polygon using Surfer

It is often necessary to collect data at a regularly spaced interval. Often times the area of interest is within an irregularly shaped polygon. You can use both Surfer's Gridding and Blanking functions to create a regularly spaced grid from boundary data, export the XY values to a data file, and then use a free online utility to convert the data file to GPX to load the XY data in your GPS.

Click here to download a sample SHP file, and follow along as I demonstrate how to create a regularly spaced grid within an irregular polygon.  

  1. Download and unzip Reeds_Lake.zip and then open Surfer 10.
  2. Import your SHP file into Surfer as a Base Map by going Map | New | Base Map. In the Import  dialog select and open your SHP file. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  3. Next you will need to export your polygon to a BLN file in Map Coordinates. In the Object Manager uncheck the axes, then expand Base, and select the Polygon. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  4. From the toolbar select File | Export and in the Export dialog ensure that the Save as type is BLN, the Selected objects only box is checked, and then select Save. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  5. In the Export Options dialog ensure that the Scaling source is set to Application and then select OK. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  6. From the toolbar select File | Open and open the newly created BLN file in the Surfer Worksheet.
  7. Highlight row 1, right click, and select Delete and then add a few dummy data points to column C so that the Z values are not planar. Your worksheet should look to mine. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  8. Now from the toolbar select File | Save As and in the Save As dialog change the Save as type to XLS.
  9. Return to the plot window and from the toolbar select Grid | Data and from the Open Data dialog select and open the newly created XLS file.
  10. In the Grid Data dialog modify the Spacing in the Grid Line Geometry to your desired spacing in both the X and YDirection and then select OK. I will choose a spacing of 20.Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  11. We can now Blank the grid by our BLN file by selecting Grid | Blank.
  12. In the Open Grid dialog select and open our newly created GRD file.
  13. In the Open dialog select and open the BLN file.
  14. In the Save Grid As dialog you can name your file and change the Save as type to DAT.
  15. From the toolbar select File | Open and open the newly created DAT file in the Surfer Worksheet.
  16. Select then entire data set, and then from the toolbar select Data | Sort and in the Sort dialog change the Sort First By to Column C, select Descending, and then select OK. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer Create a Regularly Spaced Grid in any Irregular Polygon using Surfer
  17. Now delete every coordinate pair that has a Z value of 1.70141E+38, the Surfer Blanking Value, and then Save As an CSV file.
  18. Return back to the Surfer Plot window, select your Map in the Object Manager, right click, and select Add | Post Layer.
  19. In the Open Data dialog select and open the recently modified CSV file. Create a Regularly Spaced Grid in any Irregular Polygon using Surfer You have now created a regular grid within the confides of your irregular polygon. To load these points in your GPS, you would need to use a free online utility to convert from CSV to GPX. I would recommend using GPS Data Team.
 

Comments 4

Guest - Rahul on Sunday, 03 April 2016 21:14

Hi Sir
I have a .bln file which includes all the grid node value. Sir is their any method to generate the breakline file except creating polygon around the data file.

Hi Sir I have a .bln file which includes all the grid node value. Sir is their any method to generate the breakline file except creating polygon around the data file.
Jennifer Woodson on Monday, 04 April 2016 08:23

Hi Rahul,

There are a few ways to create a BLN file. Please see this Knowledge Base article for 4 different methods: http://www.goldensoftware.com/knowledge-base/surfer/1095-how-can-i-create-a-bln-file

The article also includes a link to a webinar recording about creating BLN files that you may benefit from viewing.

Thanks,
Jennifer

Hi Rahul, There are a few ways to create a BLN file. Please see this Knowledge Base article for 4 different methods: http://www.goldensoftware.com/knowledge-base/surfer/1095-how-can-i-create-a-bln-file The article also includes a link to a webinar recording about creating BLN files that you may benefit from viewing. Thanks, Jennifer
Guest - Leslie on Monday, 30 July 2012 02:35

Hello Ratna,

If your polygons are all in a single Base layer, click on Base in the Object Manager. In the Base Map tab of the Property Manager you can expand Line Properties and Fill Properties by clicking on the plus icons to the left of them to change the line/fill attributes for all polygons in your Base layer.

Leslie

Hello Ratna, If your polygons are all in a single Base layer, click on Base in the Object Manager. In the Base Map tab of the Property Manager you can expand Line Properties and Fill Properties by clicking on the plus icons to the left of them to change the line/fill attributes for all polygons in your Base layer. Leslie
Guest - k naga ratna on Sunday, 29 July 2012 23:21

Sir,
I have color each polygon with fill attributes. I have 23 polygons forming one map. I have bln file. I want to generate the whole map using different fill attributes. example blue red etc.

Ratna

Sir, I have color each polygon with fill attributes. I have 23 polygons forming one map. I have bln file. I want to generate the whole map using different fill attributes. example blue red etc. Ratna
Guest
Tuesday, 17 January 2017

Captcha Image

Keep Reading

No post has been created yet.

Subscribe To Our Blog

Most Popular

This week many users experienced a GsDraw error (1): GenericError. This error began occurring follow...
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...

Exceeding expectations

Go to top