Click or drag to resize

CDUrGetGriddingAzimuthToMinimizePadding Method

Return the gridding azimuth (degrees CW from north) that minimizes padding.

Namespace:  Geosoft.Desktop.GXNet
Assembly:  geosoft.desktop.gxnet (in geosoft.desktop.gxnet.dll) Version: 2024.2.0.25
Syntax
public static double rGetGriddingAzimuthToMinimizePadding(
	CDB db,
	int xCh,
	int yCh,
	int mCh,
	ref double x1,
	ref double y1,
	ref double x2,
	ref double y2,
	ref double x3,
	ref double y3,
	ref double x4,
	ref double y4
)

public static double rGetGriddingAzimuthToMinimizePadding(
	CDB db,
	int xCh,
	int yCh,
	int mCh,
	ref double x1,
	ref double y1,
	ref double x2,
	ref double y2,
	ref double x3,
	ref double y3,
	ref double x4,
	ref double y4
)

Parameters

db
Type: GeoEngine.Core.GXNetCDB
Database
xCh
Type: SystemInt32
X channel [<define>DB_LOCK_READONLY</define>]
yCh
Type: SystemInt32
Y channel [<define>DB_LOCK_READONLY</define>]
mCh
Type: SystemInt32
Data or mask channel [<define>DB_LOCK_READONLY</define>]
x1
Type: SystemDouble
Returned Corner 1 - X
y1
Type: SystemDouble
Returned Corner 1 - Y
x2
Type: SystemDouble
Returned Corner 2 - X
y2
Type: SystemDouble
Returned Corner 2 - Y
x3
Type: SystemDouble
Returned Corner 3 - X
y3
Type: SystemDouble
Returned Corner 3 - Y
x4
Type: SystemDouble
Returned Corner 4 - X
y4
Type: SystemDouble
Returned Corner 4 - Y

Return Value

Type: Double
Remarks
Especially if the survey lines do not run N-S or E-W, gridding parallel to the XY axes results in up to half the gridding area being dummies (padding), which is not only inefficient, but affects processes like filtering. This algorithm determines the data rotation required such that the gridding extents rectangle fit around the data minimizes the amount of padding. The result is good to the nearest degree. The corner points are returned and include a buffer around the edge equal to 1% of the maximum height/width. The returned azimuth will be in the range 0 to 89. Operates on all selected lines.
See Also