logo

1 303 279 1021

Loading

Live Chat

All Issues

Golden Software Newsletter

Our newsletters are filled with interesting technical tips, news of how people are using Surfer, Grapher, Voxler, MapViewer, Didger and Strater, and (of course!) great illustrations.

Subscribe to Our Newsletter

Issue 48

Converting Drawn Objects from Page Coordinates to Map Coordinates

Surfer uses two sets of coordinates to keep track of objects - map coordinates and page coordinates. Maps, which are always contained within a map frame, are stored in map coordinates. Objects drawn with the drawing tools (lines, polygons, text, etc.) are stored in page coordinates.

Since drawn objects are anchored to the page using page coordinates, they do not move if the map is rescaled or repositioned. It is possible, however, to convert the drawn objects into map coordinates and overlay them into the map frame.

Figure 1 (7K)

Maps are objects within a map frame and use map coordinates.
Drawn objects use page coordinates.

To convert an object from page coordinates to map coordinates, export the drawn objects to a DXF file using map coordinates, load the DXF file as a base map, and overlay with your other maps.

Exporting drawn objects to a DXF file is a two step process. First, export the map to a DXF file and save the map coordinates. Next, export the drawn objects to a DXF file using the saved coordinates.

Step-by-step procedure

  1. Click on the map to select it.  The status bar should then indicate that a single map is selected.
  2. Choose the File | Export menu command.
  3. Specify a DXF file name in the Export dialog box.
  4. Click the check box to enable the Selected objects only option.
  5. Click the Save button.

    Figure 2 (17K)

    Select the map, choose File | Export, specify a DXF file name, enable the Selected objects only check box, and click Save.

  6. In the AutoCAD DXF Export dialog box, make sure the Scaling source is set to Application.
  7. Verify that the coordinates in the DXF Rectangle section are different than those in the Page Rectangle section.
  8. Click the check box to enable the Save scaling info option.
  9. Click OK.

    Figure 3 (21K)

    When exporting the map to a DXF file, verify that the Scaling source is set to Application, and click the check box to Save scaling info.

  10. In the plot window, deselect the map and select all the drawn objects using the Edit | Invert Selection menu command.
  11. Choose the File | Export menu command.
  12. Specify the DXF file name in the Export dialog box.
  13. Click the check box to enable the Selected objects only option.
  14. Click the Save button.
  15. In the AutoCAD DXF Export dialog box, verify that the Scaling source is set to Saved.
  16. Verify that the coordinates in the DXF Rectangle section are different than those in the Page Rectangle section.
  17. Click OK.

    Figure 4 (20K)

    When exporting the drawn objects to a DXF file, change the Scaling source to Saved.

  18. Load the DXF file as a base map.
  19. Select the maps (Edit | Select All) and choose Map | Overlay Maps.

Automating the process

A rudimentary script to automate this process has been written and is available for download fromwww.goldensoftware.com/public/scripts/surfer7/Export2Base.BAS. It handles the case where there is one map frame, and all drawn objects are to be converted. For more complicated situations, this script could serve as the starting point for further development.

 

Trusted by over 10,000 Companies and Schools


Snow Depth Map for Colorado Ski Resorts

Image Interested in creating a cool map of snow depth for Colorado Ski Resorts? Here's how to do it! First you'll need to get the snow depth information... Read More

Subscribe to Our Newsletter

Enter your email address below to receive email notifications of product updates and our newsletter, filled with helpful technical tips and case studies.