View Source ArangoXEcto.GeoData (ArangoX Ecto v1.3.1)
Methods for interacting with ArangoDB GeoJSON and geo related functions
The methods within this module are really just helpers to generate Geo
structs.
Link to this section Summary
Functions
Generates a Geo linestring
Generates a Geo multi linestring
Generates a Geo multi point
Generates a Geo multi polygon
Generates a Geo point
Generates a Geo polygon
Sanitizes coordinates to ensure they are valid
Link to this section Types
@type coordinate() :: number()
Link to this section Functions
@spec linestring([{coordinate(), coordinate()}]) :: Geo.LineString.t()
Generates a Geo linestring
@spec multi_linestring([[{coordinate(), coordinate()}]]) :: Geo.MultiLineString.t()
Generates a Geo multi linestring
@spec multi_point([{coordinate(), coordinate()}]) :: Geo.MultiPoint.t()
Generates a Geo multi point
@spec multi_polygon([[[{coordinate(), coordinate()}]]]) :: Geo.MultiPolygon.t()
Generates a Geo multi polygon
@spec point(coordinate(), coordinate()) :: Geo.Point.t()
Generates a Geo point
@spec polygon([[{coordinate(), coordinate()}]]) :: Geo.Polygon.t()
Generates a Geo polygon
@spec sanitize(list() | {coordinate(), coordinate()}) :: list() | {coordinate(), coordinate()}
Sanitizes coordinates to ensure they are valid
This function is not automatically applied to Geo constructors and must be applied before hand