GDLDIST - geographicdeterminationlibrary - 2024.00

Geographic Determination Library Reference for Windows and z/OS

Product type
Software
Portfolio
Locate
Product family
GeoStan Geocoding Suite
Product
GeoStan Geocoding Suite > Geographic Determination Library
Version
2024.00
Language
English
Product name
GeoStan Geocoding Suite
Title
Geographic Determination Library Reference for Windows and z/OS
Topic type
Reference
Copyright
2024
First publish date
1994
ft:lastEdition
2024-05-09
ft:lastPublication
2024-05-09T00:55:21.277227

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: