MBR() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns a rectangle object, representing the minimum bounding rectangle (MBR) of another object. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

MBR( obj_expr )

obj_expr is an object expression.

Return Value

Object (a rectangle)

Description

The MBR() function calculates the minimum bounding rectangle (MBR) which encompasses the specified obj_expr object.

A minimum bounding rectangle is defined as being the smallest rectangle which is large enough to encompass a particular object. In other words, the MBR of the United States extends east to the eastern tip of Maine, south to the southern tip of Hawaii, west to the western tip of Alaska, and north to the northern tip of Alaska.

The MBR of a point object has zero width and zero height.

Example

Dim o_mbr As Object
Open Table "world"
Fetch First From world
o_mbr = MBR(world.obj)

See Also:

Centroid() function, CentroidX() function, CentroidY() function