{"id":13425078,"url":"https://github.com/go-spatial/geocatalogo","last_synced_at":"2025-12-26T01:08:58.006Z","repository":{"id":57552778,"uuid":"108600272","full_name":"go-spatial/geocatalogo","owner":"go-spatial","description":"Geospatial Catalogue in Go","archived":false,"fork":false,"pushed_at":"2019-10-09T01:46:44.000Z","size":172,"stargazers_count":22,"open_issues_count":9,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-02T12:02:10.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-spatial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-27T22:09:54.000Z","updated_at":"2021-02-07T06:06:21.000Z","dependencies_parsed_at":"2022-09-26T18:50:53.569Z","dependency_job_id":null,"html_url":"https://github.com/go-spatial/geocatalogo","commit_stats":null,"previous_names":["tomkralidis/geocatalogo"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-spatial%2Fgeocatalogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-spatial%2Fgeocatalogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-spatial%2Fgeocatalogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-spatial%2Fgeocatalogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-spatial","download_url":"https://codeload.github.com/go-spatial/geocatalogo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243781820,"owners_count":20347152,"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-31T00:01:04.072Z","updated_at":"2025-12-26T01:08:57.955Z","avatar_url":"https://github.com/go-spatial.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# geocatalogo\n\n[![Build Status](https://travis-ci.org/go-spatial/geocatalogo.png)](https://travis-ci.org/go-spatial/geocatalogo)\n[![Report Card](https://goreportcard.com/badge/github.com/go-spatial/geocatalogo)](https://goreportcard.com/report/github.com/go-spatial/geocatalogo)\n[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/go-spatial/geocatalogo)\n\n## Overview\n\nGeospatial Catalogue in Go\n\n## Installation\n\n# Requirements\n\ngeocatalogo's default backend is [Elasticsearch](https://www.elastic.co/) and\nrequires an Elasticsearch endpoint as defined in configuration.\n\n```bash\n# create directory for local env\nmkdir /path/to/golang-env\nexport GOPATH=/path/to/golang-env\n# install dependencies\ngo get golang.org/x/text/encoding\ngo get github.com/sirupsen/logrus\ngo get gopkg.in/yaml.v2\ngo get gopkg.in/olivere/elastic.v6/..\ngo get golang.org/x/lint/...\n# install geocatalogo\ngo get github.com/go-spatial/geocatalogo/...\ncd $GOPATH/src/github.com/go-spatial/geocatalogo\n# set configuration\n# (sample in $GOPATH/src/github.com/go-spatial/geocatalogo/geocatalogo-config.env)\ncp geocatalogo-config.env local.env\nvi local.env  # update accordingly\n# GEOCATALOGO_SERVER_OPENAPI: path to OpenAPI Document\n# GEOCATALOGO_SERVER_URL: URL of geocatalogo instance for serving via HTTP\n# GEOCATALOGO_REPOSITORY_URL: URL to Elasticsearch\n. local.env\n```\n\n## Running\n\n### Using the geocatalogo command line utility\n\n```bash\n# list commands\ngeocatalogo\n\n# index a metadata record\ngeocatalogo index --file=/path/to/record.xml\n\n# index a directory of metadata records\ngeocatalogo index --dir=/path/to/dir\n\n# dedicated importers\n\n# Landsat on AWS (https://aws.amazon.com/public-datasets/landsat/)\ncurl http://landsat-pds.s3.amazonaws.com/c1/L8/scene_list.gz | gunzip \u003e /tmp/scene_list\nlandsat-aws-importer --file /tmp/scene_list\n\n# OpenAerialMap Catalog (https://docs.openaerialmap.org/catalog/)\ncurl \"https://api.openaerialmap.org/meta?limit=5000\" \u003e /tmp/oam.json\noam-catalog-importer --file /tmp/scene_list\n\n# search index\ngeocatalogo search --term=landsat\n\n# search by bbox\ngeocatalogo search --bbox -152,42,-52,84\n\n# search by time instant\ngeocatalogo search --time 2018-01-19T18:28:02Z\n\n# search by time range\ngeocatalogo search --time 2007-11-11T12:43:29Z/2018-01-19T18:28:02Z\n\n# search by collections\ngeocatalogo search --collections landsat8\n\n# search by any combination exclusively (term, bbox, time)\ngeocatalogo search --time 2007-11-11T12:43:29Z/2018-01-19T18:28:02Z --bbox -152,42,-52,84 --term landsat\n\n# get a metadata record by id\ngeocatalogo get --id=12345\n\n# get a metadata record by list of ids\ngeocatalogo get --id=12345,67890\n\n# run as an HTTP server (default port 8000)\ngeocatalogo serve\n# run as an HTTP server on a custom port\ngeocatalogo serve --port 8001\n# run as an HTTP server honouring the STAC API\ngeocatalogo serve --api stac\n\n# get version\ngeocatalogo version\n```\n\n### Using the API\n\n```go\n// init a Geocatalogue from environment\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/go-spatial/geocatalogo\"\n\t\"github.com/go-spatial/geocatalogo/metadata/parsers\"\n)\n\ncat, err := geocatalogo.NewFromEnv()\nif err != nil {\n\tfmt.Println(err)\n}\n\n// index a Dublin Core metadata record\nsource, err := ioutil.ReadFile(file)\nif err != nil {\n\tfmt.Printf(\"Could not read file: %s\\n\", err)\n}\nmetadataRecord, err := parsers.ParseCSWRecord(source)\nif err != nil {\n\tfmt.Printf(\"Could not parse metadata: %s\\n\", err)\n\tcontinue\n}\nresult := cat.Index(metadataRecord)\nif !result {\n\tfmt.Println(\"Error Indexing\")\n}\n\n// search records and present records 0 - 10\nresults := cat.Search(\"birds\", 0, 10)\n\n// get record by id\nresults := cat.Get(\"record-id-123\")\n\n// process results\nfor _, result := range results.Records {\n\tb, _ := json.MarshalIndent(result, \"\", \"    \")\n\tfmt.Printf(\"%s\\n\", b)\n}\n```\n\n## Development\n\n### Running Tests\n\n## Releasing\n\n### Bugs and Issues\n\nAll bugs, enhancements and issues are managed on [GitHub](https://github.com/go-spatial/geocatalogo).\n\n## Contact\n\n* [Tom Kralidis](https://github.com/tomkralidis)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-spatial%2Fgeocatalogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-spatial%2Fgeocatalogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-spatial%2Fgeocatalogo/lists"}