>  Docs Center  >  Libraries  >  Daithi  >  GEO_MID

GEO_MID

GEO_MID

Name


GEO_MID

Purpose


This function returns the coordinates of the geographical point
midway between the two input points.

Category


Geographical

Calling Sequence


Result = GEO_MID( Longitude1, Latitude1, $
Longitude2, Latitude2 )

Inputs


Longitude1: The scalar longitude, of type floating point, of
the first point. North is positive.
Latitude1: The scalar latitude, of type floating point, of the
first point. East is positive.
Longitude2: The scalar longitude, of type floating point, of
the second point(s). North is positive.
Latitude2: The scalar latitude, of type floating point, of
the second point(s). East is positive.

Outputs


Result: Returns a vector of [ longitude, latitude ] coordinates
of the point midway between Points 1 and 2.

Uses


CONSTANTS.pro

Procedure


The function uses double precision floating point arithmetic
to calculate values.

Example


Calculate the midpoint between Ottawa, ON (45.25N, 75.43W) and
Victoria, BC (48.25N, 123.22W).
results = geo_mid( -75.43, 45.25, -123.22, 48.25 )

Modification History


  Written by: Daithi A. Stone (stoned@uvic.ca), 2000-07-24.
Modified: DAS, 2002-08-12 (complies with CONSTANTS.pro revision)



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us