{"id":13412986,"url":"https://github.com/airbusgeo/godal","last_synced_at":"2025-03-14T19:30:49.594Z","repository":{"id":39972281,"uuid":"336341512","full_name":"airbusgeo/godal","owner":"airbusgeo","description":"golang wrapper for github.com/OSGEO/gdal","archived":false,"fork":false,"pushed_at":"2024-09-12T15:42:02.000Z","size":578,"stargazers_count":128,"open_issues_count":9,"forks_count":25,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-09-13T15:42:07.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/airbusgeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-05T17:27:05.000Z","updated_at":"2024-09-13T07:51:45.000Z","dependencies_parsed_at":"2023-10-03T19:04:09.771Z","dependency_job_id":"4c7a91b5-4c43-4dae-bdf4-d4fa286c9861","html_url":"https://github.com/airbusgeo/godal","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbusgeo%2Fgodal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbusgeo%2Fgodal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbusgeo%2Fgodal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbusgeo%2Fgodal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/airbusgeo","download_url":"https://codeload.github.com/airbusgeo/godal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243635199,"owners_count":20322896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:31.976Z","updated_at":"2025-03-14T19:30:49.285Z","avatar_url":"https://github.com/airbusgeo.png","language":"Go","funding_links":[],"categories":["Go","地理","Geographic","Relational Databases"],"sub_categories":["检索及分析资料库","Advanced Console UIs","Search and Analytic Databases"],"readme":"# Golang bindings for GDAL\n[![Go Reference](https://pkg.go.dev/badge/github.com/airbusgeo/godal.svg)](https://pkg.go.dev/github.com/airbusgeo/godal)\n[![License](https://img.shields.io/github/license/airbusgeo/godal.svg)](https://github.com/airbusgeo/godal/blob/main/LICENSE)\n[![Build Status](https://github.com/airbusgeo/godal/workflows/build/badge.svg?branch=main\u0026event=push)](https://github.com/airbusgeo/godal/actions?query=workflow%3Agodal+event%3Apush+branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/airbusgeo/godal/badge.svg?branch=main)](https://coveralls.io/github/airbusgeo/godal?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/airbusgeo/godal)](https://goreportcard.com/report/github.com/airbusgeo/godal)\n\n\n\n### Goals\n\nGodal aims at providing an idiomatic go wrapper around the \u003cimg src=\"https://gdal.org/_static/gdalicon.png\" width=\"25\" height=\"25\"\u003e\n[GDAL](https://gdal.org) library:\n\n* Function calls return a result and an error. The result will be valid if\n  no error was returned. The error message will contain the root cause of why\n  the error happened.\n* Calls between go and native libraries incur some overhead. As such godal does\n  not strictly expose GDAL's API, but groups often-used calls in a single cgo function\n  to reduce this overhead. For example, C code like\n```c++\n    hDS = GDALOpen(filename, GA_Readonly)\n    if (hDS == NULL) exit(1);\n    int sx = GDALGetRasterXSize(hDS);\n    int sy = GDALGetRasterYSize(hDS);\n    int nBands = GDALGetRasterCount(hDS);\n    printf(\"dataset size: %dx%dx%d\\n\",sx,sy,nBands);\n    for (int i=1; i\u003c=nBands; i++) {\n        hBand = GDALGetRasterBand(hDS,i);\n        int ovrCount = GDALGetOverviewCount(hBand)\n        for(int o=0; o\u003c=ovrCount; o++) {\n            GDALRasterBandH oBand = GDALGetOverview(hBand,o);\n            int osx = GDALGetRasterBandXSize(oBand);\n            int osy = GDALGetRasterBandYSize(oBand);\n            printf(\"overview %d size: %dx%d\\n\",o,osx,osy);\n        }\n    }\n```\nwill be written as\n```go\n    hDS,err := godal.Open(filename)\n    if err!=nil {\n        panic(err)\n    }\n    structure := hDS.Structure()\n    fmt.Printf(\"dataset size: %dx%dx%d\\n\", structure.SizeX,structure.SizeY,structure.NBands)\n    for _,band := range hDS.Bands() {\n        for o,ovr := range band.Overviews() {\n            bstruct := ovr.Structure()\n            fmt.Printf(\"overview %d size: %dx%d\\n\",o,bstruct.SizeX,bstruct.SizeY)\n        }\n    }\n```\n* Unfrequently used or non-default parameters are passed as options:\n```go\n    ds,err := godal.Open(filename) //read-only\n    ds,err := godal.Open(filename, Update()) //read-write\n```\n* Godal exposes a VSI handler that can easily allow you to expose an\n  [io.ReaderAt](https://golang.org/pkg/io/#ReaderAt) as a filename that can be\n  opened by GDAL. A handler for opening `gs://` google cloud storage URIs is\n  provided through https://github.com/airbusgeo/osio\n\n### Documentation\n\n[![GoReference](https://pkg.go.dev/badge/github.com/airbusgeo/godal.svg)](https://pkg.go.dev/github.com/airbusgeo/godal)\ncontains the API reference and example code to get you started. The\n`*_test.go` files can also be used as reference.\n\n\n### Status\n\nGodal is not feature complete. The raster side is nearing completion and\nshould remain stable. The vector and spatial-referencing sides are far from\ncomplete, meaning that the API might evolve in backwards incompatible ways\nuntil essential functionality is covered.\n\n### Contributing\n\nContributions are welcome. Please read the [contribution guidelines](CONTRIBUTING.md)\nbefore submitting fixes or enhancements.\n\n### Installation\n\nGodal requires a GDAL version greater than 3.0. Make sure the GDAL headers\nare installed on the system used for compiling go+godal code. If using a GDAL\ninstallation in a non standard location, you can set your `PKG_CONFIG_PATH`\nenvironment variable, e.g. `export PKG_CONFIG_PATH=/opt/include/pkgconfig`.\n\n### Licensing\nGodal is licensed under the Apache License, Version 2.0. See\n[LICENSE](https://github.com/airbusgeo/godal/blob/main/LICENSE) for the full\nlicense text.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbusgeo%2Fgodal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairbusgeo%2Fgodal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbusgeo%2Fgodal/lists"}