distance

distance(fs, lat, lon)
distance(fs, coords)

Returns a Fieldset with the value in each grid point being the distance in metres from a given geographical location (the reference).

Parameters
  • fs (Fieldset) – input fieldset

  • lat (number) – latitude of the reference point

  • lon (number) – longitude of the reference point

  • coords (list) – coordinates of the reference point as [lat, lon]

Return type

Fieldset

The reference location should be specified in degrees.

distance(gpt, lat, lon)
distance(gpt, coords)

Returns a Geopoints with the value in each grid point being the distance in metres from a given geographical location (the reference).

Parameters
  • fs (Geopoints) – input geopoints

  • lat (number) – latitude of the reference point

  • lon (number) – longitude of the reference point

  • coords (list) – coordinates of the reference point as [lat, lon]

Return type

Geopoints

The reference location should be specified in degrees. A geopoint with either latitude or longitude set to missing value will have a distance of missing value.