NB5 Docs► Reference Section► Binding Functions▼ Distance 🖺

Distance

Create a Distance generator which produces com.datastax.driver.dse.geometry.Distance objects.

LineString

Create a com.datastax.driver.dse.geometry.LineString

Point

Create a Point generator which generates com.datastax.driver.dse.geometry.Point objects.

Polygon

Create a com.datastax.driver.dse.geometry.Polygon

PolygonOnGrid

This function will return a polygon in the form of a rectangle from the specified grid system. The coordinates define the top left and bottom right coordinates in (x1,y1),(x2,y2) order, while the number of rows and columns divides these ranges into the unit-length for each square. x1 must be greater than x2. y1 must be less than y2. This grid system can be used to construct a set of overlapping grids such that the likelyhood of overlap is somewhat easy to reason about. For example, if you create one grid system as a refernce grid, then attempt to map another grid system which half overlaps the original grid, you can easily determine that half the time, a random rectangle selected from the second grid will overlap a rectangle from the first, for simple even-numbered grids and the expected uniform sampling on the internal coordinate selector functions.