gdlFindNearest - 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 to a given point.

Syntax

intl gdlFindNearest( gdlFileHandle hFile, gdlShape input, gdlShape* output, intl type, intl max );

Arguments

hFile

The gdlFileHandle returned by gdlOpenSpatialFile. Input.

input

The gdlShape object that contains the input point. Input. output A pointer to the nearest gdlShape object. Output.

type

The type of shape to find. Input.

Type options:

GDL Shape Types
GDL_POINT
GDL_LINE

max

The maximum to search in feet. Input.

Return values

GDL_WRONG_TYPE

GDL_NOT_FOUND

GDL_ERROR

GDL_OK

Prerequisites

gdlOpenSpatialFile

gdlShapeCreate or gdlGenerateErrorSurface

Alternates

None.

Notes

Features are returned from nearest to farthest.

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

The following diagram illustrates the nearest point and nearest line to a given point: