func UnmarshalGeoJSON(input []byte, opts ...ConstructorOption) (Geometry, error) {
	var root geojsonNode
	if err := json.Unmarshal(input, &root); err != nil {
		return Geometry{}, wrapWithGeoJSONSyntaxError(err)
	}
	rootObj, err := decodeGeoJSON(root)
	if err != nil {
		return Geometry{}, err
	}
	hasLength := make(map[int]bool)
	if err := detectCoordinatesLengths(rootObj, hasLength); err != nil {
		return Geometry{}, err
	}
	var has2D, has3D bool
	for length := range hasLength {
		if length == 2 {
			has2D = true
		}
		if length >= 3 {
			has3D = true
		}
	}
	ctype := DimXY
	if !has2D && has3D {
		ctype = DimXYZ
	}
	return geojsonNodeToGeometry(rootObj, ctype, opts)
}
UnmarshalGeoJSON unmarshals a geometry that is encoded as a GeoJSON Geometry Object.
package geom
import (
	"encoding/json"
	"fmt"
)