GetLatLngBoundingCoordinates (open)

Get bounding coordinates of a given distance box around a point

Syntax

LOADLIB "wh::util/geo.whlib";

RECORD FUNCTION GetLatLngBoundingCoordinates(RECORD centerpoint, FLOAT distance, RECORD options)

Parameters

RECORD centerpoint

Centerpoint

FLOAT lat

Latitude

FLOAT lng

Longitude

FLOAT distance

the distance from the point measured in the same unit as the radius argument. (default: meters)

RECORD options

Options

FLOAT radius

Radius in meters (default: 6378137 to return a distance on Earth in meters)

Return value

RECORD

Bounding coordinates which should contain all coordinates within the given distance

FLOAT maxlat

Minimum latitude

FLOAT maxlng

Minimum longitude

FLOAT minlat

Minimum latitude

FLOAT minlng

Minimum longitude

Description

Computes the bounding coordinates of all points on the surface of a sphere that have a great circle distance to the point represented by this GeoLocation instance that is less or equal to the distance argument. For more information about the formulae used in this method visit [http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates].