geoPoint.php
Table of Contents
Functions
- geoPoint() : string
- Build a GeoJSON Point geometry.
Functions
geoPoint()
Build a GeoJSON Point geometry.
geoPoint(float|int|string $latitude, float|int|string $longitude) : string
This helper wraps the ArangoDB AQL function GEO_POINT(longitude, latitude)
which constructs a valid GeoJSON Point. Coordinates are accepted here in the
human-friendly (latitude, longitude) order and reordered internally to the
GeoJSON longitude-first convention expected by ArangoDB.
Example AQL usage:
GEO_POINT(2.3522, 48.8566) // Paris, as [lng, lat]
GEO_POINT(doc.geo.longitude, doc.geo.latitude)
Parameters
- $latitude : float|int|string
-
The latitude, or an AQL expression resolving to it.
- $longitude : float|int|string
-
The longitude, or an AQL expression resolving to it.
Tags
Return values
string —The formatted AQL expression.