Purpose
Returns a copy of the input object offset by the specified X and Y offset values using a cartesian DistanceType. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
CartesianOffsetXY( object, xoffset, yoffset, units )
object is the object being offset.
xoffset and yoffset are the distance along the x and y axes to offset the object.
units is a string representing the unit in which to measure distance.
Return Value
Object
Description
This function produces a new object that is a copy of the input object offset by xoffset along the X-axis and yoffset along the Y-axis. The unit string, similar to that used for ObjectLen() function or Perimeter() function, is the unit for the distance values. The DistanceType used is Cartesian. If the coordinate system of the input object is Lat/Long, an error will occur, since Cartesian DistanceTypes are not valid for Lat/Long. This is signified by returning a NULL object. The coordinate system used is the coordinate system of the input object.
There are some considerations for Spherical measurements that do not hold for Cartesian measurements. If you move an object that is in Lat/Long, the shape of the object remains the same, but the area of the object will change. This is because you are picking one offset delta in degrees, and the actual measured distance for a degree is different at different locations.
For the Offset functions, the actual offset delta is calculated at some fixed point on the object (e.g., the center of the bounding box), and then that value is converted from the input units into the coordinate system's units. If the coordinate system is Lat/Long, the conversion to degrees uses the fixed point. The actual converted distance measurement could vary at different locations on the object. The distance from the input object and the new offset object is only guaranteed to be exact at the single fixed point used.