RasterBaseLayer Object

The RasterBaseLayer object contains the properties and methods for a base (raster) map layer created in Surfer with the Shapes method AddRasterBaseLayer or AddRasterBaseMap.

Derived from: Layer object, which is derived from Shape object (All methods and properties of Layer and Shape apply to this object.)

The following table provides the properties of the RasterBaseLayer object.




Returns/sets the image brightness.


Returns/sets the image contrast.


Returns/sets the name of the file used to create the Base map.


Returns/sets the image hue.


Returns/sets the opacity.


Returns/sets the image saturation.


Returns the maximum X coordinate in map units. It is a read-only property.


Returns the minimum X coordinate in map units. It is a read-only property.


Returns the maximum Y coordinate in map units. It is a read-only property.


Returns the minimum Y coordinate in map units. It is a read-only property.

The following table provides the methods of the RasterBaseLayer object:




Sets the coordinates for raster base maps.


Not all of methods and properties can be changed for objects within a base layer. However, the Shapes property can be used to set the following methods and properties:

  • All the properties/methods for the polyline, polygon, point, text, metafile, bitmap, spline polyline,ellipse, rectangle, and rounded rectangle objects in a base layer.

  • The Name, Visible, Type, and SetZOrder properties for shapes in the base layer.

  • The Shapes property can use the BreakApart method to break apart a composite object in a base layer.


The following script demonstrates how the RasterBaseLayer object is used in reference to the MapFrame object.

Sub Main


'Declares SurferApp as an object

Dim SurferApp As Object


'Creates an instance of the Surfer Application object and assigns

'it to the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")


'Makes Surfer visible

SurferApp.Visible = True


'Declares Plot as an object

Dim Plot As Object


'Creates a plot document in Surfer and assigns it to the variable

'named "Plot"

Set Plot = SurferApp.Documents.Add(srfDocPlot)


'Declares Shapes as an object

Dim Shapes As Object


'Assigns the Shapes collection to the variable named "Shapes"

Set Shapes = Plot.Shapes


'Declares MapFrame as an object

Dim MapFrame As Object


'Creates a base map and assigns the map coordinate system to the

'variable named "MapFrame"

Set MapFrame = Shapes.AddBaseMap(ImportFileName:=SurferApp.Path+"\Samples\diablo_sat.tif")


'Declares RasterBaseLayer as an object

Dim RasterBaseLayer As Object


'Assigns the base map properties to the variable named "RasterBaseLayer"

Set RasterBaseLayer = MapFrame.Overlays(1)


End Sub