Skip to content

Spatial Functions

csamak edited this page Jun 12, 2014 · 1 revision

##Spatial Functions

AQL spatial functions are accessible through types in the Spatial namespace.

###Example

    dv.FacebookUsers.Select(u => new Line(new Point(u.id, 1.9), new Point(2.4, u.id)))

will generate

    for $u in dataset FacebookUsers return create-line(create-point($u.id, 1.9), create-point(2.4, $u.id))

For an example of each function, view the relevant tests.

###Supported Functions

  • create-point : new Point(x, y)
  • create-line : new Line(point1, point2)
  • spatial-distance : point1.Distance(point2)