Purpose:
Returns raster and geographic control point coordinates for an image table. The geographic coordinates will be in the current MapBasic coordinate system.
Syntax:
ControlPointInfo( table_id, attribute, controlpoint_num )
table_id is a string representing a table name, a positive integer table number, or 0 (zero). The table must be a raster, grid or WMS table.
attribute is an integer code indicating which aspect of the control point to return.
controlpoint_num is the integer number of which control point to return. Control point numbers start at 1. The maximum control point number can be found by calling
RasterTableInfo(table_id, RASTER_TAB_INFO_NUM_CONTROL_POINTS)
Return Value
The X or Y raster coordinate is returned as an Integer. The X or Y geographic coordinate is returned as a Float. The return type depends upon the attribute flag, for the control point specified by controlpoint_num.
The attribute parameter can be any value from the table below. Codes in the left column (for example, RASTER_CONTROL_POINT_X) are defined in MAPBASIC.DEF.
attribute code | ID | ControlPointInfo() returns: |
---|---|---|
RASTER_CONTROL_POINT_X | 1 | Integer result, representing the X coordinate of the control point number specified by controlpoint_num |
RASTER_CONTROL_POINT_Y | 2 | Integer result, representing the Y coordinate of the control point number specified by controlpoint_num |
GEO_CONTROL_POINT_X | 3 | Float result, representing the X coordinate of the control point number specified by controlpoint_num |
GEO_CONTROL_POINT_Y | 4 | Float result, representing the Y coordinate of the control point number specified by controlpoint_num |
TAB_GEO_CONTROL_POINT_X | 5 | Float result, representing the X coordinate of the control point number specified by controlpoint_num stored in the raster image TAB file |
TAB_GEO_CONTROL_POINT_Y | 6 | Float result, representing the Y coordinate of the control point number specified by controlpoint_num stored in the raster image TAB file |