// Scan implements the database/sql Scanner interface. It expects to receive a
// WKB encoded []byte describing a Point from an SQL database, and will assign
// that value to p. If the incoming []byte is not a well formed WKB, or if that
// WKB value does not describe a Point, an error will be returned.
Scan implements the database/sql Scanner interface. It expects to receive a
WKB encoded []byte describing a Point from an SQL database, and will assign
that value to p. If the incoming []byte is not a well formed WKB, or if that
WKB value does not describe a Point, an error will be returned.
// Scan implements the database / sql Scanner interface . It expects to receive a // WKB encoded [] byte describing a Point from an SQL database and will assign // that value to p . If the incoming [] byte is not a well formed WKB or if that // WKB value does not describe a Point an error will be returned .
func (p *SFPoint) Scan(src interface{}) error {
	if p == nil {
		return fmt.Errorf("types.SFPoint: Scan called on nil SFLpointer")
	}
	b, ok := src.([]byte)
	if !ok {
		return fmt.Errorf("types.SFPoint: cannot scan type %T (%v)", src, src)
	}
	g, err := wkb.Unmarshal(b)
	if err != nil {
		return err
	}
	t, ok := g.(*geom.Point)
	if !ok {
		return fmt.Errorf("types.SFPoint: scan did not return a *geom.Point (got a %T)", t)
	}
	p.Point.Swap(t)
	return nil
}
func ( p * SFPoint ) Scan ( src interface { } ) error { if p == nil { return fmt . Errorf ( " " ) } b , ok := src . ( [ ] byte ) if ! ok { return fmt . Errorf ( " " , src , src ) } g , err := wkb . Unmarshal ( b ) if err != nil { return err } t , ok := g . ( * geom . Point ) if ! ok { return fmt . Errorf ( " " , t ) } p . Point . Swap ( t ) return nil }
Scan implements the database/sql Scanner interface.
Scan implements the database / sql Scanner interface .