geoobject

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGeoObject

func CreateGeoObject(db *gorp.DbMap, o *GeoObject) error

func UpdateGeoObject

func UpdateGeoObject(db *gorp.DbMap, o *GeoObject) error

Types

type Area

type Area struct {
	Type   string
	Points []GeoPoint
	Middle GeoPoint
	Radius float64
}

type GeoObject

type GeoObject struct {
	Id         int64
	PhotoId    int64
	SchemaId   int64
	SchemaData string
	Name       string
	Slug       string

	InformalName string
	Description  string
	Type         string
	Parent       int64
	LongText     []byte

	Lon float64
	Lat float64

	Area Area `db:"-"`

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

func GetGeoObject

func GetGeoObject(db *gorp.DbMap, slug string) (*GeoObject, error)

func GetGeoObjects

func GetGeoObjects(db *gorp.DbMap, tp string, offset, limit int64) ([]GeoObject,
	error)

type GeoPoint

type GeoPoint struct {
	Id       int64
	Lon      float64
	Lat      float64
	ObjectId int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL