Exemplo n.º 1
0
Arquivo: osr.go Projeto: kikht/gdal
// 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
}
Exemplo n.º 2
0
Arquivo: osr.go Projeto: sn-amber/gdal
// 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()
}