ConvertToRegion() 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 region object that approximates the shape of another object. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

ConvertToRegion( object )

object is the object to convert; may not be a point, line, or text object.

Return Value

A region object

Description

Retains most style attributes. Other attributes are determined by the current pens or brushes. A polyline whose first and last nodes are identical will not have the last node duplicated. Otherwise, MapInfo Pro adds a last node whose vertices are the same as the first node.

The ConvertToRegion() function returns a region object which approximates the object parameter. Thus, if the object parameter represents a rectangle, ConvertToRegion() returns a region that looks like a rectangle.

The results obtained by calling ConvertToRegion() are similar to the results obtained by choosing MapInfo Pro's Convert To Regions command on the SPATIAL tab. However, the ConvertToRegion() function does not alter the original object.

See Also:

Objects Enclose statement