← All procedures
geo.destinationMeters
This function gives the point at a distance in metres from a start point, along the great circle with an initial bearing. The longitude of the result is normalized.
CLI- Package
- @procedures/geo · README
- Path
["geo","destinationMeters"]- CLI
mark geo destinationMeters --from <object> --bearingDegrees <number> --distance <number>- As data
{"$proc":["geo","destinationMeters"],"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","destinationMeters"], { from: {}, bearingDegrees: 1, distance: 1 });
console.log(JSON.stringify(result));From the command line
$ mark geo destinationMeters --from <object> --bearingDegrees <number> --distance <number>
As data, in a program
{
"$proc": ["geo", "destinationMeters"],
"input": { "from": {}, "bearingDegrees": 1, "distance": 1 }
}Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"from": {
"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": {}
},
"bearingDegrees": {
"type": "number",
"description": "The initial bearing in degrees clockwise from north."
},
"distance": {
"type": "number",
"description": "The distance in metres."
},
"radiusMeters": {
"type": "number",
"description": "The radius of the sphere, more than 0. The default is `EARTH_MEAN_RADIUS_METERS`."
}
},
"required": [
"from",
"bearingDegrees",
"distance"
],
"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": {}
}
}