Documentation
¶
Index ¶
- Constants
- func AngleFromDistance(d Distance) s1.Angle
- func CapAroundPoint(p s2.Point, d Distance) s2.Cap
- func LatLng(lat, lng float64) s2.LatLng
- func PointsFromLatLngs(latlngs []s2.LatLng) []s2.Point
- func RegisterType(v interface{})
- type Distance
- type EnumGeo
- type ID
- type RangeGeo
- type Region
- type RegionItem
- type SpatialGeo
- func (this *SpatialGeo) AddRegion(id []byte, value interface{}, locs []s2.LatLng) error
- func (this *SpatialGeo) Around(lat, lng float64, d Distance) EnumGeo
- func (this *SpatialGeo) AsDebug() *spatial.Debugger
- func (this *SpatialGeo) Close()
- func (this *SpatialGeo) Contains(lat, lng float64) EnumGeo
- func (this *SpatialGeo) ContainsRange(r RangeGeo) EnumGeo
- func (this SpatialGeo) DbPath() string
- func (this *SpatialGeo) FlushExt() error
- func (this *SpatialGeo) GetExtInfo(category uint8, id []byte) (v interface{}, err error)
- func (this *SpatialGeo) Set(id []byte, r RangeGeo, v *Region) error
- func (this *SpatialGeo) SetExtInfo(category uint8, id []byte, v interface{}) error
- func (this *SpatialGeo) Within(latlngs []s2.LatLng) EnumGeo
- func (this *SpatialGeo) WithinRegion(item *RegionItem) EnumGeo
Constants ¶
View Source
const ( EarthInchesCircumference = 1577727360 EarthMetersCircumference = 40074274.944 EarthKmCircumference = 40074.274944 TwoPi = (2 * math.Pi) EarthInchRadius = EarthInchesCircumference / TwoPi EarthMeterRadius = EarthMetersCircumference / TwoPi EarthKmRadius = EarthKmCircumference / TwoPi Meters Distance = 1.0 Inches Distance = 39.3701 Km Distance = 1000.0 )
Variables ¶
This section is empty.
Functions ¶
func AngleFromDistance ¶
func RegisterType ¶
func RegisterType(v interface{})
Types ¶
type EnumGeo ¶
type EnumGeo interface {
Close()
Next() (item *RegionItem, has bool)
}
type Region ¶
func UnmarshalItem ¶
type RegionItem ¶
type RegionItem struct {
*Region
Item
}
type SpatialGeo ¶
type SpatialGeo struct {
// contains filtered or unexported fields
}
func NewGeo ¶
func NewGeo(opts ...spatial.Options) (o *SpatialGeo, err error)
func (*SpatialGeo) AddRegion ¶
func (this *SpatialGeo) AddRegion(id []byte, value interface{}, locs []s2.LatLng) error
func (*SpatialGeo) AsDebug ¶
func (this *SpatialGeo) AsDebug() *spatial.Debugger
func (*SpatialGeo) Close ¶
func (this *SpatialGeo) Close()
func (*SpatialGeo) Contains ¶
func (this *SpatialGeo) Contains(lat, lng float64) EnumGeo
func (*SpatialGeo) ContainsRange ¶
func (this *SpatialGeo) ContainsRange(r RangeGeo) EnumGeo
func (SpatialGeo) DbPath ¶
func (this SpatialGeo) DbPath() string
func (*SpatialGeo) FlushExt ¶
func (this *SpatialGeo) FlushExt() error
func (*SpatialGeo) GetExtInfo ¶
func (this *SpatialGeo) GetExtInfo(category uint8, id []byte) (v interface{}, err error)
func (*SpatialGeo) SetExtInfo ¶
func (this *SpatialGeo) SetExtInfo(category uint8, id []byte, v interface{}) error
func (*SpatialGeo) WithinRegion ¶
func (this *SpatialGeo) WithinRegion(item *RegionItem) EnumGeo
Click to show internal directories.
Click to hide internal directories.