Vr Mapping

ON-LINE REFERENCE DOCUMENTATION

CARDINAL SYSTEMS, LLC

www.cardinalsystems.net

Geometry Class Reference (PyVrGeom)

Helper coordinate geometry routines More...

Members

AziConv (Angle)
AziNorth (x1, y1, x2, y2)
AziSouth (x1, y1, x2, y2)
AziEast (x1, y1, x2, y2)
DeltaAng (Azi1, Azi2)
Dist (x1, y1, x2, y2)
ZenithAng (x1, y1, z1, x2, y2, z2)
IsShorter (x1, y1, x2, y2, x3, y3, x4, y4)
SlopeDist (x1, y1, z1, x2, y2, z2)
Wind (MinX, MinY, MaxX, MaxY, TestX, TestY)
InterY2D (X1, Y1, X2, Y2, X3, )
InterX2D (Y3, X1, Y1, X2, Y2, )
InterXY (x1, y1, z1, x2, y2, z2, z3)
InterElev (x1, y1, z1, x2, y2, z2, x3, y3)
InterZ3 (x1, y1, z1, x2, y2, z2, x3, y3, z3, x, y)
RotPoint (BaseX, BaseY, x, y, Rot)
OfsInt (LineX1, LineY1, LineX2, LineY2, PointX, PointY)
PntToLine1 (LineX1, LineY1, LineX2, LineY2, PointX, PointY)
PntToLine2 (LineX1, LineY1, LineZ1, LineX2, LineY2, LineZ2, PointX, PointY, PointZ)
PntToLine3d (LineX1, LineY1, LineZ1, LineX2, LineY2, LineZ2, xp, yp, zp)
CanLinesCross (MinX1, MinY1, MaxX1, MaxY1, MinX2, MinY2, MaxX2, MaxY2)
IsPointOnLine (LineX1, LineY1, LineX2, LineY2, PointX, PointY)
IsLineOnLine (x1, y1, x2, y2, x3, y3, x4, y4)
OfsLine (Offset, OrgX1, OrgY1, OrgX2, OrgY2)
DoLinesIntersect (Line1X1, Line1Y1, Line1X2, Line1Y2, Line2X1, Line2Y1, Line2X2, Line2Y2)
CanLineCrossMbr (x1, y1, x2, y2, MinX, MinY, MaxX, MaxY)
LineLineInt (Line1X1, Line1Y1, Line1X2, Line1Y2, Line2X1, Line2Y1, Line2X2, Line2Y2)
BearBearInt (x1, y1, Azi1, x2, y2, Azi2)
DistDistInt (x1, y1, dist1, x2, y2, dist2)
BearDistInt (x1, y1, Azi1, x2, y2, Dist2)
Circ3Pt (x1, y1, x2, y2, x3, y3)
AngleIncr (Radius, Scale)
AngleB (x1, y1, xc, yc, x2, y2)
AngleDeflect (x1, y1, x2, y2, x3, y3)
AziToBear (Azi)
BearToAzi (Bear, Quad)
FmtAzi (Azi, Accur, Direction)
ParseDms (Dms)
FmtBear (Bearing, Quadrant, Accur, FmtOpt)
DoesMbrOverlap (DstStartX, DstStartY, DstEndX, DstEndY, SrcStartX, SrcStartY, SrcEndX, SrcEndY)
GetOverlapArea (DstStartX, DstStartY, DstEndX, DstEndY, SrcStartX, SrcStartY, SrcEndX, SrcEndY)
GetOverlapAreaD (DstStartX, DstStartY, DstEndX, DstEndY, SrcStartX, SrcStartY, SrcEndX, SrcEndY)

 


Description

The Python VrOne Geometry Class contains useful coordinate geometry routines.  Calls to this class use the same coordinate geometry routines used by VrOne. This class is provided to reduce user development time by using time-tested VrOne C++ routines. Unless otherwise specified, routines expect double precision numbers.


Member Function Documentation

AziConv (Angle)

Converts an angle between clockwise from North and counterclockwise from East.

