Exemple #1
0
// Set a projection by name
func (sr SpatialReference) SetProjectionByName(name string) error {
	cName := C.CString(name)
	defer C.free(unsafe.Pointer(cName))
	err := C.OSRSetProjection(sr.cval, cName)
	if err != 0 {
		return error(err)
	}

	return nil
}
Exemple #2
0
// Set a projection by name
func (sr SpatialReference) SetProjectionByName(name string) error {
	cName := C.CString(name)
	defer C.free(unsafe.Pointer(cName))
	return C.OSRSetProjection(sr.cval, cName).Err()
}