Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h2. Name

bmo — Border model

h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}

*bmo* \[*inc*] | \[_nx_ _ny_] | \[*long*] \[*y*] \[*ibo*] \[*cel*] \[*vary*] 

{panel}

h2. Description

Generate a border model 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. 

h2. Arguments

{indent}
No arguments, the grid will have the same number of rows and columns as the last grid that set the @nrow @ncol variables. 
{indent}
*inc* _xinc_ _yinc_ 
{indent}** Create border model grid with increments _xinc_ and _yinc_ .
{indent}
_nx_ _ny_ 
{indent}
Create a grid with _nx_ times _ny_ grid cells. 
{indent}
*long* _num_ 
{indent}
Create a grid with _num_ nodes for the longest side. Use the same increment for the shortest side. 
{indent}
*ibo* 
{indent}
Include border. Makes an extra rim of defined gridcells along the border. 
{indent}
*y* 
{indent}
Grid only in y direction. Defaly is in x direction. Use the intersection of x or y gridding. 
{indent}
*cel* 
{indent}
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. 
{indent}
*vary* _varynumber_ 
{indent}
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. 
{indent}

h2. Examples

h3. Ex.1: Boundary gridding

{noformat:|borderWidth=1|bgColor=#eeeeee}
        bmo inc 250 250 ;# border model closed line to a grid with x and y grid cell increments of 250
{noformat}

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

{noformat:|borderWidth=1|bgColor=#eeeeee}
        # 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
{noformat}

The above example produces this image. 

!att:_img_ref^cmd_bmo.png|border=1,width=500!
_Border model grid with details at the border_

h2. See also

[acm start/stop|acm], [bmc], [clp], [mak clo|mak], [mak sha|mak]