Angle

 

AziNorth (x1, y1, x2, y2)

Computes North Azimuth from 2 coordinate positions.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

returns

(ret)

 

ret

Azimuth clockwise from North in radians.

AziSouth (x1, y1, x2, y2)

Computes South Azimuth from 2 coordinate positions.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

returns

(ret)

 

ret

Azimuth clockwise from South in radians.

AziEast (x1, y1, x2, y2)

Computes East Azimuth from 2 coordinate positions. This angle is normally used for text rotations.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

returns

(ret)

 

ret

Azimuth counterclockwise from East in radians.

DeltaAng (Azi1, Azi2)

Returns the delta angle between two azimuths. Always returns the acute angle.

Azi1

Azimuth 1 to compare (in radians)

Azi2

Azimuth 2 to compare (in radians)

returns

(ret)

 

ret

Delta angle.

Example (in degrees): Azi1 = 350 Azi2 = 10 returns 20

Dist (x1, y1, x2, y2)

Computes the 2D distance between two points.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

returns

(ret)

 

ret

Distance.

ZenithAng (x1, y1, z1, x2, y2, z2)

Computes zenith angle from two 3D points.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

z1

Z coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

z2

Z coordinate of point 2.

returns

(ret)

 

ret

Zenith angle (radians)

IsShorter (x1, y1, x2, y2, x3, y3, x4, y4)

Determines if line1 is shorter than line2.

x1

X coordinate of line 1 point 1.

y1

Y coordinate of line 1 point 1.

x2

X coordinate of line 1 point 2.

y2

Y coordinate of line 1 point 2.

x3

X coordinate of line 2 point 1.

y3

Y coordinate of line 2 point 1.

x4

X coordinate of line 2 point 2.

y4

Y coordinate of line 2 point 2.

returns

(ret)

 

ret

0=Line1 is shorter than Line2, 1=Line1 is longer than or equal to Line2

SlopeDist (x1, y1, z1, x2, y2, z2)

Computes slope distance between two 3D points.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

z1

Z coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

z2

Z coordinate of point 2.

returns

(ret)

 

ret

Slope distance.

Wind (MinX, MinY, MaxX, MaxY, TestX, TestY)

  Returns the relationship of a point within a window.

 

         |       |

     9   |   1   |   5

         |       |

  -----------------------  < MaxY

         |///////|

     8   |///0///|   4

         |///////|

  -----------------------  < MinY

         |       |

     10  |   2   |   6

         |       |

         ^       ^

      MinX       MaxX

   

MinX

Minimum X coordinate for bounding window.

MinY

Minimum Y coordinate for bounding window.

MaxX

Maximum X coordinate for bounding window.

MaxY

Maximum Y coordinate for bounding window.

TestX

X coordinate of test point.

TestY

Y coordinate of test point.

InterY2D (X1, Y1, X2, Y2, X3, )

Interpolates the unknown Y of three points.

X1

X coordinate of point 1.

Y1

Y coordinate of point 1.

X2

X coordinate of point 2.

Y2

Y coordinate of point 2.

X3

X coordinate of point 3.

 

 

returns

(UnknownY)

 

UnknownY

 

InterX2D (Y3, X1, Y1, X2, Y2, )

Interpolates the unknown X of three points.

Y3

Y coordinate of point 3.

X1

X coordinate of point 1.

Y1

Y coordinate of point 1.

X2

X coordinate of point 1.

Y2

Y coordinate of point 2.

 

 

returns

(UnknownX)

 

UnknownX

 

InterXY (x1, y1, z1, x2, y2, z2, z3)

Interpolates the XY position along a line based on the elevation

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

z1

Z coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

z2

Z coordinate of point 2.

z3

Known elevation

returns

(x3, y3)

 

x3

Return X.

 

y3

Return Y.

InterElev (x1, y1, z1, x2, y2, z2, x3, y3)

Interpolates the unknown elevation of three points.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

z1

Z coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

z2

Z coordinate of point 2.

x3

X coordinate of point 3.

y3

Y coordinate of point 3.

returns

(z3)

 

z3

Unknown elevation of third point. If there is no distance between points one and two then Z3 returns with the elevation of Z1.

InterZ3 (x1, y1, z1, x2, y2, z2, x3, y3, z3, x, y)

Interpolates a Z from a 3D surface defined by a triangle.

x1

X coordinate of point 1 on triangle.

y1

Y coordinate of point 1 on triangle.

z1

Z coordinate of point 1 on triangle.

x2

X coordinate of point 2 on triangle.

y2

Y coordinate of point 2 on triangle.

z2

Z coordinate of point 2 on triangle.

x3

X coordinate of point 3 on triangle.

y3

Y coordinate of point 3 on triangle.

z3

Z coordinate of point 3 on triangle.

x

X coordinate of point to interpolate Z.

y

Y coordinate of point to interpolate Z.

returns

(z)

 

z

Return elevation.

RotPoint (BaseX, BaseY, x, y, Rot)

Rotates a point about a base point.

BaseX

X coordinate of base point.

BaseY

Y coordinate of base point.

x

X coordinate of point to be rotated.

y

X coordinate of point to be rotated.

Rot

Rotation angle clockwise (in radians).

returns

(x, y)

 

x

Return point x.

 

y

Return point y.

OfsInt (LineX1, LineY1, LineX2, LineY2, PointX, PointY)

Computes the offset and distance from a point to a line.

LineX1

X coordinate of point 1 of the line.

LineY1

Y coordinate of point 1 of the line.

LineX2

X coordinate of point 2 of the line.

LineY2

Y coordinate of point 2 of the line.

PointX

X coordinate of point.

PointY

Y coordinate of point

returns

(Offset, Distance)

 

Offset

Resulting offset with the following conditions:

Positive - Point is to the right of the line.

Negative - Point is to the left of the line.

 

Distance

Resulting distance from point to line.

PntToLine1 (LineX1, LineY1, LineX2, LineY2, PointX, PointY)

Snaps a point to a line 2D.

LineX1

X coordinate of point 1 of the line.

LineY1

Y coordinate of point 1 of the line.

LineX2

X coordinate of point 2 of the line.

LineY2

Y coordinate of point 2 of the line.

PointX

X coordinate of point to snap.

PointY

Y coordinate of point to snap.

returns

(ret, xr, yr, Dist)

 

ret

  0=Point falls between line endpoints

  1=Point falls below the line   * x---------->

  2=Point falls above the line    x---------> *

 

xr

Point x snapped to line.

 

yr

Point y snapped to line.

 

Dist

Return distance (optional) with the following conditions:

Positive - Point is to the right of the line.

Negative - Point is to the left of the line.

PntToLine2 (LineX1, LineY1, LineZ1, LineX2, LineY2, LineZ2, PointX, PointY, PointZ)

Snaps a point to a line 2D but interpolates a Z.

LineX1

X coordinate of point 1 of the line.

LineY1

Y coordinate of point 1 of the line.

LineZ1

Z coordinate of point 1 of the line.

LineX2

X coordinate of point 2 of the line.

LineY2

Y coordinate of point 2 of the line.

LineZ2

Z coordinate of point 2 of the line.

PointX

X coordinate of point to snap.

PointY

Y coordinate of point to snap.

PointZ

Z coordinate of point to snap.

returns

(ret, xr, yr, zr, Dist)

 

ret

  0=Point falls between line endpoints

  1=Point falls below the line   * x---------->

  2=Point falls above the line    x---------> *

 

xr

Point x snapped to line.

 

yr

Point y snapped to line.

 

zr

Interpolated z on line.

 

Dist

Return distance (optional) with the following conditions:

Positive - Point is to the right of the line.

Negative - Point is to the left of the line.

PntToLine3d (LineX1, LineY1, LineZ1, LineX2, LineY2, LineZ2, xp, yp, zp)

Snaps a 3D point to a 3D line using doubles. This is a true 3D computation.

LineX1

X coordinate of point 1 of the line.

LineY1

Y coordinate of point 1 of the line.

