SPDIST - 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

Returns the distance and bearing between two points.

Syntax

01 XMIN PIC S9(9) BINARY.

01 YMIN PIC S9(9) BINARY.

01 XMAX PIC S9(9) BINARY.

01 YMAX PIC S9(9) BINARY.

01 C-SYS PIC S9(9) BINARY.

01 BEARING PIC S9(9) BINARY.

01 SPRETCODE PIC S9(9) BINARY.

*

CALL ‘SPDIST'

USING XMIN, YMIN,

XMAX, YMAX, C-SYS,

BEARING, SPRETCODE.

Arguments

XMIN The x coordinate of the base point, in millionths of degrees if lat/lon. Input.

YMIN The y coordinate of the base point, in millionths of degrees if lat/lon. Input.

XMAX The x coordinate of the other point, in millionths of degrees if lat/lon. Input.

YMAX The y coordinate of the other point, in millionths of degrees if lat/lon. Input.

C-SYS Indicates whether latitude/longitude or user coordinates will be used. Input.

BEARING A pointer to the bearing, in whole degrees, of the other point from the base point. Output.

Return Values

None.

Prerequisites

None.

Alternates

None.

Notes

This procedure returns the distance and bearing to point (x2, y2) from a base point (x1, y1). It does not require that the Spatial+ library be initialized.

The C-SYS parameter is used to indicate which type of coordinates the points and responses will be given in. There are two possible settings:

PIP-COORDS-USER Coordinates are user defined, and Euclidean distances are returned in user units.
PIP-COORDS-LL Coordinates are in millionths of degrees, and distances are returned in feet.