Esempio n. 1
0
File: osr.go Progetto: 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()
}
Esempio n. 2
0
File: osr.go Progetto: 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
}