PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
Products
WinDevWebDev - Server codeWebDev - Browser codeWinDev MobileReports and Queries
Platforms
WindowsLinuxWindows MobileUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadApple Watch
Languages
JavaPHPAjaxUser code (UMC)External language
Databases
HFSQLHFSQL Client/ServerStored proceduresOLE DBODBCNative Accesses

Returns the distance between the two positions. This distance is expressed in meters by default.

Versions 20 and later
Windows This function is now available in WEBDEV Server.
Windows This function is now available for the WINDEV applications in Windows.
New in version 20
Windows This function is now available in WEBDEV Server.
Windows This function is now available for the WINDEV applications in Windows.
Windows This function is now available in WEBDEV Server.
Windows This function is now available for the WINDEV applications in Windows.
Example
pos1 is géoPosition
pos1..Latitude = 1.442951
pos1..Longitude = 43.604363

pos2 is géoPosition
pos2..Latitude = 2.505874
pos2..Longitude = 50.458744

InfoBuild("The distance between the two positions is equal to %1 meters.", geoDistance(pos1, pos2))

Syntax
<Result> = geoDistance(<Position 1> , <Position 2> [, <Unit>])
<Result>: Real
Approximate distance between the two positions. This distance is expressed in the selected unit (in meters by default).
<Position 1>: geoPosition variable
Name of the geoPosition variable corresponding to the first position to compare.
<Position 2>: geoPosition variable
Name of the geoPosition variable corresponding to the second position to compare.
<Unit>: Integer constant
Versions 16 and later
Unit in which the distance must be returned:
geoKilometerDistance in kilometers.
geoMeter
(default value)
Distance in meters.
geoMileDistance in international earth miles.
New in version 16
Unit in which the distance must be returned:
geoKilometerDistance in kilometers.
geoMeter
(default value)
Distance in meters.
geoMileDistance in international earth miles.
Unit in which the distance must be returned:
geoKilometerDistance in kilometers.
geoMeter
(default value)
Distance in meters.
geoMileDistance in international earth miles.

Remarks

The calculation of the distance between the two positions is based on the WGS84 ellipsoid (Worldwide Geodesic System, 1984).

Components
Reports and Queries wd210device.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment