Follow

Converting the Coordinate System of Data, Image, Vector, and Grid Files in Surfer

Did you know that Surfer can easily convert the coordinate system (e.g. projection and datum) of any supported file format? You may want to convert the coordinate system of data, image, vector or grid files (e.g. from geographic lat/long to UTM) for a variety of reasons, such as calculating volumes in specific units or for use in other software packages that do not support coordinate systems. Simply import the data or create a map, convert the coordinate system (e.g. Lat/Lon to UTM), and save the converted data. It’s that simple.

This article outlines the exact steps to follow to convert the coordinate system of four different types of file formats:

  1. Raw data (e.g. CSV, DAT, XLSX, and TXT)
  2. Vector and Image files (e.g. DXF, SHP, E00 or TIF, BMP and JPG)
  3. Grid or DEM files (e.g. GRD, ASC, FLT, and DEM)

Raw Data

You can convert the coordinate system of data in data files using the Surfer worksheet. The steps are:

  1. Click File | Open, select the data file and click Open. It opens in the Surfer worksheet.
  2. Click Data | Coordinate System | New Projected Coordinates.
  3. In the New Projected Coordinates dialog, you must tell Surfer what columns are to be converted, what coordinate system the data is currently in, and what coordinate system you want the data to be in.
    1. Specify the Source Columns for X and Y. These are the columns in which the original X and Y data are located.
    2. Click the (…) button to the right of Source Coordinate System.
    3. In the Assign Coordinate System dialog, select the current coordinate system of the existing data and click OK.
    4. Specify the Target Columns for X and Y. These are the columns in which you want the converted data to be stored. These must be different than the original source columns. By default, the first two empty columns are selected.
    5. Click the (…) button to the right of Target Coordinate System.
    6. In the Assign Coordinate System dialog, select the coordinate system you want to convert the data to and click OK.
1rawdata
Set the source data columns and coordinate system, and specify the
coordinate system and columns for the converted data.
  1. Click OK and the data is converted. The target columns are populated with the converted data.
2rawdata
The source data is converted to the target coordinate system in the specified columns.
  1. Click File | Save to save the data file for future use, and File | Close to close it.

Vector and Image Files

You can also convert the coordinate system of any base map file format, such as vector files and image files. The steps are:

  1. Click Home | New Map | Base, select the vector or image file and click Open. The base map is created.
3image
Create a base map from the file in the original coordinate system.
  1. Verify that the original, source coordinate system is defined for the Base layer.
    1. In the Contents window, select the Base layer.
    2. In the Properties window, click the Coordinate System tab.
    3. The original coordinate system must be specified. In some cases (e.g. you have a georeferenced image file or a PRJ projection information file), this information is automatically entered. If the existing coordinate system is already listed, you can skip this step. If not, and the Name says Unreferenced local system, then you will need to manually specify the file’s current coordinate system. To do this:
      1. Click the Set button.
      2. In the Assign Coordinate System dialog, select the current coordinate system of the imported file.
      3. Click OK.
  2. Now the map can be converted into the new coordinate system.
    1. Select Map in the Contents window.
    2. In the Properties window, click the Coordinate System tab.
    3. Click the Change button.
    4. In the Assign Coordinate System dialog, select the coordinate system you want to convert the image or vector file into.
    5. Click OK. The map on the screen is converted to the new coordinate system.
4image
Change the coordinate system of the map to convert the base map data.
  1. In the Contents window, uncheck the four axes (Right Axis, Left Axis, Top Axis, Bottom Axis).
  2. Save the converted image or boundary file to a new file.
    1. Click File | Export.
    2. Give the file a name, choose the file format to save it to (e.g. SHP, DXF, or TIF file), and click Save.
    3. In the Export Options dialog, click the Spatial References tab. It is recommended that you save the spatial reference information in one or more of the available formats (the formats available depend on the file format that is being exported). This way, the information will be saved for when you use the file again in Surfer or in another software package.
    4. Click OK. This new file is in the new coordinate system.

Grid Files

 Surfer v14 can reproject grid files using the Grids | Edit | Project command. See the steps below the image.

reproject_grid.png
Reproject a grid with Surfer's Grids | Edit | Project command.
  1. Click Grids | Edit | Project.
  2. In the Grid Project dialog, select the input grid from the dropdown list, or click Browse, select the grid, and click Open.
  3. Click the Set button in the Input Grid section.  
  4. In the Assign Coordinate System dialog, navigate to and select the input grid's current coordinate system.
  5. Click OK.
  6. In the Output Grid section, click the Change Filename (yellow folder) icon.
  7. In the Save Grid As dialog, enter a File Name.
  8. Click Save.
  9. Click the Set button in the Output Grid section.  
  10. In the Assign Coordinate System dialog, navigate to and select the new coordinate system.
  11. Click OK.
  12. If desired, check the Resize output grid box, and enter new values for # Rows and # Cols.
  13. If desired, choose a different Resample method.
  14. Click OK.
  15. In the Export options dialog, check any desired spatial reference file types. I recommend at least checking GS Reference (Version 2) file, if continuing work in Surfer.
  16. Click OK.
  17. Click OK in the Surfer dialog alerting you that the grid was created. 

Surfer v13 and previous can also convert the coordinate system of grid files. This is done by converting the grid file to a data file, converting the data, and regridding with specific parameters. No interpolation occurs during the regridding process, so the original data is not being changed in any way, only the X and Y coordinate values are changed. The steps are:

    1. Click Grid | Convert.
    2. In the Open Grid dialog:
      1. Select the grid file to convert.
      2. In the Grid Info section, note the Size of the grid file in rows and columns. This information will be used later.
5grid
Note the size of the selected grid file, in rows and columns.
    1. Click Open.
  1. Set the Save as type to DAT XYZ (*.dat) format and click Save.
  2. Follow the steps above for converting the coordinate system of Raw Data.
  3. Click Grid | Data, select the DAT file saved in the last step and click Open.
  4. In the Grid Data dialog:
    1. Select the new X and Y columns with the converted data.
    2. Select Column C as the Z column.
    3. Select the Nearest Neighbor gridding method
    4. Change the # of Nodes in the X Direction to the number of columns noted above in step 2b.
    5. Change the # of Nodes in the Y Direction to the number of rows noted above in step 2b.
6grid
Grid the converted data using specific parameters.
  1. Click OK and the grid file is created. This is the converted grid file, which you can use in Surfer or in other software packages.

Converting the coordinate system of any data is a powerful feature in Surfer. There’s no need to use other software packages for this task and complicate your workflow. It allows you to exchange data with colleagues without worrying about mixing and matching coordinate systems, you can perform calculations and get results in the units you need, and you can use a multitude of different software packages ensuring complete compatibility.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.