GDLFN - 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
Copyright
2024
First publish date
1994
Last updated
2024-05-09
Published on
2024-05-09T00:55:21.277227

Finds the nearest point or line within a spatial file to a given point.

Syntax

05 GDL-FIND-NEAREST.
      10 GDL-FN-HANDLE PIC S9(09) BINARY.
      10 GDL-FN-INPUT-SHAPE PIC S9(09) BINARY.
      10 GDL-FN-OUTPUT-SHAPE PIC S9(09) BINARY.
      10 GDL-FN-TYPE PIC S9(09) BINARY.
      10 GDL-FN-MAX PIC S9(09) BINARY.
      *
      CALL "GDLFN"
      USING GSL-FIND-NEAREST GDL-RETURN-CODE.

Arguments

GDL-FN-HANDLE

The gdlFileHandle returned by GDLOSF (GDL-OSF-STATIAL- HANDLE). Input.

GDL-FN-INPUT-SHAPE

The point to use as input. Input.

GDL-FN-OUTPUT-SHAPE

A pointer to the nearest shape. Output.

GDL-FN-TYPE

The type of shape to find. Input.

Type options:

COBOL Shape Types
GDL-POINT
GDL-LINE

GDL-FN-MAX

The maximum to search in feet. Input.

Return Values

GDL-OK Success
GDL-ERROR The file is not open or GDLOSF has not been called\
GDL-NOT-FOUND No shape of the desired type is within GDL-FN-MAX of GDL- FN-INPUT-SHAPE
GDL-WRONG-TYPE

GDL-FN-INPUT-SHAPE is not a point or GDL-FN-TYPE is not GDL-POINT or GDL-LINE

Prerequisites

GDLOSF

Alternates

None.

Notes

Features are returned from nearest to farthest.

Following instances of this procedure, you should call GDLSF with the output shape when you are finished using the output shape to release system resources.

The following diagrams illustrate the nearest point and line to a given point: