Determines the straight line distance between two points.
Syntax
05 GDL-DISTANCE.
10 GDL-DIST-HANDLE PIC S9(09) BINARY.
10 GDL-DIST-POINT1 PIC S9(09) BINARY.
10 GDL-DIST-POINT2 PIC S9(09) BINARY.
10 GDL-DIST-DISTANCE PIC S9(09) BINARY.
*
CALL "GDLDIST" USING GDL-DISTANCE GDL-RETURN-CODE.
Arguments
GDL-DIST-HANDLE
The gdlHandle initialized by GDLINIT (GDL-INIT- HANDLE). Input.
GDL-DIST-POINT1
Pointer to a gdlShape that contains the geocode coordinates representing the first point. Input.
GDL-DIST-POINT2
Pointer to a gdlShape that contains the geocode coordinates representing the second point. Input.
GDL-DIST-DISTANCE
The distance in feet. Output.
Return Values
GDL-OK | Success |
GDL-ERROR | An internal error occurred |
GDL-WRONG-TYPE | Occurs if the value of GDL_DIST_POINTX is not a point. |
Prerequisites
GDLINIT
Alternates
GDLMD - Use to determine the Manhattan distance instead of the straight line distance.
Notes
The following diagram illustrates the straight line distance between two points: