Geodesix Help - Excel Functions

Jump to  Area  Azimuth  Color  Displace  Distance  DMS  Draw  Formulae  Geocode  Geodesix  GeoReverse  Heat  JavaScript  PlusCode  Regex  TimeOffset  TimeZone  Travel

Area function

Get the area of a polygon.

Syntax

Area(points)

Returns

Double, Square metres.

Arguments

NameTypeDescription
pointsRangeA N*2 array of Latitudes and Longitudes.

Example

=Area({{48.8577953, 2.2919178}, {48.8601066, 2.2951631}, {48.8538506, 2.3047225}, {48.8516625, 2.3014853}}) = 339422.50

Open the example functions workbook

Back to top


Azimuth function

Get the bearing from one place to another.

Syntax

Azimuth(originlat, originlong, destlat, destllong)

Returns

Double, Bearing or a 2-cell array initial and final bearing.

Arguments

NameTypeDescription
originlatDoubleLatitude of origin. Must be between -90 and 90.
originlongDoubleLongitude of origin. Must be between -180 and 180.
destlatDoubleLatitude of destination. Must be between -90 and 90.
destllongDoubleLongitude of destination. Must be between -180 and 180.

Example

=Azimuth(48.856614, 2.3522219, 43.296482, 5.36978) = 153.208

Open the example functions workbook

Back to top


Color function

Convert a Color to hexadecimal.

Syntax

Color(Color, format)

Returns

String, Hexadecimal Color.

Arguments

NameTypeDescription
ColorStringA Color name or 6-character hex Color code.
formatStringA combination of letters #ARGB.

Example

=Color("LightSteelBlue", "rgb") = "B0C4DE"

Open the example functions workbook

Back to top


Displace function

Find a point that is offset by a bearing and a distance.

Syntax

Displace(latitude, longitude, bearing, distance)

Returns

Double, LatLon or a 2-cell array lat lon.

Arguments

NameTypeDescription
latitudeDoubleLatitude of origin. Must be between -90 and 90.
longitudeDoubleLongitude of origin. Must be between -180 and 180.
bearingDoubleBearing of offset. Must be between -360 and 360.
distanceDoubleDistance to offset. Must be 0 or more.

Example

=Displace(48.856614, 2.3522219, 158.208779697697, 660495.456719927/2) = 46.087160,3.9368456

Open the example functions workbook

Back to top


Distance function

Get the straight-line distance between 2 points. Calculated using Vincenty's formulae, which has sub-millimeter precision.

Syntax

Distance(originlat, originlong, destlat, destlLong)

Returns

Double, Distance in meters.

Arguments

NameTypeDescription
originlatDoubleLatitude of origin. Must be between -90 and 90.
originlongDoubleLongitude of origin. Must be between -180 and 180.
destlatDoubleLatitude of destination. Must be between -90 and 90.
destlLongDoubleLongitude of destination. Must be between -180 and 180.

Example

=Distance(51.508039, -0.128069, 51.5098597, -0.1342809) = 476.476

Open the example functions workbook

Back to top


DMS function

Convert Degrees-Minutes-Seconds to degrees.

Syntax

DMS(dms)

Returns

Double, Decimal degrees.

Arguments

NameTypeDescription
dmsStringA Latitude/Longitude in Degrees° Minutes"" Seconds'. Note the symbols ° "" '.

Example

=DMS("136° 58"" 19'") = 136.97194

Open the example functions workbook

Back to top


Draw function

Draw a circle / line / marker on the map.

Syntax

Draw(DrawingFunctions)

Returns

String, The name of the drawn geometry.

See DrawingFunctions


Formulae function

Gets a cell's formula with references replaced by their values.

Syntax

Formulae(cell)

Returns

String, Formula.

Arguments

NameTypeDescription
cellStringThe cell for which the formula is desited.

Example

=Formulae($F$29) = Geocode("postal_code", "Trafalgar square")

Open the example functions workbook

Back to top


Geocode function

Get Geodesic information.

Syntax

Geocode(request, place)

Arguments

NameTypeDescription
requestStringThe type of information to return. Must be one of "GeoFields()".
placeStringThe place for which the information is to be obtained.

