Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Курсач / Surfer / Surfer / SERFER / ГЛАВА 11.DOC
Скачиваний:
24
Добавлен:
15.04.2015
Размер:
184.32 Кб
Скачать

Spline Smoothing

Spline smoothing uses cubic spline interpolation to compute new grid nodes. Cubic spline interpolation simulates a drafting technique where a flexible strip (a spline) is used to draw a smooth curve between data points. The line segments between adjacent data points can be represented by a cubic equation. When cubic splining is applied during smoothing, the smoothest possible curves are calculated based on the original grid nodes. The original grid nodes are preserved, and the new grid nodes are defined so the surface is as smooth as possible.

Spline smoothing does not extrapolate beyond the edge of the original grid. The original grid limits are used to define the grid limits for the smoothed grid. In other words, the X and Y grid limits are the same for the original and the smoothed grid.

You can also use spline smoothing to reduce the grid density. Sometimes you might produce a grid file that is quite dense, and producing a contour map or surface plot from this grid might take a considerable amount of time. The smaller grid can be used to produce the contour map or surface plot in less time.

A spline is really nothing more than the graphs of a set of contiguous (end-point adjacent) cubic polynomials, with the same slopes at their endpoints. Cubic spline smoothing can increase the maximum Z value and decrease the minimum Z value from the input grid.

There are two ways you can use spline smoothing: by expanding the grid or recalculating the grid. When you expand the grid, you insert nodes between existing nodes in the original grid. The original grid node values are preserved in the smoothed grid, and the new grid nodes are calculated so the smoothest possible contour map or surface plot can be drawn.

When the grid is recalculated, all the grid nodes in the smoothed grid are completely recalculated. This option can either increase or decrease the number of rows and columns in the smoothed grid relative to the original grid. The original grid values are lost unless their locations correspond exactly with the grid nodes in the output grid. The smoothed grid file will still be an accurate representation of the original data.

Одна из целей сплайнового сглаживания - заполнение разреженной сетки. карта изолиний или график поверхности, построенные на основе разреженной сетки, могут иметь угловатый вид. Например, сплайновое сглаживание можно использовать для увеличения сетки 10х10 до 50х50. Более плотная сетка даст карту с более гладкими контурами.

Расширение сетки

Когда происходит расширение сетки, оригинальные узлы сетки сохраняются в сглаживаемой сетке, и появляются новые узлы, размещаемые между существующими. Число внедряемых узлов определяется в окне редактированияNumber of Insertв ДОSpline Smoothing.

Чтобы расширить сетку:

  1. Выберите команду Spline Smoothingиз менюGrid. В ДОOpen Gridопределите сетку, которую необходимо сгладить. Если Вы хотите преобразовать только часть сетки, нажмите кнопкуOptionsи задайте первую и последнюю строки и столбцы, определяющие часть сетки. Кликните ОК, чтобы вызвать ДОSpline Smooth.

  2. Выберите опцию Insert Nodesв группеMethod, чтобы активизировать группуNumber of Nodes to Insert.

  • The Between Rows edit box allows you to specify the number of rows to insert between the existing rows in the grid file. Rows correspond to grid nodes of constant Y.

  • The Between Cols edit box allows you to specify the number of columns to insert between the existing columns in the grid file. Columns correspond to grid nodes of constant X. Напечатайте желаемое значение или воспользуйтесь полосами прокрутки, чтобы сменить значения.

  1. Напечатайте значение или воспользуйтесь полосами прокрутки, чтобы сменить значение для числа вставляемых узлов. После внесения изменений они отображаются в группе Final Grid Size.

  2. Если необходима информация о исходном файле сетки, нажмите кнопку Grid Info.

  3. Кликните ОК.

