Documentation
¶
Overview ¶
Package earth is the earthdistance extension (with cube): great-circle distance and bounding boxes on the sphere. Needs CREATE EXTENSION cube and CREATE EXTENSION earthdistance. For anything beyond a radius search, use pg/postgis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cube = pg.Extension{Name: "cube"}
Cube is the extension earthdistance depends on. CREATE EXTENSION does not install it unless CASCADE is written, which this module leaves out, so it is named here to be installed first.
var Extension = pg.Extension{Name: "earthdistance"}
Extension is the earthdistance extension this package's constructs need, for pg.CreateExtension(Extension), so a library installs what it uses without spelling its name.
Functions ¶
func BoxContains ¶
BoxContains renders box @> point. Pair it with Distance for the exact cut, because the box is square and the radius is round.