LineZ1

Z coordinate of point 1 of the line.

LineX2

X coordinate of point 2 of the line.

LineY2

Y coordinate of point 2 of the line.

LineZ2

Z coordinate of point 2 of the line.

xp

X coordinate of point to snap.

yp

Y coordinate of point to snap.

zp

Z coordinate of point to snap to line.

returns

(ret, xr, yr, zr, Dist)

 

ret

  0=Point falls between line endpoints.

  1=Point falls below the line.   * x---------->

  2=Point falls above the line.      x---------> *

 

xr

Point x snapped to line.

 

yr

Point y snapped to line.

 

zr

Point z snapped to line (interpolated).

 

Dist

Return distance from xp,yp,zp to line intersection (optional).

CanLinesCross (MinX1, MinY1, MaxX1, MaxY1, MinX2, MinY2, MaxX2, MaxY2)

Determines if it is possible for two lines to cross by checking their MBRs (minimum bounding rectangles).

MinX1

Minimum X coordinate of MBR 1.

MinY1

Minimum Y coordinate of MBR 1.

MaxX1

Maximum X coordinate of MBR 1.

MaxY1

Maximum Y coordinate of MBR 1.

MinX2

Minimum X coordinate of MBR 2.

MinY2

Minimum Y coordinate of MBR 2.

MaxX2

Maximum X coordinate of MBR 2.

MaxY2

Maximum Y coordinate of MBR 2.

returns

(ret)

 

ret

TRUE= Lines could cross.

FALSE= Lines do not cross.

IsPointOnLine (LineX1, LineY1, LineX2, LineY2, PointX, PointY)

Determines if a point lies on a line.

LineX1

X coordinate of point 1 of the line.

LineY1

Y coordinate of point 1 of the line.

LineX2

X coordinate of point 2 of the line.

LineY2

Y coordinate of point 2 of the line.

PointX

X coordinate of test point.

PointY

Y coordinate of test point.

returns

(ret)

 

ret

0= Point is not on line.

1= Point is on line and not between line endpoints.

2= Point is on line between line endpoints.

3= Point is the same as one of the endpoints.

IsLineOnLine (x1, y1, x2, y2, x3, y3, x4, y4)

  Determines if line2 lies on line1.

   I.e.

       x3y3              x4y4

   *-----*=-=-=-=-=-=-=-=-=*------*         = TRUE

  x1y1                          x2y2

             x3y3                x4y4

   *-------------*=-=-=-=-=-=-=-=-=*        = TRUE

  x1y1                           x2y2

             x3y3                x4y4

   *-------------*=-=-=-=-=-=-*====*        = FALSE

  x1y1                      x2y2

             x3y3              x4y4

              *==================*

   *--------------------------------*       = FALSE

  x1y1                             x2y2

x1

X coordinate of point one of line 1.

y1

Y coordinate of point one of line 1.

x2

X coordinate of point two of line 1.

y2

Y coordinate of point two of line 1.

x3

X coordinate of point one of line 2.

y3

Y coordinate of point one of line 2.

x4

X coordinate of point two of line 2.

y4

Y coordinate of point two of line 2.

returns

(ret)

 

ret

0 - Lines do not lie on top of each other. 1 - Lines lie on top of each other.

OfsLine (Offset, OrgX1, OrgY1, OrgX2, OrgY2)

Offsets a two point line.

Offset

Distance to offset new line from original.

Negative= Offset to left.

Positive= Offset to right.

OrgX1

X coordinate of point 1 of original line to be offset.

OrgY1

Y coordinate of point 1 of original line to be offset.

OrgX2

X coordinate of point 2 of original line to be offset.

OrgY2

Y coordinate of point 2 of original line to be offset.

returns

(NewX1, NewY1, NewX2, NewY2)

 

NewX1

X coordinate of point 1 of new line.

 

NewY1

Y coordinate of point 1 of new line.

 

NewX2

X coordinate of point 2 of new line.

 

NewY2

Y coordinate of point 2 of new line.

