func (p Point) Envelope() Envelope {
	if xy, ok := p.XY(); ok {
		return Envelope{}.uncheckedExtend(xy)
	}
	return Envelope{}
}
Envelope returns the envelope best fitting the Point (either an empty
envelope, or an envelope covering a single point).
package geom
import (
	"database/sql/driver"
	"fmt"
	"math"
	"unsafe"
)
type Point struct {
	coords Coordinates
	full   bool
}
func NewPoint(c Coordinates, opts ...ConstructorOption) (Point, error) {
	os := newOptionSet(opts)
	if os.skipValidations {
		return newUncheckedPoint(c), nil
	}
	if err := c.XY.validate(); err != nil {
		if os.omitInvalid {
			return NewEmptyPoint(c.Type), nil
		}
		return Point{}, validationError{err.Error()}
	}
	return newUncheckedPoint(c), nil
}
func newUncheckedPoint(c Coordinates) Point {
	return Point{c, true}
}
func NewEmptyPoint(ctype CoordinatesType) Point {
	return Point{Coordinates{Type: ctype}, false}
}
func (p Point) Type() GeometryType {
	return TypePoint
}
func (p Point) AsGeometry() Geometry {
	return Geometry{TypePoint, unsafe.Pointer(&p)}
}
func (p Point) XY() (XY, bool) {
	return p.coords.XY, p.full
}
func (p Point) Coordinates() (Coordinates, bool) {
	return p.coords, p.full
}
func (p Point) AsText() string {
	return string(p.AppendWKT(nil))
}
func (p Point) AppendWKT(dst []byte) []byte {
	dst = appendWKTHeader(dst, "POINT", p.coords.Type)
	return p.appendWKTBody(dst)
}
func (p Point) appendWKTBody(dst []byte) []byte {
	if !p.full {
		return appendWKTEmpty(dst)
	}
	return appendWKTCoords(dst, p.coords, true)
}
func (p Point) IsEmpty() bool {
	return !p.full
}
func (p Point) IsSimple() bool {
	return true
}