Method 1: Manually remove the points from the data file
This method is good if there are just a few points outside the boundary (less than 50) and involves the use of the Track Cursor command. You would use Track Cursor and click on points in a post map, and those points are highlighted in the worksheet. You can then delete the points in the worksheet, save the file, and reload the data. Those points will then be removed from the post map. If you have the plot and worksheet windows in a tiled view, then it makes editing of extraneous or other specific data points very easy.
The steps are:
- Create the post map in the plot window (Home | New Map | Post | Post, select the data file and click Open).
- Select the post map and click Home | Add to Map| Layer | Base, select your BLN file and click Open. Now your polygon is on top of the posted points.
- Click to File | Open, select the data file again, click Open, and the data file opens in the worksheet window.
- In the worksheet window, if your X and Y data columns are not columns A and B, click Data | Data | Assign XYZ Columns to assign the correct columns to your X and Y data.
- Click View | Windows | Tile Vertical to arrange the windows next to each other.
- Enable cursor tracking by clicking Map Tools | Layer Tools | Track Cursor.
- Click in the plot window near one of the points outside the boundary, and that point is highlighted in the worksheet window.
- Click in the worksheet window and edit or delete the point from the worksheet.
- Then click back in the plot window near your next point and that point is highlighted in the worksheet window. Remove that point.
- When you are done removing all the points from the worksheet, click File | Save As to save the changes to a new data file.
- Select the Post layer in the Contents window and in the Properties window on the General page, click the Open File button, and load the new data file as the data file for the post map.
Method 2: Blank the grid outside the boundary, and identify the points that fall in the blanked areas with Grid Residuals
This method is good if there are a large number of data points outside the boundary, or if you are using Surfer 8 or previous. It involves using Grids | Residuals on a blanked grid to create a new data file. The data points that lie in the blanked regions (outside the polygon) are easy to identify in the new data file.
The steps are:
- Click Grid | Data and grid the XYZ data from the points.
- Click Grid | Blank, select the grid file and click Open.
- Select the BLN file containing the polygon and click Open.
- Give the blanked grid a new name and click Save.
- Click Grid | Calculate | Residuals, select the new blanked grid and click Open.
- Select the original data file you gridded and click Open.
- Assign the correct XYZ data columns for the data file, specify a residual column, and click OK.
- This opens a worksheet. Highlight all the data columns and click Data | Date | Sort.
- Choose to sort by the Residuals column, in Ascending order, and click OK.
- Now all the data points that are within the boundary are listed at the top of the worksheet with actual data in the Residuals column. Delete all the other data rows that do not have data in the Residuals column.
- Click File | Save As and save this to a new data file. This new data file only has the data points within the boundary.
- Create the post map of this data file.
Alternatively, you could also use our MapViewer software. MapViewer has an option to identify the records in a region (or points in a polygon).
- I want to extract all of my post map points within a polygon on my base layer. How can I do this?
- How can I interactively edit or remove points from a data set or post map in Surfer?
Updated January 16, 2017