Computes the distance from a point to the border of the current object.
Syntax
01 SPHANDLE PIC S9(9) BINARY.
01 LONG-IN PIC S9(9) BINARY.
01 LAT-IN PIC S9(9) BINARY.
01 DIST-OUT PIC S9(9) BINARY.
*
CALL ‘SPODTB'
USING SPHANDLE, LONG-IN,
LAT-IN, DIST-OUT,
SPRETCODE.
Arguments
LONG-IN The longitude (in millionths of degrees) or x coordinate defining the input point. Input.
LAT-IN The latitude (in millionths of degrees) or y coordinate defining the input point. Input.
DIST-OUT
SPHANDLE The handle of the object file from SPOFOP. Input.
Return Values
Returns shortest distance from a given point to the closest edge of the current object, if successful. If PIP-ERROR, use SPERRGET for more information.
Prerequisites
SPOFFCT or SPOFFNM.
Alternates
None.
Notes
This procedure computes the distance from a point to the border of a region, line, or point object.
This procedure is only defined for buffered spatial object files (of file type .gsb).
Before this procedure can be called, an object needs to be selected as the "current object." This can be done with any of the SPOF* or SPRF* procedures. For example, SPOFFNR (for Point objects), SPOFFCT, or SPOFN could be used.