示例#1
0
文件: osr.go 项目: sn-amber/gdal
// Set attribute value in spatial reference
func (sr SpatialReference) SetAttrValue(path, value string) error {
	cPath := C.CString(path)
	defer C.free(unsafe.Pointer(cPath))
	cValue := C.CString(value)
	defer C.free(unsafe.Pointer(cValue))
	return C.OSRSetAttrValue(sr.cval, cPath, cValue).Err()
}
示例#2
0
文件: osr.go 项目: kikht/gdal
// Set attribute value in spatial reference
func (sr SpatialReference) SetAttrValue(path, value string) error {
	cPath := C.CString(path)
	defer C.free(unsafe.Pointer(cPath))
	cValue := C.CString(value)
	defer C.free(unsafe.Pointer(cValue))
	err := C.OSRSetAttrValue(sr.cval, cPath, cValue)
	if err != 0 {
		return error(err)
	}

	return nil
}