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

intl pipDistance ( intl x1, intl y1, intl x2, intl y2, intl coordSys, intl *bearing );

Arguments

x1

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

y1

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

x2

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

y2

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

coordSys

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 Value

The distance between the points. Distance is returned in feet if latitude/longitude is used, else in user-defined units.

Notes

This function 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 coordSys 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.