Example #1
0
File: osr.go Project: kikht/gdal
// Export coordinate system in Mapinfo style CoordSys format
func (sr SpatialReference) ToMICoordSys() (output string, errVal error) {
	var x *C.char
	err := C.OSRExportToMICoordSys(sr.cval, &x)
	if err != 0 {
		return "", error(err)
	}

	output = C.GoString(x)
	C.free(unsafe.Pointer(x))
	return output, error(err)
}
Example #2
0
File: osr.go Project: sn-amber/gdal
// Export coordinate system in Mapinfo style CoordSys format
func (sr SpatialReference) ToMICoordSys() (output string, errVal error) {
	var x *C.char
	err := C.OSRExportToMICoordSys(sr.cval, &x).Err()
	defer C.free(unsafe.Pointer(x))
	return C.GoString(x), err
}