func (sr SpatialReference) Reference() int {
	count := C.OSRReference(sr.cval)
	return int(count)
}
Increments the reference count by one, returning reference count
package gdal
import "C"
import (
	"reflect"
	"unsafe"
)
type SpatialReference struct {
	cval C.OGRSpatialReferenceH
}
func CreateSpatialReference(wkt string) SpatialReference {
	cString := C.CString(wkt)
	defer C.free(unsafe.Pointer(cString))
	sr := C.OSRNewSpatialReference(cString)
	return SpatialReference{sr}
}
func (sr SpatialReference) FromWKT(wkt string) error {
	cString := C.CString(wkt)
	defer C.free(unsafe.Pointer(cString))
	return C.OSRImportFromWkt(sr.cval, &cString).Err()
}
func (sr SpatialReference) ToWKT() (string, error) {
	var p *C.char
	err := C.OSRExportToWkt(sr.cval, &p).Err()
	wkt := C.GoString(p)
	return wkt, err
}
func (sr SpatialReference) ToPrettyWKT(simplify bool) (string, error) {
	var p *C.char
	err := C.OSRExportToPrettyWkt(
		sr.cval, &p, BoolToCInt(simplify),
	).Err()
	wkt := C.GoString(p)
	return wkt, err
}
func (sr SpatialReference) FromEPSG(code int) error {
	return C.OSRImportFromEPSG(sr.cval, C.int(code)).Err()
}
func (sr SpatialReference) FromEPSGA(code int) error {
	return C.OSRImportFromEPSGA(sr.cval, C.int(code)).Err()
}
func (sr SpatialReference) Destroy() {
	C.OSRDestroySpatialReference(sr.cval)
}
func (sr SpatialReference) Clone() SpatialReference {
	newSR := C.OSRClone(sr.cval)
	return SpatialReference{newSR}
}
func (sr SpatialReference) CloneGeogCS() SpatialReference {
	newSR := C.OSRCloneGeogCS(sr.cval)
	return SpatialReference{newSR}
}