← All procedures

geo.latLon

This function gives a point with a normalized longitude.

CLI
Package
@procedures/geo · README
Path
["geo","latLon"]
CLI
mark geo latLon --lat <number> --lon <number>
As data
{"$proc":["geo","latLon"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/geo/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["geo","latLon"], { lat: 1, lon: 1 });
console.log(JSON.stringify(result));

From the command line

$ mark geo latLon --lat <number> --lon <number>

As data, in a program

{ "$proc": ["geo", "latLon"], "input": { "lat": 1, "lon": 1 } }

Input

FieldTypeRequiredDefaultDescription
latnumberyesThe latitude in degrees, from -90 to 90.
lonnumberyesThe longitude in degrees. Each finite value is correct.

Output

FieldTypeRequiredDefaultDescription
latnumberyesThe latitude in degrees, from -90 to 90.
lonnumberyesThe longitude in degrees. A normalized longitude is from -180 to less than 180.
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "lat": {
        "type": "number",
        "description": "The latitude in degrees, from -90 to 90."
      },
      "lon": {
        "type": "number",
        "description": "The longitude in degrees. Each finite value is correct."
      }
    },
    "required": [
      "lat",
      "lon"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "object",
    "properties": {
      "lat": {
        "type": "number",
        "description": "The latitude in degrees, from -90 to 90."
      },
      "lon": {
        "type": "number",
        "description": "The longitude in degrees. A normalized longitude is from -180 to less than 180."
      }
    },
    "required": [
      "lat",
      "lon"
    ],
    "additionalProperties": {}
  }
}