Example

=Geocode("postal_code", "Trafalgar square") = "WC2N 5DS"

Open the example functions workbook

Back to top


Geodesix function

Functions to manipulate parameters and settings.

Syntax

Geodesix(GeodesixFunctions)

See GeodesixFunctions


GeoReverse function

Perform a reverse geocode.

Syntax

GeoReverse(request, latitude, longitude)

Arguments

NameTypeDescription
requestStringThe type of information to return. Must be one of "GeoFields()".
latitudeDoubleLatitude. Must be between -90 and 90.
longitudeDoubleLongitude. Must be between -180 and 180.

Example

=GeoReverse("formatted_address", 51.508039, -0.128069) = "Greater London, UK"

Open the example functions workbook

Back to top


Heat function

Get a Color from a range of values to make a Heat-map. The colours returned are adjusted so as to appear linear to human perception.

Syntax

Heat(value, minimum, maximum)

Returns

String, Hexadecimal Color.

Arguments

NameTypeDescription
valueDoubleA value in the range minimum .. maximum.
minimumDoubleLowest value of range.
maximumDoubleHighest value of range.

Example

=Heat(5, 1, 10) = "99F0000"

Open the example functions workbook

Back to top


JavaScript function

Execute a Javascript function on the browser in the Geodesix pane.

Syntax

JavaScript(function)

Arguments

NameTypeDescription
functionStringAny Javascript function.

Example

=JavaScript("alert('Hello world!'")

Open the example functions workbook

Back to top


PlusCode function

Convert lat/long to/from Google PlusCodes.

Syntax

PlusCode(latitude, longitude, length)

Returns

String, PlusCode.

Arguments

NameTypeDescription
latitudeDoubleA Latitude to convert to a PlusCode. Must be between -90 and 90.
longitudeDoubleA Longitude to convert to a PlusCode. Must be between -180 and 180.
lengthIntegerThe desired length of the PlusCode.

Example

=PlusCode("9C3XGV5C+6Q", "latitude") = 51.5080625

Open the example functions workbook

Back to top


Regex function

Parse a string with a regular expression.

Syntax

Regex(string, pattern, group, item)

Returns

String, Parsed value.

Arguments

NameTypeDescription
stringStringA string to parse.
patternStringA regular expression.
groupIntegerIndex of group to retrieve: 0 ..N.
itemIntegerIndex of item in group: 0 ..N.

Example

=Regex("22.7,33.2 44.7", "([+-]?[0-9]*(\.[0-9]*))", 1, 0) = "33.2"

Open the example functions workbook

Back to top


TimeOffset function

Get the UTC time offset at a Latitude and Longitude.

Syntax

TimeOffset(latitude, longitude)

Returns

Double, The time offset in days, an Excel Time value, to be added to a Date. Note: When formatted as a time, Excel doesn't negative values (west of Greenwich) correctly.

Arguments

NameTypeDescription
latitudeDoubleLatitude. Must be between -90 and 90.
longitudeDoubleLongitude. Must be between -180 and 180.

Example

=TimeOffset(-35.2757878, 149.130732) = 10:00:00

Open the example functions workbook

Back to top


TimeZone function

Get the time zone at a Latitude and Longitude.

Syntax

TimeZone(latitude, longitude)

Returns

String, The name of the time zone.

Arguments

NameTypeDescription
latitudeDoubleLatitude. Must be between -90 and 90.
longitudeDoubleLongitude. Must be between -180 and 180.

Example

=TimeZone(-35.2757878, 149.130732) = "Australia/Sydney"

Open the example functions workbook

Back to top


Travel function

Get travelling distances and times.

Syntax

Travel(type, origin, destination, mode)

Returns

Double, Distance in metres or Time in days.

Arguments

NameTypeDescription
typeStringDistance or Duration. Must be one of "Distance", "Duration".
originStringOrigin, name of a place.
destinationStringDestination, name of a place.
modeStringMode of travel. Must be one of "Transit", "Driving", "Walking", "Bicycling".

Example

=Travel("Duration", "Trafalgar Square", "Picadilly Circus", "Bicycling") = 00:04:53

Open the example functions workbook

Back to top