Golang bindings for GDAL

Golang bindings for GDAL

Go Reference License Build Status Coverage Status Go Report Card

Goals

Godal aims at providing an idiomatic go wrapper around the GDAL library:

  • Function calls return a result and an error. The result will be valid if no error was returned. The error message will contain the root cause of why the error happened.
  • Calls between go and native libraries incur some overhead. As such godal does not strictly expose GDAL's API, but groups often-used calls in a single cgo function to reduce this overhead. For example, C code like
    hDS = GDALOpen(filename, GA_Readonly)
    if (hDS == NULL) exit(1);
    int sx = GDALGetRasterXSize(hDS);
    int sy = GDALGetRasterYSize(hDS);
    int nBands = GDALGetRasterCount(hDS);
    printf("dataset size: %dx%dx%d\n",sx,sy,nBands);
    for (int i=1; i<=nBands; i++) {
        hBand = GDALGetRasterBand(hDS,i);
        int ovrCount = GDALGetOverviewCount(hBand)
        for(int o=0; o<=ovrCount; o++) {
            GDALRasterBandH oBand = GDALGetOverview(hBand,o);
            int osx = GDALGetRasterBandXSize(oBand);
            int osy = GDALGetRasterBandYSize(oBand);
            printf("overview %d size: %dx%d\n",o,osx,osy);
        }
    }

will be written as

    hDS,err := godal.Open(filename)
    if err!=nil {
        panic(err)
    }
    structure := hDS.Structure()
    fmt.Printf("dataset size: %dx%dx%d\n", structure.SizeX,structure.SizeY,structure.NBands)
    for _,band := range hDS.Bands() {
        for o,ovr := range band.Overviews() {
            bstruct := ovr.Structure()
            fmt.Printf("overview %d size: %dx%d\n",o,bstruct.SizeX,bstruct.SizeY)
        }
    }
  • Unfrequently used or non-default parameters are passed as options:
    ds,err := godal.Open(filename) //read-only
    ds,err := godal.Open(filename, Update()) //read-write
  • Godal exposes a VSI handler that can easily allow you to expose an io.ReaderAt as a filename that can be opened by GDAL. A handler for opening gs:// google cloud storage URIs is provided.

Documentation

GoReference contains the API reference and example code to get you started. The *_test.go files can also be used as reference.

Status

Godal is not feature complete. The raster side is nearing completion and should remain stable. The vector and spatial-referencing sides are far from complete, meaning that the API might evolve in backwards incompatible ways until essential functionality is covered.

Contributing

Contributions are welcome. Please read the contribution guidelines before submitting fixes or enhancements.

Installation

Godal requires a GDAL version greater than 3.2. Make sure the GDAL headers are installed on the system used for compiling go+godal code. If using a GDAL installation in a non standard location, you can set your PKG_CONFIG_PATH environment variable, e.g. export PKG_CONFIG_PATH=/opt/include/pkgconfig.

Licensing