Пересчет сетки

  1. * The Final Grid Size group allows you to give user specified numbers of rows and columns for the final grid file. You can increase or decrease the number of rows and columns in the grid file. You could also increase one dimension while decreasing the other dimension.

  2. The # Rows edit box allows you to specify the number of rows for the smoothed grid file.

  3. The # Cols edit box allows you to specify the number of columns for the smoothed grid file.

  4. * The Output Grid File group allows you to specify the path and file name for the smoothed grid file. The default name is OUT.GRD, and this file is written to the current directory. To change the name or path for the smoothed grid, click the Browse button and specify the changes.

  5. * The Grid Info button displays information about the grid file to be smoothed.

Blanking a Grid File

The Blank command is used to remove grid node data from a grid file in areas not supported by original data, or in areas where you do not want to display contours on a map. Blanking assigns a blanking code (1 .7014le+038) to specified groups of grid nodes in a blanked grid file. Blanked grids contain the same number of grid nodes, and the same grid limits as the original grid file. The grid nodes in the blanked grid are identical to the values in the original grid except in those locations where the blanking values are assigned.

Blanking boundaries are defined in a blanking file, a special ASCII format file containing the XY coordinates defining the boundary. Blanking files can be made with the SURFER worksheet. Blanking can be assigned to the region inside or outside the blanking boundary. Alternatively, blanking regions can be specified using the Blank Node command in the Grid Editor window. See the The Grid Editor section of this chapter for more information.

When you display a blanked grid file as a contour map, contour lines are not drawn in the blanked regions. When you are using color fill on a contour map, the blanked areas are filled with the fill attribute assigned to the maximum contour level. Contours produced from blanked plots are truncated at the edges of any grid cell containing a blanking value at any one of the nodes at the corners of the cell. Contour lines drawn on a blanked grid might not extend entirely up to the blanking boundary. This effect is most pronounced when you use sparse grids.

When you display a blanked grid file as a surface plot the blanked regions appear as low flat regions at the same level as the minimum Z value in the blanked file.

Blanking [.BLN] Files

Blanking files can contain one or more polygons. The blanking operation in SURFER uses the boundaries defined in the blanking file to assign a blanking value

to grid nodes in a grid [.GRD] file. When a polygon is defined in a [.BLNIJ file, the first and last coordinate pair must be identical so the polygon is a closed object. Blanking files are ASCII files that can be created in the Worksheet or any ASCII editor. Blanking files contain coordinates defining vectors used to draw polylines or polygons.

Each line of the blanking file has two values. The first value on the first line (called the header line) is the number of XY coordinates used to define the blanking boundary. The second value on the first line is either a 0 or 1, where 0 means to blank outside the boundary, and 1 means to blank inside the boundary. The second line contains the XY coordinates defining the beginning point for the boundary. The X coordinate is placed in the first column and the Y coordinate is placed in the second column. The third row contains the XY coordinates for the second point, and so on. Each boundary coordinate is placed on a separate line. For blanking, the boundary must be closed, meaning that the final XY coordinate pair must be identical to the first XY coordinate pair.

A blanking file can be used to blank more than one area at a time, but only if you are blanking inside the blanking boundaries. To add a second blanking area, use the same format as described above, adding the second boundary immediately after the first boundary in the blanking file. The second value in the header line should be a 1 for all the boundaries, otherwise the entire grid will be blanked.

The XY coordinates used in the blanking file are measured in the same data units used for the XY coordinates in the grid file. For example, if your data ranges from 1000 to 2000 units in the X and Y dimensions of the grid file, the blanking XY coordinates must be in the same range.

Файл [.BLN]может быть создан в рабочем окнеSurferили любой другой программой, сохраняющей файлы в форматеASCII. Общий формат таких файлов:

npoints, flag npoints определяет число пар координат Х,Y, использующееся для задания этой границы;flag определяет тип гашения и может быть либо 0, либо 1. 0 используется для гашения за пределами указанной области, а 1 - внутри заданной области.

х1,y1 первая пара координат

х2,y2 вторая пара координат

…..

xn,yn последняя пара координат. Для замкнутой области эта точка должна быть идентична первой.

npoints, flag строка заголовка для второй границы в файле гашения. Файл может содержать любое число областей (или ломаных линий, использующихся только как границы).

х1,y1 и т.д.

Соседние файлы в папке SERFER