bmo - Border model grid

Name

bmo — Border model into grid

Syntax

bmo [inc] | [nx ny] | [long] [y] [ibo] [cel] [vary]

Description

Generate a border model grid from a closed polygon. The border model will contain defined grid nodes inside the border polygon, and undefined values outside. The value of defined grid nodes will be 0.

The purpose of the border model grid is mainly as a mask grid for extracting a similar part of another grid or as a reference grid in various algorithms.

Arguments

No arguments, the grid will have the same number of rows and columns as the last grid that set the @nrow @ncol variables.

inc xinc yinc

Create border model grid with increments xinc and yinc .

nx ny

Create a grid with nx times ny grid cells.

long num

Create a grid with num nodes for the longest side. Use the same increment for the shortest side.

ibo

Include border. Makes an extra rim of defined gridcells along the border.

y

Grid only in y direction. Defaly is in x direction. Use the intersection of x or y gridding.

cel

Applying bmo with arguments cel will be run for each cell in input and merged into the result grid. Useful if there are complicated and overlapping cells.

vary varynumber

Vary the cutting algorithm slightly if bmo has problems. varynumber is a number between 2 and 10 and tells how many trials to achieve paired cutting through the dataset for each gridline.

Examples

Ex.1: Boundary gridding

        bmo inc 250 250 ;# border model closed line to a grid with x and y grid cell increments of 250

Ex.2: Bordel model with detailed study of the grid

        # bordel model with detailed study of the grid
        vie def ini  ; # view initialization
        vie 1 1 1 ; # get first overall viewport
        pol 2 ; # display the input line in line width 2
        bmo 100 100 ; # border model with 100 elements in rows and columns
        col bla ; # black color
        poll  ; # show grid cell structure
        vie coor 0.05 0.05 0.35 0.35 ; # get small viewport
        col bla ; # black color
        poll ; # show grid cell structure

The above example produces this image.


Border model grid with details at the border

See also

acm start/stop, bmc - Border model edge clipping, clp - Clip with closed line, mak clo, mak sha