func (g GeometryType) MarshalBSONValue() (bsontype.Type, []byte, error) {
	return bsontype.String, bsoncore.AppendString(nil, g.String()), nil
}
MarshalBSONValue implements the BSON value marshaler
package feature
import (
	"encoding/json"
	"errors"
	"go.mongodb.org/mongo-driver/bson/bsontype"
	"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)
var (
	ErrBadGeometrySemantic = errors.New("bad geometry semantic")
	ErrUnknownGeometryType = errors.New("unknown geometry type")
	ErrBadGeometryCoords = errors.New("bad geometry coordinates")
	ErrBadGeometryCollection = errors.New("empty geometry collection")
)
type GeometryType int
const (
	UnknownGeometry GeometryType = iota
	Point
	MultiPoint
	LineString
	MultiLineString
	Polygon
	MultiPolygon
	GeometryCollection
)
var geometryStrings = [...]string{
	"",
	"Point",
	"MultiPoint",
	"LineString",
	"MultiLineString",
	"Polygon",
	"MultiPolygon",
	"GeometryCollection",
}
func (g GeometryType) String() string {
	return geometryStrings[g]
}
func (g GeometryType) MarshalJSON() ([]byte, error) {
	return json.Marshal(g.String())
}
func (g *GeometryType) UnmarshalJSON(b []byte) error {
	var t string
	if err := json.Unmarshal(b, &t); err != nil {
		return err
	}
	for i, k := range geometryStrings {
		if k == t {
			*g = GeometryType(i)
			return nil
		}
	}
	return ErrUnknownGeometryType
}