Godal is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Owner
Comments
  • How do I read the window and resampling?

    How do I read the window and resampling?

    This is not an issue, but want some help. I want to read part of the image from the large geotiff with resampling to some scaling.

    • upsampling: The read window is (0, 0, 1024, 1024) and the out image shape is 2048x2048.
    • downsampling: The read window is (0, 0, 2048, 2048) and the out image shape is 1024x1024.

    And both the output image's bbox is same. How can I get this?

    Could you do me a favor?

  • Enhancement: support context cancellation

    Enhancement: support context cancellation

    Hello Thomas,

    When used within a tile server, it happens often that tile requests get canceled by OpenLayers or Leaflet when the user pans/zooms faster than the server throughput. godal does not support context cancellation, what can waste (a lot of) resources in such cases. Cancelling early could be quite beneficial.

    Obviously, one cannot cancel a cgo call from the go runtime and I expect an implementation in C++ to be complex. However, one could still cancel early at the io level (in osio), resulting in resource savings.

    I did a dumb example at the Adapter level. Basically, the idea is to combine the key with a context id, to register the context in a global map and to fetch it when doing io in osio.

    var mutex sync.Mutex
    var contexts map[string]context.Context
    
    func unwrapkey(key string) string {
    	last := strings.LastIndex(key, "#")
    	if last != -1 {
    		key = key[:last]
    	}
    	return key
    }
    
    func WithContext(ctx context.Context, key string) string {
    	mutex.Lock()
    	defer mutex.Unlock()
    
    	cid := uuid.New().String()
    	contexts[cid] = ctx
    	return fmt.Sprintf("%s#%s", key, cid)
    }
    
    func GetContext(key string) (context.Context, string) {
    	mutex.Lock()
    	defer mutex.Unlock()
    
    	last := strings.LastIndex(key, "#")
    	if last == -1 {
    		return context.Background(), key
    	}
    	ctx, ok := contexts[key[last+1:]]
    	if !ok {
    		ctx = context.Background()
    	}
    	key = key[:last]
    	return ctx, key
    }
    
    func init() {
    	contexts = map[string]context.Context{}
    	// todo: launch goroutine and clean done contexts
    }
    
    type KeyStreamerAt interface {
    	StreamAt(ctx context.Context, key string, off int64, n int64) (io.ReadCloser, int64, error)
    }
    
    func (a *Adapter) srcStreamAt(key string, off int64, n int64) (io.ReadCloser, error) {
    	ctx, key := GetContext(key)
            ...
    }
    

    As simple as it may be, it works well enough. We could imagine WarpWithContext(ctx, ...), etc. Hope all of this makes sense. Thomas

  • can not create the OpenJPEG format data

    can not create the OpenJPEG format data

    this is the code :

    package main
    
    import (
    	"github.com/airbusgeo/godal"
    )
    
    func main() {
    	godal.RegisterAll()
    	tifname := "aa.tif"
    	dsTif, _ := godal.Create(godal.GTiff, tifname, 1, godal.Byte, 20, 20)  // work
    	dsTif.Close()
    
    	jpegname := "bb.jpg"
    	dsJpg, _ := godal.Create(godal.OpenJPEG, jpegname, 1, godal.Byte, 20, 20) // not work
    	dsJpg.Close()
    }
    
    

    the error is

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4430e42]
    
    goroutine 1 [running]:
    github.com/airbusgeo/godal.(*Dataset).Close(0x0, 0x0, 0x0, 0x0, 0x1, 0x1)
            /Users/sshuair/go/pkg/mod/github.com/airbusgeo/[email protected]/godal.go:1283 +0xa2
    main.main()
            /Users/sshuair/test/test.go:15 +0x12b
    exit status 2
    
  • Use static linking including all used C libraries within the executable binary

    Use static linking including all used C libraries within the executable binary

    Dear Godal team, Thanks for the great library. I wrote a simple application with it and it runs smoothly on my pc. My overall goal is to run it in a AWS Lambda function, but i have problems to compile it in a way that it is working.

    I tried several builds in a docker, but none of them worked. From what I learned, is that I have theoretically two possibities:

    • Build a static binary including all relevant c files like explained here https://www.x-cellent.com/posts/cgo-bindings
    • Build the application in a Amazon Linux 2 Docker with GDAL installed

    My question is, if you maybe have tried it already to run it in AWS Lambda or if you have a running Docker example?

    Thanks for your help, Marcel

  • godal.Warp produces empty image

    godal.Warp produces empty image

    I wrote a small script to warp a small part of the image, but with godal.Warp it is not working.

    The gdal command is:

    gdalwarp /vsis3/rastless-tests/TUR_us-newyork_EOMAP_20190309_155148_SENT2_m0010_32bit.tif ./working.tif -t_srs EPSG:3857 -te -8243902 4961937 -8243197 4962527 -ts 256 256
    

    The file is in an public s3 bucket, so testing on your side should work just fine. The produced file has 256 * 256px and is in the New York bay.

    I wrote the complementary Golang code with godal:

    package main
    
    import "github.com/airbusgeo/godal"
    
    func main() {
    	godal.RegisterAll()
    
    	filename := "/vsis3/rastless-tests/TUR_us-newyork_EOMAP_20190309_155148_SENT2_m0010_32bit.tif"
    	ds, _ := godal.Open(filename)
    	datasets := []*godal.Dataset{ds}
    
    	// gdalwarp /vsis3/rastless-tests/TUR_us-newyork_EOMAP_20190309_155148_SENT2_m0010_32bit.tif ./working.tif -t_srs EPSG:3857 -te -8243902 4961937 -8243197 4962527 -ts 256 256
    	options := []string{"-t_srs", "EPSG:3857", "-te", "-8243902", "4961937", "-8243197", "4962527", "-ts", "256", "256"}
    	godal.Warp("./not_working.tif", datasets, options)
    }
    

    The file seems to be empty and I cannot display it in qgis. I think, that the data is written into the file in a wrong way, as the file size and all metadata are the same like the file which was produced with pure gdal.

    It would be great if you could tell if I did a mistake or if it is a godal problem, which you can fix.

  • NoData and WarpInto

    NoData and WarpInto

    Hello Thomas,

    I am having issue getting nodata right with WarpInto when different from 0. Below are three attempts to get it right but the read stays desperately at 0. Any idea about what I am doing wrong?

    Thanks, Thomas

    func TestDatasetWarpInto_NoDataSetAtDst(t *testing.T) {
    	os.Setenv("CPL_DEBUG", "ON")
    	srs4326, _ := NewSpatialRefFromEPSG(4326)
    
    	srcDS, _ := Create(Memory, "", 1, Byte, 16, 16)
    	srcDS.SetSpatialRef(srs4326)
    	srcDS.SetGeoTransform([6]float64{45, 1, 0, 35, 0, -1})
    	defer srcDS.Close()
    
    	dstDS, _ := Create(Memory, "", 1, Byte, 16, 16)
    	dstDS.SetSpatialRef(srs4326)
    	dstDS.SetGeoTransform([6]float64{45, 1, 0, 35, 0, -1})
    	defer dstDS.Close()
    
    	// set nodata value to src and dst
    	for _, b := range srcDS.Bands() {
    		b.SetNoData(255)
    		assert.Nil(t, b.Fill(255, 0))
    	}
    
    	for _, b := range dstDS.Bands() {
    		b.SetNoData(255)
    	}
    
    	// warp into
    	assert.Nil(t, dstDS.WarpInto([]*Dataset{srcDS}, []string{}))
    
    	data := make([]uint8, 1)
    	assert.Nil(t, dstDS.Read(0, 0, data, 1, 1))
    	assert.Equal(t, uint8(255), data[0])
    }
    
    GDAL: GDAL: GDALDriver::Create(MEM,,16,16,1,Byte,(nil))
    GDAL: GDAL: GDALDriver::Create(MEM,,16,16,1,Byte,(nil))
    GDAL: GDAL: GDAL_CACHEMAX = 786 MB
    GDAL: GDALWARP: Defining SKIP_NOSOURCE=YES
    GDAL: WARP: Copying metadata from first source to destination dataset
    GDAL: GDAL: Computing area of interest: 45, 19, 61, 35
    GDAL: OGRCT: Wrap source at 53.
    OGRCT: Wrap target at 53.
    GDAL: WARP: band=0 dstNoData=255.000000
    GDAL: GDAL: GDALWarpKernel()::GWKNearestByte() Src=0,0,16x16 Dst=0,0,16x16
    GDAL: GDAL: GDALClose(, this=0x199dfe0)
    GDAL: GDAL: GDALClose(, this=0x199d3d0)
    --- FAIL: TestDatasetWarpInto_NoDataSetAtDst (0.04s)
        /home/thomascoquet/Work/kayrros-godal/godal/godal_test.go:1863:
            	Error Trace:	godal_test.go:1863
            	Error:      	Not equal:
            	            	expected: 0xff
            	            	actual  : 0x0
            	Test:       	TestDatasetWarpInto_NoDataSetAtDst
    
    
    func TestDatasetWarpInto_NoDataNoSet(t *testing.T) {
    	os.Setenv("CPL_DEBUG", "ON")
    	srs4326, _ := NewSpatialRefFromEPSG(4326)
    
    	srcDS, _ := Create(Memory, "", 1, Byte, 16, 16)
    	srcDS.SetSpatialRef(srs4326)
    	srcDS.SetGeoTransform([6]float64{45, 1, 0, 35, 0, -1})
    	defer srcDS.Close()
    
    	dstDS, _ := Create(Memory, "", 1, Byte, 16, 16)
    	dstDS.SetSpatialRef(srs4326)
    	dstDS.SetGeoTransform([6]float64{45, 1, 0, 35, 0, -1})
    	defer dstDS.Close()
    
    	// set nodata value to src and dst
    	for _, b := range srcDS.Bands() {
    		b.SetNoData(255)
    		assert.Nil(t, b.Fill(255, 0))
    	}
    
    	// warp into
    	assert.Nil(t, dstDS.WarpInto([]*Dataset{srcDS}, []string{}))
    	nodata, ok := dstDS.Bands()[0].NoData()
    	assert.True(t, ok)
    	assert.Equal(t, nodata, float64(255))
    
    	data := make([]uint8, 1)
    	assert.Nil(t, dstDS.Read(0, 0, data, 1, 1))
    	assert.Equal(t, uint8(255), data[0])
    }
    
    GDAL: GDAL: GDALDriver::Create(MEM,,16,16,1,Byte,(nil))
    GDAL: GDAL: GDALDriver::Create(MEM,,16,16,1,Byte,(nil))
    GDAL: GDAL: GDAL_CACHEMAX = 786 MB
    GDAL: GDALWARP: Defining SKIP_NOSOURCE=YES
    GDAL: WARP: Copying metadata from first source to destination dataset
    GDAL: GDAL: Computing area of interest: 45, 19, 61, 35
    GDAL: OGRCT: Wrap source at 53.
    OGRCT: Wrap target at 53.
    GDAL: WARP: srcNoData=255.000000 dstNoData=255.000000
    GDAL: GDAL: GDALWarpKernel()::GWKNearestByte() Src=0,0,16x16 Dst=0,0,16x16
    GDAL: GDAL: GDALClose(, this=0x2e3efe0)
    GDAL: GDAL: GDALClose(, this=0x2e3e3d0)
    --- FAIL: TestDatasetWarpInto_NoDataNoSet (0.03s)
        /home/thomascoquet/Work/kayrros-godal/godal/godal_test.go:1911:
            	Error Trace:	godal_test.go:1911
            	Error:      	Should be true
            	Test:       	TestDatasetWarpInto_NoDataNoSet
        /home/thomascoquet/Work/kayrros-godal/godal/godal_test.go:1912:
            	Error Trace:	godal_test.go:1912
            	Error:      	Not equal:
            	            	expected: 0
            	            	actual  : 255
            	Test:       	TestDatasetWarpInto_NoDataNoSet
        /home/thomascoquet/Work/kayrros-godal/godal/godal_test.go:1916:
            	Error Trace:	godal_test.go:1916
            	Error:      	Not equal:
            	            	expected: 0xff
            	            	actual  : 0x0
            	Test:       	TestDatasetWarpInto_NoDataNoSet
    
    
    func TestDatasetWarpInto_NoDataWithSwitch(t *testing.T) {
    	os.Setenv("CPL_DEBUG", "ON")
    	srs4326, _ := NewSpatialRefFromEPSG(4326)
    
    	srcDS, _ := Create(Memory, "", 1, Byte, 16, 16)
    	srcDS.SetSpatialRef(srs4326)
    	srcDS.SetGeoTransform([6]float64{45, 1, 0, 35, 0, -1})
    	defer srcDS.Close()
    
    	dstDS, _ := Create(Memory, "", 1, Byte, 16, 16)
    	dstDS.SetSpatialRef(srs4326)
    	dstDS.SetGeoTransform([6]float64{45, 1, 0, 35, 0, -1})
    	defer dstDS.Close()
    
    	// set nodata value to src and dst
    	for _, b := range srcDS.Bands() {
    		b.SetNoData(255)
    		assert.Nil(t, b.Fill(255, 0))
    	}
    
    	// warp into
    	assert.Nil(t, dstDS.WarpInto([]*Dataset{srcDS}, []string{"-dstnodata", "255"}))
    	data := make([]uint8, 1)
    	assert.Nil(t, dstDS.Read(0, 0, data, 1, 1))
    	assert.Equal(t, uint8(255), data[0])
    }
    
    GDAL: GDAL: GDALDriver::Create(MEM,,16,16,1,Byte,(nil))
    GDAL: GDAL: GDALDriver::Create(MEM,,16,16,1,Byte,(nil))
    GDAL: GDAL: GDAL_CACHEMAX = 786 MB
    GDAL: GDALWARP: Defining SKIP_NOSOURCE=YES
    GDAL: WARP: Copying metadata from first source to destination dataset
    GDAL: GDAL: Computing area of interest: 45, 19, 61, 35
    GDAL: OGRCT: Wrap source at 53.
    OGRCT: Wrap target at 53.
    GDAL: WARP: dstnodata of band 0 set to 255.000000
    GDAL: GDAL: GDALWarpKernel()::GWKNearestByte() Src=0,0,16x16 Dst=0,0,16x16
    GDAL: GDAL: GDALClose(, this=0x2e0ffe0)
    GDAL: GDAL: GDALClose(, this=0x2e0f3d0)
    --- FAIL: TestDatasetWarpInto_NoDataWithSwitch (0.04s)
        /home/thomascoquet/Work/kayrros-godal/godal/godal_test.go:1975:
            	Error Trace:	godal_test.go:1975
            	Error:      	Not equal:
            	            	expected: 0xff
            	            	actual  : 0x0
            	Test:       	TestDatasetWarpInto_NoDataWithSwitch
    
  • Bump github.com/airbusgeo/cogger from 0.0.5 to 0.0.6

    Bump github.com/airbusgeo/cogger from 0.0.5 to 0.0.6

    Bumps github.com/airbusgeo/cogger from 0.0.5 to 0.0.6.

    Release notes

    Sourced from github.com/airbusgeo/cogger's releases.

    v0.0.6

    Changelog

    d402fa3 avoid goroutine leak when creating bigtiff cogs (#7)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.58.0 to 0.59.0

    Bump google.golang.org/api from 0.58.0 to 0.59.0

    Bumps google.golang.org/api from 0.58.0 to 0.59.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    google-api-go-client v0.59.0

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.59.0 (2021-10-20)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump cloud.google.com/go/storage from 1.17.0 to 1.18.2

    Bump cloud.google.com/go/storage from 1.17.0 to 1.18.2

    Bumps cloud.google.com/go/storage from 1.17.0 to 1.18.2.

    Release notes

    Sourced from cloud.google.com/go/storage's releases.

    storage storage/v1.18.2

    Bug Fixes

    storage storage/v1.18.1

    Bug Fixes

    • storage: don't assume auth from a client option (#4982) (e17334d)

    storage storage/v1.18.0

    Features

    • storage: returned wrapped error for timeouts (#4802) (0e102a3), refs #4197
    • storage: SignedUrl can use existing creds to authenticate (#4604) (b824c89)

    Bug Fixes

    • storage: update PAP to use inherited instead of unspecified (#4909) (dac26b1)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump cloud.google.com/go/storage from 1.17.0 to 1.18.1

    Bump cloud.google.com/go/storage from 1.17.0 to 1.18.1

    Bumps cloud.google.com/go/storage from 1.17.0 to 1.18.1.

    Release notes

    Sourced from cloud.google.com/go/storage's releases.

    storage storage/v1.18.1

    Bug Fixes

    • storage: don't assume auth from a client option (#4982) (e17334d)

    spanner spanner/v1.18.0

    Features

    • spanner/admin/database: add progress field to UpdateDatabaseDdlMetadata (9029071)

    bigquery bigquery/v1.18.0

    Features

    • bigquery/storage: new JSON type through BigQuery Write (9029071)
    • bigquery: augment retry predicate to support additional errors (#4046) (d4af6f7)
    • bigquery: expose ParquetOptions for loads and external tables (#4016) (f9c4ccb)
    • bigquery: support mutable clustering configuration (#3950) (0ab30da)

    storage storage/v1.18.0

    Features

    • storage: returned wrapped error for timeouts (#4802) (0e102a3), refs #4197
    • storage: SignedUrl can use existing creds to authenticate (#4604) (b824c89)

    Bug Fixes

    • storage: update PAP to use inherited instead of unspecified (#4909) (dac26b1)
    Commits
    • 4ec9eed chore: release storage 1.18.1 (#4984)
    • e17334d fix(storage): don't assume auth from a client option (#4982)
    • 0f7457c chore(all): auto-regenerate gapics (#4977)
    • d28ba78 test(spanner): fix flaky TestIntegration_StartBackupOperation test (#4978)
    • 5edfd36 chore: release spanner 1.26.0 (#4751)
    • 090cc3a chore(all): auto-regenerate gapics (#4972)
    • acece39 chore(all): update all (#4971)
    • 309b59e fix(internal/godocfx): only put TOC status on mod if all pkgs have same statu...
    • 3441e1f test(bigtable): abbrviate instance and cluster names to avoid length overrun ...
    • 26dff4f chore: release storage 1.18.0 (#4951)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump cloud.google.com/go/storage from 1.17.0 to 1.18.0

    Bump cloud.google.com/go/storage from 1.17.0 to 1.18.0

    Bumps cloud.google.com/go/storage from 1.17.0 to 1.18.0.

    Release notes

    Sourced from cloud.google.com/go/storage's releases.

    spanner spanner/v1.18.0

    Features

    • spanner/admin/database: add progress field to UpdateDatabaseDdlMetadata (9029071)

    bigquery bigquery/v1.18.0

    Features

    • bigquery/storage: new JSON type through BigQuery Write (9029071)
    • bigquery: augment retry predicate to support additional errors (#4046) (d4af6f7)
    • bigquery: expose ParquetOptions for loads and external tables (#4016) (f9c4ccb)
    • bigquery: support mutable clustering configuration (#3950) (0ab30da)

    storage storage/v1.18.0

    Features

    • storage: returned wrapped error for timeouts (#4802) (0e102a3), refs #4197
    • storage: SignedUrl can use existing creds to authenticate (#4604) (b824c89)

    Bug Fixes

    • storage: update PAP to use inherited instead of unspecified (#4909) (dac26b1)
    Commits
    • 3e83900 chore: release spanner 1.18.0 (#3893)
    • aab30c6 test(firestore): add additional test verifying deleting a map value via updat...
    • 80fbb02 chore(all): auto-regenerate gapics (#4007)
    • e9684ab feat(bigtable): Customer Managed Encryption (CMEK) (#3899)
    • 8ccd689 fix(internal/gapicgen): use correct region tags for gensnippets (#4022)
    • 022fc35 chore(internal/gapicgen): add regen-only flag (#4015)
    • bc0549d Update CONTRIBUTING.md (#3960)
    • 0ab30da feat(bigquery): support mutable clustering configuration (#3950)
    • 9f6b648 chore: add SECURITY.md (#4013)
    • 67ed7e9 chore: release pubsub 1.10.3 (#4001)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Error locating libgdal.dylib in macos

    Error locating libgdal.dylib in macos

    I was trying out the godal library (on my M1 Mac) and wrote a simple script as follows:

    package main
    
    import (
    	"github.com/airbusgeo/godal"
    )
    
    func main() {
    	godal.RegisterAll()
    }
    

    Running go run main.go throws the following error

    dyld[19569]: Library not loaded: @rpath/libgdal.30.dylib
      Referenced from: /private/var/folders/y5/yh59dj093xn_dz8lm0mhv6lh0000gp/T/go-build1573968352/b001/exe/test
      Reason: tried: '/usr/local/lib/libgdal.30.dylib' (no such file), '/usr/lib/libgdal.30.dylib' (no such file)
    signal: abort trap
    

    godal has a dependency on gdal and I had installed it via conda. Due to this, the dylib is located under my conda folder - /Users/ash/miniconda3/lib not /usr/local/lib.

    How can I have the program search for libgdal.dylib in /Users/ash/miniconda3/lib instead of /usr/local/lib ?

    Had raised this question in StackOverflow previously but didn't get any solutions to this issue. Link - here

  • windwos not have gdal.pc

    windwos not have gdal.pc

    # pkg-config --cflags  -- gdal   
    Package 'gdal' has no Name: field
    pkg-config: exit status 1
    
    

    Can you give some examples about the configuration of gdal.pc for windows? thk

Related tags
memresolver is an in-memory golang resolver that allows to override current golang Lookup func literals

mem-resolver memresolver is an in-memory golang resolver that allows to override current golang Lookup func literals How to use it Create your custom

Jun 23, 2022
Govalid is a data validation library that can validate most data types supported by golang

Govalid is a data validation library that can validate most data types supported by golang. Custom validators can be used where the supplied ones are not enough.

Apr 22, 2022
Code Generation for Functional Programming, Concurrency and Generics in Golang

goderive goderive derives mundane golang functions that you do not want to maintain and keeps them up to date. It does this by parsing your go code fo

Dec 25, 2022
Golang source code parsing, usage like reflect package

gotype Golang source code parsing, usage like reflect package English 简体中文 Usage API Documentation Examples License Pouch is licensed under the MIT Li

Dec 9, 2022
Golang library to act on structure fields at runtime. Similar to Python getattr(), setattr(), hasattr() APIs.

go-attr Golang library to act on structure fields at runtime. Similar to Python getattr(), setattr(), hasattr() APIs. This package provides user frien

Dec 16, 2022
Composable HTML components in Golang
Composable HTML components in Golang

daz Composable HTML components in Golang Daz is a "functional" alternative to using templates, and allows for nested components/lists Also enables tem

Oct 3, 2022
Meteoric golang nitro sniper, 0.1/0.5s claim time.
Meteoric golang nitro sniper, 0.1/0.5s claim time.

Meteoric golang nitro sniper, 0.1/0.5s claim time.

Apr 3, 2021
Minimal UART client in Golang that dumps LPC1343 chips that are locked at CRP1.

Howdy y'all, This is a quick and dirty client for the UART bootloader of the LPC1343, and probably other bootloaders in that chip family. This client

Dec 2, 2022
psutil for golang

gopsutil: psutil for golang This is a port of psutil (https://github.com/giampaolo/psutil). The challenge is porting all psutil functions on some arch

Dec 30, 2022
Cross platform locale detection for Golang

go-locale go-locale is a Golang lib for cross platform locale detection. OS Support Support all OS that Golang supported, except android: aix: IBM AIX

Aug 20, 2022
A Go (golang) library for parsing and verifying versions and version constraints.

go-version is a library for parsing versions and version constraints, and verifying versions against a set of constraints. go-version can sort a collection of versions properly, handles prerelease/beta versions, can increment versions, etc.

Jan 9, 2023
A port of the parser from graphql-js into golang

gqlparser This is a parser for graphql, written to mirror the graphql-js reference implementation as closely while remaining idiomatic and easy to use

Dec 27, 2022
Copier for golang, copy value from struct to struct and more

Copier I am a copier, I copy everything from one to another Features Copy from field to field with same name Copy from method to field with same name

Jan 8, 2023
A library for diffing golang structures

Diff A library for diffing golang structures and values. Utilizing field tags and reflection, it is able to compare two structures of the same type an

Dec 29, 2022
Use Golang to implement PHP's common built-in functions.

PHP2Go Use Golang to implement PHP's common built-in functions. About 140+ functions have been implemented. Install go get github.com/syyongx/php2go R

Dec 28, 2022
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite

go-testdeep Extremely flexible golang deep comparison, extends the go testing package. Latest news Synopsis Description Installation Functions Availab

Jan 5, 2023
A well tested and comprehensive Golang statistics library package with no dependencies.

Stats - Golang Statistics Package A well tested and comprehensive Golang statistics library / package / module with no dependencies. If you have any s

Dec 30, 2022
go-sundheit:A library built to provide support for defining service health for golang services
go-sundheit:A library built to provide support for defining service health for golang services

A library built to provide support for defining service health for golang services. It allows you to register async health checks for your dependencies and the service itself, and provides a health endpoint that exposes their status.

Dec 27, 2022
Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation

stack Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation Purpose Provide a fast, thread safe, and generic Golang Stack API with minim

May 3, 2022