Exemplo n.º 1
0
func Open(name string) (*DataSource, error) {
	namec := C.CString(name)
	defer C.free(unsafe.Pointer(namec))
	ds := C.OGROpen(namec, 0, nil)
	if ds == nil {
		return nil, lastOgrError("failed to open")
	}
	return &DataSource{ds}, nil
}
Exemplo n.º 2
0
Arquivo: ogr.go Projeto: colek42/gdal
// Open a file / data source with one of the registered drivers
func OpenDataSource(name string, update int) DataSource {
	cName := C.CString(name)
	defer C.free(unsafe.Pointer(cName))
	ds := C.OGROpen(cName, C.int(update), nil)
	return DataSource{ds}
}