GridSplineSmooth2

GridSplineSmooth2 smooths an existing grid by interpolating new points with a cubic spline. Returns a Boolean. Returns 'True', if the operation is successful, otherwise, returns 'False'.

Syntax

object.GridSplineSmooth2( InGrid, nRow, nCol, Method, OutGrid, OutFmt, OutGridOptions )

Parameter

Type

Required/

Optional

Default

Description

InGrid

String

Required

 

This provides the path and file name of the input grid file.

nRow

Integer

Required

 

This specifies the number of nodes to insert between rows (Method=srfSplineInsert) or number of rows (

nCol

Integer

Required

 

This specifies the number of nodes to insert between columns (Method=srfSplineInsert) or number of columns(

Method

SrfSplineMethod

Optional

srfSplineInsert

This specifies the method either insert nodes or recalculate grid.

OutGrid

String

Optional

""

This provides the path and file name of the output grid file.

OutFmt

SrfGridFormat

Optional

srfGridFmtS7

This provides the output grid file format.

OurGridOptions

String

Optional

""

This provides the output option string for the grid format.

Example 1

This example demonstrates how to smooth demogrid.grd by doubling the number of rows and quadrupling the number of columns, saving the result as dgrid1.grd.

SurferApp.GridSplineSmooth2(InGrid:=SurferApp.Path+\Samples

nRow:=2, nCol:=4, Method:=srfSplineInsert, _

OutGrid:="c:\temp\dgrid1.grd", OutFmt:=srfGridFmtS7)

Example 2

This example smoothes diablo.grd with new points interpolated with a cubic spine and saves the spatial reference as an Esri World file.

Surfer.GridSplineSmooth2(InGrid:=InGridPath+"diablo.grd", nRow:=3, nCol:=2, OutGrid:=OutGridPath + "SplineSmooth.grd", OutFmt:=srfGridFmtS7, OutGridOptions:="UseDefaults=1, ForgetOptions=1, SaveRefInfoAsESRIWorld=1")

Example 3

This script displays all the methods in the Application object.

Used by: Application object