DoLinesIntersect (Line1X1, Line1Y1, Line1X2, Line1Y2, Line2X1, Line2Y1, Line2X2, Line2Y2)

Determines if lines intersect. Use LineLineInt to determine point of intersection.

Line1X1

X coordinate of point 1 of line 1.

Line1Y1

Y coordinate of point 1 of line 1.

Line1X2

X coordinate of point 2 of line 1.

Line1Y2

Y coordinate of point 2 of line 1.

Line2X1

X coordinate of point 1 of line 2.

Line2Y1

Y coordinate of point 1 of line 2.

Line2X2

X coordinate of point 2 of line 2.

Line2Y2

Y coordinate of point 2 of line 2.

returns

(ret)

 

ret

TRUE=Lines intersect.

FALSE=Lines don't intersect.

CanLineCrossMbr (x1, y1, x2, y2, MinX, MinY, MaxX, MaxY)

Determines if a line segment can possibly cross an MBR area. Integer based.

x1

X coordinate of point 1 on line segment.

y1

Y coordinate of point 1 on line segment.

x2

X coordinate of point 1 on line segment.

y2

Y coordinate of point 1 on line segment.

MinX

Minimum X coordinate of MBR.

MinY

Minimum Y coordinate of MBR.

MaxX

Maximum X coordinate of MBR.

MaxY

Maximum Y coordinate of MBR.

LineLineInt (Line1X1, Line1Y1, Line1X2, Line1Y2, Line2X1, Line2Y1, Line2X2, Line2Y2)

Determines if lines intersect.

Line1X1

X coordinate of point 1 on Line 1.

Line1Y1

Y coordinate of point 1 on Line 1.

Line1X2

X coordinate of point 2 on Line 1.

Line1Y2

Y coordinate of point 2 on Line 1.

Line2X1

X coordinate of point 1 on Line 2.

Line2Y1

Y coordinate of point 1 on Line 2.

Line2X2

X coordinate of point 2 on Line 2.

Line2Y2

Y coordinate of point 2 on Line 2.

returns

(IntX, IntY, IntFlag)

 

IntX

X coordinate of intersection point of line1 and line2.

 

IntY

Y coordinate of intersection point of line1 and line2.

 

IntFlag

                 A             A             A

          ------->      ------->      ------->

        |                  |                  |

        | B                | B                | B

        |                  |                  |

        V                  V                  V

                 12            4             6

        |    A             |             A    |

        | ------->      ---+--->      ------->| B

        |                  |                  |

        V                  V                  V

                 8             0             2

        |                  |                  |

        | B                | B                | B

        |                  |                  |

        V    A             V             A    V

          ------->      ------->      ------->

                 9             1             3

                 A                           A

          ------->                    ------->

                 B             AB

          ------->      ----->->         . B

                 15            15            15

 

           

BearBearInt (x1, y1, Azi1, x2, y2, Azi2)

Computes bearing-bearing intersection.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

Azi1

Azimuth from point 1 in radians from North.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

Azi2

Azimuth from point 2 in radians from North.

returns

(IntX, IntY, Stus)

 

IntX

Intersection point x.

 

IntY

Intersection point y.

 

Stus

Status:

0=Intersection computed.

1= Lines are parallel and no solution computed.

2= Point 1 and point 2 are the same.

DistDistInt (x1, y1, dist1, x2, y2, dist2)

Computes distance-distance intersection.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

dist1

Distance 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

dist2

Distance 2.

returns

(ret, IntX, IntY)

 

ret

0= Intersection computed.

1= Could not compute intersection. Points 1 and 2 are probably too far apart. Computes the solution clockwise direction from point 1 to point 2. To compute the other solution, call to routine with the points and distances reversed.

 

IntX

X coordinate of intersection point.

 

IntY

Y coordinate of intersection point.

BearDistInt (x1, y1, Azi1, x2, y2, Dist2)

Computes bearing-distance intersection. To compute the other solution call with reversed azimuth.

x1

X coordinate of starting point of line.

y1

Y coordinate of starting point of line

Azi1

