Fork me on GitHub

distance

Returns distance in meters from given latitude/longitude coordinates to datapoint

The distance transform computes the distance in meters from the current datapoint to its argument coordinates.

The datapoint is assumed to have latitude and longitude fields in decimal coordinates. It returns the distance in meters computed using the Haversine formula.

[{
  "latitude": 40.4277304,
  "longitude": -86.9170587
}]

Given the above stream, we find its distance to the chosen coordinate: distance(40.426841,-86.9165106):

[109.238]

The two coordinates above are about 109 meters apart.


Transform Details

One-To-OneStatelessPeekInput SchemaOutput Schema
TrueTrueFalse{"type": "boolean"}

Arguments

#DescriptionOptionalConstantHijackedDefault
1LatitudeFalseTrueFalse
2LongitudeFalseTrueFalse

This Site

Contribute

ConnectorDB is a very new open-source project. If you are a designer/developer or ML enthusiast, head on over to the connectordb github, where you can choose which part of ConnectorDB you want to contribute towards! Pull requests or bug reports are welcome!