SPOFFNR - spatial_geostan - 2024.00

Spatial+ Reference for Windows, UNIX/Linux, z/OS

Product type
Software
Portfolio
Locate
Product family
GeoStan Geocoding Suite
Product
GeoStan Geocoding Suite > Spatial+
Version
2024.00
Language
English
Product name
Spatial+
Title
Spatial+ Reference for Windows, UNIX/Linux, z/OS
Copyright
2024
First publish date
1994
Last updated
2024-05-07
Published on
2024-05-07T22:16:04.316305

Finds the closest point to a target point.

Syntax

01 SPOBJHANDLE PIC S9(9) BINARY.

01 LONG-IN PIC S9(9) BINARY.

01 LAT-IN PIC S9(9) BINARY.

01 SEARCH-DEPTH PIC S9(9) BINARY.

01 NEAREST-OUT PIC X(60).

01 OUTLEN PIC S9(9) BINARY VALUE 60.

01 SPRETCODE PIC S9(9) BINARY.

CALL ‘SPOFFNR'

USING SPOBJHANDLE, LONG-IN,

LAT-IN,

SEARCH-DEPTH, NEAREST-OUT, OUTLEN, SPRETCODE.

Arguments

SPOBJHANDLE The handle of the opened object file. Input.

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.

SEARCH-DEPTH The maximum number of points to find. Input.

NEAREST-OUT A buffer to be filled with the identifier of the object in which the point is located. Output.

OUTLEN The size of the buffer that contains the identifier of the object in which the point is located. If the buffer size is smaller than the identifier, the identifier is truncated. Input.

Return Values

PIP-ERROR

PIP-NOT-FOUND PIP-OK

SPOFOP.

Prerequisites

Alternates

None.

Notes

The SEARCH-DEPTH parameter indicates the total number of points to search for. If this is set to 3, then SPOFFNR and SPOFN will not find more than 3 points, regardless of how many points are in the search tree. It is important to set this number carefully; setting too high a number may drastically increase the search time.

To get distance and bearing to the returned point, use SPDIST. If no points found, the procedure returns PIP-NOT-FOUND.