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.

Property

Description

Brightness

Returns/sets the image brightness.

Contrast

Returns/sets the image contrast.

FileName

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

Hue

Returns/sets the image hue.

Opacity

Returns/sets the opacity.

Saturation

Returns/sets the image saturation.

xMax

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

xMin

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

yMax

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

yMin

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

The following table provides the methods of the RasterBaseLayer object:

Method

Description

SetImageLimits

Sets the coordinates for raster base maps.

Remarks

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.

Example

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