-
-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Labels
Description
(。・∀・)ノ゙Hi, I'm using rethinkDB to storage geometry data. But when I want to get data from rethinkdb, I got trouble.
My code:
resp, err = r.DB(db).Table(table).Filter(map[string]string{
"id": id,
}).Field("gps").Field("location").Run(c)
var re interface{}
err = resp.One(&re)
if err != nil {
log.Error(err)
}
I got data like below, type was nil,
{Point {116.77940333333333 39.948335} [] []}
I change the type of re to types.Geometry, error message I got like this,
gorethink: could not decode type types.Geometry into Go value of type *types.Geometry: pseudo-type GEOMETRY object is not valid
Or, how to use ToGeoJSON?
Thx~ @dancannon