Azimuth of line (Decimal radians from North).

x2

X coordinate of point to test distance intersection.

y2

Y coordinate of point to test distance intersection.

Dist2

Distance from (x2, y2)

returns

(ret, IntX, IntY)

 

ret

0= Computation successful.

1= no intersection possible.

 

IntX

Intersection point X (if possible).

 

IntY

Intersection point Y (if possible).

Circ3Pt (x1, y1, x2, y2, x3, y3)

Computes the center of a circle defined by 3 points along edge.

x1

X coordinate of point 1 on arc.

y1

Y coordinate of point 1 on arc.

x2

X coordinate of point 2 on arc.

y2

Y coordinate of point 2 on arc.

x3

X coordinate of point 3 on arc.

y3

Y coordinate of point 3 on arc.

returns

(ret, CenX, CenY, Rad)

 

ret

0= Computation successful

-1=Error, do not use results.

 

CenX

Return center point of circle X.

 

CenY

Return center point of circle Y.

 

Rad

Return radius.

AngleIncr (Radius, Scale)

Returns the angle increment for drawing a smooth circular arc.

Radius

Radius of circle or arc in user units.

Scale

Draw scale in ratio form (1:n).

   To decrease (increase the number of points on the arc) the increment,

   make 24000x larger.

                 ___________________________

                / radius * sqrt(2) * 24000

               /  ------------------------

             \/           SCALE

returns

(ret)

 

ret

Angle increment for drawing a smooth circular arc.

AngleB (x1, y1, xc, yc, x2, y2)

Computes angle B of a triangle from three coordinate positions.

x1

X coordinate of point 1 on arc.

y1

Y coordinate of point 1 on arc.

xc

X coordinate of center point at angle B.

yc

Y coordinate of center point at angle B.

x2

X coordinate of point 2 on arc.

y2

Y coordinate of point 2 on arc.

returns

(ret)

 

ret

Angle n radians (0-PI).

AngleDeflect (x1, y1, x2, y2, x3, y3)

Computes the deflection angle from three coordinate positions.

x1

X coordinate of point 1.

y1

Y coordinate of point 1.

x2

X coordinate of point 2.

y2

Y coordinate of point 2.

x3

X coordinate of point 3.

y3

Y coordinate of point 3.

returns

(ret)

 

ret

Angle n radians (0-PI).

AziToBear (Azi)

Converts an azimuth to a bearing and quadrant code.

Azi

Azimuth to convert (in decimal radians from the North)

if azi is not in the range of 0-pi radians (0-360 degrees) it will be

   forced into range.

   NOTE : Conversion of angles from h.ms degrees <-> decimal radians.

          azi := dec_deg(azi) / conv;   hms degrees -> dec radians

          azi := hms (azi*conv);        dec radians -> hms degrees

returns

(Bear, Quadrant)

 

Bear

Return bearing (decimal radians)

 

Quadrant

Return quadrant code (1-4). If azi is not in the range of 0-pi radians (0-360 degrees) it will be forced into range.

BearToAzi (Bear, Quad)

Converts a bearing to an azimuth.

Bear

Bearing in decimal radians.

Quad

Quadrant code (1-4).

returns

(Azi)

 

Azi

Return azimuth in decimal radians from the north. If quad is out of range of 1-4 or if bear is out of range 0-1.5707963271 radians (0-90 degrees), azi returns 0.0.

FmtAzi (Azi, Accur, Direction)

Formats an azimuth for display in the form ddd mm ss.s

Azi

Azimuth to be formatted (radians from the North)

Accur

Number of decimal places for seconds

Direction

0 = Return azimuth from North. 1 = Return azimuth from South.

returns

(AziStrg)

 

AziStrg

Return string

ParseDms (Dms)

Parses angle expressed in "degrees minutes seconds".

Dms

Angle in the form of ddd.mmsec

returns

(Deg, Min, Sec)

 

Deg

Return degress

 

Min

Return minutes

 

Sec

Return seconds

FmtBear (Bearing, Quadrant, Accur, FmtOpt)

Formats a bearing in the form of q hh-mm-ss.tt q

Bearing

Bearing in decimal radians.

Quadrant

Quadrant code (1-4).

Accur

Decimal accuracy of seconds.

FmtOpt

Bearing format option.

     0 - N dd-mm-ss E

     1 - N dd\mm'ss"E

   If Bearing is out of the range of 0-pi/2 radians (0-90 degrees)

   then ? **-**-** ? is returned.

   If quad is out of the range of 1-4 then and Bearing is in range then

   ? nn-nn-nn ? is returned.

returns

(BearStrg)

 

BearStrg

Return bearing string.

DoesMbrOverlap (DstStartX, DstStartY, DstEndX, DstEndY, SrcStartX, SrcStartY, SrcEndX, SrcEndY)

Determines if there is overlap between a source and destination rectangle. Integer based.

DstStartX

Minimum X of destination rectangle.

DstStartY

Minimum Y of destination rectangle.

DstEndX

Maximum X of destination rectangle.

DstEndY

Maximum Y of destination rectangle.

SrcStartX

Minimum X of source rectangle.

SrcStartY

Minimum Y of source rectangle.

SrcEndX

Maximum X of source rectangle.

SrcEndY

Maximum Y of source rectangle.

returns

(ret)

 

ret

1 = Areas overlap.

0 = Areas don't overlap.

GetOverlapArea (DstStartX, DstStartY, DstEndX, DstEndY, SrcStartX, SrcStartY, SrcEndX, SrcEndY)

Finds the overlap area of the source rectangle to the destination rectangle. Integer based.

DstStartX

Minimum X of destination rectangle.

DstStartY

Minimum Y of destination rectangle.

DstEndX

Maximum X of destination rectangle.

DstEndY

Maximum Y of destination rectangle.

SrcStartX

Minimum X of source rectangle.

SrcStartY

Minimum Y of source rectangle.

SrcEndX

Maximum X of source rectangle.

SrcEndY

Maximum Y of source rectangle.

returns

(ret, DstOverStartX, DstOverStartY, SrcOverStartX, SrcOverStartY, OverWdt, OverHgt)

 

ret

0 = Areas overlap.

-1 = Areas don't overlap.

 

DstOverStartX

X coordinate of start of overlap area in destination rectangle.

 

DstOverStartY

Y coordinate of start of overlap area in destination rectangle.

 

SrcOverStartX

X coordinate of start of overlap area in source rectangle.

 

SrcOverStartY

Y coordinate of start of overlap area in source rectangle.

 

OverWdt

Width of overlap area.

 

OverHgt

Height of overlap area.

GetOverlapAreaD (DstStartX, DstStartY, DstEndX, DstEndY, SrcStartX, SrcStartY, SrcEndX, SrcEndY)

Finds the overlap area of the source rectangle to the destination rectangle. Double based.

DstStartX

Minimum X of destination rectangle.

DstStartY

Minimum Y of destination rectangle.

DstEndX

Maximum X of destination rectangle.

DstEndY

Maximum Y of destination rectangle.

SrcStartX

Minimum X of source rectangle.

SrcStartY

Minimum Y of source rectangle.

SrcEndX

Maximum Y of source rectangle.

SrcEndY

Maximum Y of source rectangle.

returns

(ret, DstOverStartX, DstOverStartY, SrcOverStartX, SrcOverStartY, OverWdt, OverHgt, OverlayMode)

 

ret

0 = Areas overlap

-1 = Areas don't overlap

 

DstOverStartX

X coordinate of start of overlap area in destination rectangle.

 

DstOverStartY

Y coordinate of start of overlap area in destination rectangle.

 

SrcOverStartX

X coordinate of start of overlap area in source rectangle.

 

SrcOverStartY

Y coordinate of start of overlap area in source rectangle.

 

OverWdt

Width of overlap area.

 

OverHgt

Height of overlap area.

 

OverlayMode

Optional. Returns primary side that is overlapped. LEFT=0

RIGHT=1

TOP=2

BOTTOM=3