Go library to access geocoding and reverse geocoding APIs

GeoService in Go

PkgGoDev Build Status codecov Go Report Card

Code Coverage

codecov.io

A geocoding service developed in Go's way, idiomatic and elegant, not just in golang.

This product is designed to open to any Geocoding service. Based on it,

clients are implemented in ~50 LoC each.

It allows you to switch from one service to another by changing only 1 line, or enjoy all the free quota (requests/sec, day, month...) from them at the same time. Just like this.

package main

import (
	"fmt"
	"os"

	"github.com/codingsince1985/geo-golang"
	"github.com/codingsince1985/geo-golang/arcgis"
	"github.com/codingsince1985/geo-golang/bing"
	"github.com/codingsince1985/geo-golang/chained"
	"github.com/codingsince1985/geo-golang/frenchapigouv"
	"github.com/codingsince1985/geo-golang/geocod"
	"github.com/codingsince1985/geo-golang/google"
	"github.com/codingsince1985/geo-golang/here"
	"github.com/codingsince1985/geo-golang/locationiq"
	"github.com/codingsince1985/geo-golang/mapbox"
	"github.com/codingsince1985/geo-golang/mapquest/nominatim"
	"github.com/codingsince1985/geo-golang/mapquest/open"
	"github.com/codingsince1985/geo-golang/mapzen"
	"github.com/codingsince1985/geo-golang/opencage"
	"github.com/codingsince1985/geo-golang/openstreetmap"
	"github.com/codingsince1985/geo-golang/pickpoint"
	"github.com/codingsince1985/geo-golang/tomtom"
	"github.com/codingsince1985/geo-golang/yandex"
)

const (
	addr         = "Melbourne VIC"
	lat, lng     = -37.813611, 144.963056
	radius       = 50
	zoom         = 18
	addrFR       = "Champs de Mars Paris"
	latFR, lngFR = 48.854395, 2.304770
)

func main() {
	ExampleGeocoder()
}

// ExampleGeocoder demonstrates the different geocoding services
func ExampleGeocoder() {
	fmt.Println("Google Geocoding API")
	try(google.Geocoder(os.Getenv("GOOGLE_API_KEY")))

	fmt.Println("Mapquest Nominatim")
	try(nominatim.Geocoder(os.Getenv("MAPQUEST_NOMINATIM_KEY")))

	fmt.Println("Mapquest Open streetmaps")
	try(open.Geocoder(os.Getenv("MAPQUEST_OPEN_KEY")))

	fmt.Println("OpenCage Data")
	try(opencage.Geocoder(os.Getenv("OPENCAGE_API_KEY")))

	fmt.Println("HERE API")
	try(here.Geocoder(os.Getenv("HERE_APP_ID"), os.Getenv("HERE_APP_CODE"), radius))

	fmt.Println("Bing Geocoding API")
	try(bing.Geocoder(os.Getenv("BING_API_KEY")))

	fmt.Println("Mapbox API")
	try(mapbox.Geocoder(os.Getenv("MAPBOX_API_KEY")))

	fmt.Println("OpenStreetMap")
	try(openstreetmap.Geocoder())

	fmt.Println("PickPoint")
	try(pickpoint.Geocoder(os.Getenv("PICKPOINT_API_KEY")))

	fmt.Println("LocationIQ")
	try(locationiq.Geocoder(os.Getenv("LOCATIONIQ_API_KEY"), zoom))

	fmt.Println("ArcGIS")
	try(arcgis.Geocoder(os.Getenv("ARCGIS_TOKEN")))

	fmt.Println("geocod.io")
	try(geocod.Geocoder(os.Getenv("GEOCOD_API_KEY")))

	fmt.Println("Mapzen")
	try(mapzen.Geocoder(os.Getenv("MAPZEN_API_KEY")))

	fmt.Println("TomTom")
	try(tomtom.Geocoder(os.Getenv("TOMTOM_API_KEY")))

	fmt.Println("Yandex")
	try(yandex.Geocoder(os.Getenv("YANDEX_API_KEY")))

	// To use only with french locations or addresses,
	// or values ​​could be estimated and will be false
	fmt.Println("FrenchAPIGouv")
	tryOnlyFRData(frenchapigouv.Geocoder())

	// Chained geocoder will fallback to subsequent geocoders
	fmt.Println("ChainedAPI[OpenStreetmap -> Google]")
	try(chained.Geocoder(
		openstreetmap.Geocoder(),
		google.Geocoder(os.Getenv("GOOGLE_API_KEY")),
	))
}

func try(geocoder geo.Geocoder) {
	location, _ := geocoder.Geocode(addr)
	if location != nil {
		fmt.Printf("%s location is (%.6f, %.6f)\n", addr, location.Lat, location.Lng)
	} else {
		fmt.Println("got <nil> location")
	}
	address, _ := geocoder.ReverseGeocode(lat, lng)
	if address != nil {
		fmt.Printf("Address of (%.6f,%.6f) is %s\n", lat, lng, address.FormattedAddress)
		fmt.Printf("Detailed address: %#v\n", address)
	} else {
		fmt.Println("got <nil> address")
	}
	fmt.Print("\n")
}

func tryOnlyFRData(geocoder geo.Geocoder) {
	location, _ := geocoder.Geocode(addrFR)
	if location != nil {
		fmt.Printf("%s location is (%.6f, %.6f)\n", addrFR, location.Lat, location.Lng)
	} else {
		fmt.Println("got <nil> location")
	}
	address, _ := geocoder.ReverseGeocode(latFR, lngFR)
	if address != nil {
		fmt.Printf("Address of (%.6f,%.6f) is %s\n", latFR, lngFR, address.FormattedAddress)
		fmt.Printf("Detailed address: %#v\n", address)
	} else {
		fmt.Println("got <nil> address")
	}
	fmt.Print("\n")
}

Result

Google Geocoding API
Melbourne VIC location is (-37.813611, 144.963056)
Address of (-37.813611,144.963056) is 197 Elizabeth St, Melbourne VIC 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"197 Elizabeth St, Melbourne VIC 3000, Australia", Street:"Elizabeth Street", HouseNumber:"197", Suburb:"", Postcode:"3000", State:"Victoria", StateDistrict:"Melbourne City", County:"", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

Mapquest Nominatim
Melbourne VIC location is (-37.814218, 144.963161)
Address of (-37.813611,144.963056) is Melbourne's GPO, Postal Lane, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Melbourne's GPO, Postal Lane, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia", Street:"Postal Lane", HouseNumber:"", Suburb:"Melbourne", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"City of Melbourne", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

Mapquest Open streetmaps
Melbourne VIC location is (-37.814218, 144.963161)
Address of (-37.813611,144.963056) is Elizabeth Street, 3000, Melbourne, Victoria, AU
Detailed address: &geo.Address{FormattedAddress:"Elizabeth Street, 3000, Melbourne, Victoria, AU", Street:"Elizabeth Street", HouseNumber:"", Suburb:"", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"", CountryCode:"AU", City:"Melbourne"}

OpenCage Data
Melbourne VIC location is (-37.814217, 144.963161)
Address of (-37.813611,144.963056) is Melbourne's GPO, Postal Lane, Melbourne VIC 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Melbourne's GPO, Postal Lane, Melbourne VIC 3000, Australia", Street:"Postal Lane", HouseNumber:"", Suburb:"Melbourne (3000)", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"City of Melbourne", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

HERE API
Melbourne VIC location is (-37.817530, 144.967150)
Address of (-37.813611,144.963056) is 197 Elizabeth St, Melbourne VIC 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"197 Elizabeth St, Melbourne VIC 3000, Australia", Street:"Elizabeth St", HouseNumber:"197", Suburb:"", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AUS", City:"Melbourne"}

Bing Geocoding API
Melbourne VIC location is (-37.824299, 144.977997)
Address of (-37.813611,144.963056) is Elizabeth St, Melbourne, VIC 3000
Detailed address: &geo.Address{FormattedAddress:"Elizabeth St, Melbourne, VIC 3000", Street:"Elizabeth St", HouseNumber:"", Suburb:"", Postcode:"3000", State:"", StateDistrict:"", County:"", Country:"Australia", CountryCode:"", City:"Melbourne"}

Mapbox API
Melbourne VIC location is (-37.814200, 144.963200)
Address of (-37.813611,144.963056) is Elwood Park Playground, Melbourne, Victoria 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Elwood Park Playground, Melbourne, Victoria 3000, Australia", Street:"Elwood Park Playground", HouseNumber:"", Suburb:"", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

OpenStreetMap
Melbourne VIC location is (-37.814217, 144.963161)
Address of (-37.813611,144.963056) is Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia", Street:"Postal Lane", HouseNumber:"", Suburb:"Melbourne", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

PickPoint
Melbourne VIC location is (-37.814217, 144.963161)
Address of (-37.813611,144.963056) is Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia", Street:"Postal Lane", HouseNumber:"", Suburb:"Melbourne", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

LocationIQ
Melbourne VIC location is (-37.814217, 144.963161)
Address of (-37.813611,144.963056) is Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia", Street:"Postal Lane", HouseNumber:"", Suburb:"Melbourne", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

ArcGIS
Melbourne VIC location is (-37.817530, 144.967150)
Address of (-37.813611,144.963056) is Melbourne's Gpo
Detailed address: &geo.Address{FormattedAddress:"Melbourne's Gpo", Street:"350 Bourke Street Mall", HouseNumber:"350", Suburb:"", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"", CountryCode:"AUS", City:""}

geocod.io
Melbourne VIC location is (28.079357, -80.623618)
got <nil> address

Mapzen
Melbourne VIC location is (45.551136, 11.533929)
Address of (-37.813611,144.963056) is Stop 3: Bourke Street Mall, Bourke Street, Melbourne, Australia
Detailed address: &geo.Address{FormattedAddress:"Stop 3: Bourke Street Mall, Bourke Street, Melbourne, Australia", Street:"", HouseNumber:"", Suburb:"", Postcode:"", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AUS", City:""}

TomTom
Melbourne VIC location is (-37.815340, 144.963230)
Address of (-37.813611,144.963056) is Doyles Road, Elaine, West Central Victoria, Victoria, 3334
Detailed address: &geo.Address{FormattedAddress:"Doyles Road, Elaine, West Central Victoria, Victoria, 3334", Street:"Doyles Road", HouseNumber:"", Suburb:"", Postcode:"3334", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"Elaine"}

Yandex
Melbourne VIC location is (41.926823, 2.254232)
Address of (-37.813611,144.963056) is Victoria, City of Melbourne, Elizabeth Street
Detailed address: &geo.Address{FormattedAddress:"Victoria, City of Melbourne, Elizabeth Street", Street:"Elizabeth Street", HouseNumber:"", Suburb:"", Postcode:"", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"City of Melbourne"}

FrenchAPIGouv
Champs de Mars Paris location is (2.304770, 48.854395)
Address of (48.854395,2.304770) is 9001, Parc du Champs de Mars, 75007, Paris, Paris, Île-de-France, France
Detailed address: &geo.Address{FormattedAddress:"9001, Parc du Champs de Mars, 75007, Paris, Paris, Île-de-France, France", Street:"Parc du Champs de Mars", HouseNumber:"9001", Suburb:"", Postcode:"75007", State:" Île-de-France", StateDistrict:"", County:" Paris", Country:"France", CountryCode:"FRA", City:"Paris"}

ChainedAPI[OpenStreetmap -> Google]
Melbourne VIC location is (-37.814217, 144.963161)
Address of (-37.813611,144.963056) is Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia
Detailed address: &geo.Address{FormattedAddress:"Melbourne's GPO, Postal Lane, Chinatown, Melbourne, City of Melbourne, Greater Melbourne, Victoria, 3000, Australia", Street:"Postal Lane", HouseNumber:"", Suburb:"Melbourne", Postcode:"3000", State:"Victoria", StateDistrict:"", County:"", Country:"Australia", CountryCode:"AU", City:"Melbourne"}

License

geo-golang is distributed under the terms of the MIT license. See LICENSE for details.

Comments
  • Change the signature of the functions defined in the `Geocoder` interface

    Change the signature of the functions defined in the `Geocoder` interface

    More often one would like to have an address, returned by reverse geocoding service, as a structure, with separate fields for all the parts an address consists of. Returning a formatted address doesn't cut it most of the times. Also (as a personal opinion of mine and engineers in my team) I find it nice having homogeneous definitions - Geocode returns the Location structure, so why not have a similar signature for ReverseGeocode. Hence I would like to propose (and implement it all over) the following change in the Geocoder interface definitions:

    type Geocoder interface {
    	Geocode(address string) (*Location, error)
    	ReverseGeocode(lat, lng float64) (*Address, error)
    }
    

    with Address being defined in the package geo in a similar manner to the Location one

    // Address is the structured representation of an address, including its flat representation
    type Address struct {
    	FormattedAddress string
    	Street           string
    	HouseNumber      string
    	Suburb           string
    	Postcode         string
    	State            string
    	StateDistrict    string
    	County           string
    	Country          string
    	CountryCode      string
    	City             string
    }
    

    My reasoning for the further proposed changes:

    • Return pointer to the defined structure, so that the caller can check for nil; checking for zero values to deduce ErrNoResult may often go wrong (further no result being returned shouldn't be an error)
    • Add second return value of type error makes is easier to catch errors and propagate them back to the caller, next to a nil, who then should decide how to react
    • The (uniform) address string, currently returned by Address() would be accessible through the FormattedAddress field
  • Tests should run against mock http responses

    Tests should run against mock http responses

    Testing would be easier to perform and more reliable if the library used mock http responses for geo APIs (e.g. the API's seem to be a little flakey sometimes causing intermittent build failures).

    We could record HTTP requests/responses from the existing tests as the initial mock http responses.

    We could always conditionally run the tests in "integration" mode which would run the mock tests and actual API tests if we still wanted to exercise the live APIs.

  • Add structured address

    Add structured address

    PR to solve issue #29

    It's been a while, but with Christmas, work and family added to the fact I had to sign up for many of the providers, the library supports, look into the documentation of their API, etc...

    To sum up the major changes I made:

    • use context.Context with a timeout instead of time.After with the benefit of cleaning up / releasing resources in case the deadline has been reached
    • moved the structures geo.Location and geo.Address to geocoder.go, where the definition of the interface is placed, since these are part of the interface's contract and also to reduce the LOC in http_geocoder.go
    • no longer using ErrNoResults, this can be now deduced if the returned values are nil, nil; in case an error has been returned by the provider (only few really do so) it's then translated in the second return value
    • moved the examples code from geocoder_test.go to examples/geocoder_example.go to not be mistaken with unit tests, because of language specific conventions

    In case of further questions / concerns, I'll be glad to discuss them.

    Cheers

  • Nil results with no error

    Nil results with no error

    I'm getting some odd results like getting a nil address or location when geocoding or reverse geocoding.

    Geocoding "4000 Blackhawk Plaza Cir, Danville, California 94506, United States": [Here] Geocoded '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' to location: &{37.7999631 -121.9202164} [OpenCage] Failed to geocode address: geocoding error: missing API key [OpenStreetMap] Failed to geocode address: location is nil [Bing] Geocoded '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' to location: &{37.800872802734375 -121.9173355102539} [Google] Geocoded '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' to location: &{37.8006389 -121.919588} [Nominatim] Geocoded '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' to location: &{0 0} [Open] Geocoded '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' to location: &{39.78373 -100.445882} [MapBox] Geocoded '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' to location: &{37.800639 -121.919588} [LocationIQ] Failed to geocode address: location is nil

    Reverse Geocoding "37.8006389,-121.919588": [Google] Failed to reverse geocode location: address is nil [Here] Reverse geocoded location 37.8006389,-121.919588 to 'Danville, CA 94506, United States' [Open] Reverse geocoded location 37.8006389,-121.919588 to 'Blackhawk Plaza Circle, 94506, Blackhawk, CA, US' [MapBox] Reverse geocoded location 37.8006389,-121.919588 to '4000 Blackhawk Plaza Cir, Danville, California 94506, United States' [OpenStreetMap] Reverse geocoded location 37.8006389,-121.919588 to '4014, Blackhawk Plaza Circle, Blackhawk, Contra Costa County, California, 94506, United States of America' [Bing] Reverse geocoded location 37.8006389,-121.919588 to 'Street, Danville, CA 94506' [OpenCage] Failed to reverse geocode location: geocoding error: missing API key [LocationIQ] Reverse geocoded location 37.8006389,-121.919588 to '4014, Blackhawk Plaza Circle, Blackhawk, Contra Costa County, California, 94506, United States of America' [Nominatim] Reverse geocoded location 37.8006389,-121.919588 to 'Blackhawk Plaza Circle, Blackhawk, Contra Costa County, California, 94506, United States of America'

    I'm not sure if I'm doing something wrong or my expectation is incorrect but I would imagine we should get an error if an address or location is nil.

  • Panic in mapquest/open/geocoder.go

    Panic in mapquest/open/geocoder.go

    I have a test that uses lat/long 0,0 and it seems to panic the library.

    panic: runtime error: index out of range

    goroutine 76 [running]: panic(0x39cd00, 0xc4200140f0) /usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1 ../vendor/github.com/codingsince1985/geo-golang/mapquest/open.(*geocodeResponse).Address(0xc42043c5c0, 0x50, 0x5cd2e0) ../vendor/github.com/codingsince1985/geo-golang/mapquest/open/geocoder.go:49 +0x18a ../vendor/github.com/codingsince1985/geo-golang.HTTPGeocoder.ReverseGeocode.func1(0x5ce920, 0xc4200156f0, 0x444178, 0x0, 0x0, 0xc42013b3e0) ../vendor/github.com/codingsince1985/geo-golang/http_geocoder.go:71 +0xaa created by ../vendor/github.com/codingsince1985/geo-golang.HTTPGeocoder.ReverseGeocode ../vendor/github.com/codingsince1985/geo-golang/http_geocoder.go:72 +0xb7 exit status 2

  • Cached Geocoder

    Cached Geocoder

    Depends on #17

    • Implements a CachedGeocoder that will cache responses to another Geocoder
      • currently uses in-memory cache https://github.com/patrickmn/go-cache
        • could use a cache interface type later to support other cache implementations
  • Geocoder as an interface to allow for chained and cached types

    Geocoder as an interface to allow for chained and cached types

    Closes https://github.com/codingsince1985/geo-golang/issues/10

    Make the top-level Geocoder type an interface and the HTTP specific one a HTTPGeocoder

    This will be useful for implementing more abstract Geocoder types like Chained fallback ones or cached ones as described here https://github.com/codingsince1985/geo-golang/issues/10

    Also made ResponseObject() be a function that returns new instances (I think there may have been a concurrency issue because the Geocoders were returning the same pointer for every call, so if you made concurrent calls to a Geocoder API it would be decoding to the same response pointer).

    // Geocoder can look up (lat, long) by address and address by (lat, long)
    type Geocoder interface {
        Geocode(address string) (Location, error)
        ReverseGeocode(lat, lng float64) (string, error)
    }
    
    
    // HTTPGeocoder has EndpointBuilder and ResponseParser
    type HTTPGeocoder struct {
        EndpointBuilder
        ResponseParserFactory ResponseParserFactory
    }
    
  • Panic at geo-golang/mapquest/open/geocoder.go:46

    Panic at geo-golang/mapquest/open/geocoder.go:46

    Seeing another panic, not sure if it is tracked or not.

    I think it's this line: func (r *geocodeResponse) Location() geo.Location { return r.Results[0].Locations[0].LatLng }

    panic: runtime error: index out of range

    goroutine 15 [running]: panic(0x3a0bc0, 0xc420016100) /usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1 ../codingsince1985/geo-golang/mapquest/open.(*geocodeResponse).Location(0xc4204323a0, 0x6d, 0x5d32e0) /Users/saheljalal/code/go/src/../codingsince1985/geo-golang/mapquest/open/geocoder.go:46 +0x47 ../codingsince1985/geo-golang.HTTPGeocoder.Geocode.func1(0x5d4920, 0xc420017700, 0x448aa8, 0xc42014cbd0, 0x2e, 0xc420302d90) /Users/saheljalal/code/go/src/../codingsince1985/geo-golang/http_geocoder.go:54 +0xbe created by ../codingsince1985/geo-golang.HTTPGeocoder.Geocode /Users/saheljalal/code/go/src/../codingsince1985/geo-golang/http_geocoder.go:55 +0xb6

  • Added state code to the address object

    Added state code to the address object

    Hi

    I want to use your library, but need State Code in the response. Please, check my solution, I've added state code in all services which provide state code.

    I can make additional updates if something wrong.

    Otherwise, I'll need to create a map where I'll lookup long names to short, which looks strange for me as logically library can provide these already.

    Regards, Aleksandr

  • print payload when an error is received in response method

    print payload when an error is received in response method

    we are using opencage as provider and some times when we do a request for it we receive this error invalid character '<' looking for beginning of value and would be nice if we could see the response from opencage. So with this PR we create a Logger for those who use this library print the payload and it is flexible.

  • function openstreetmap.Geocode panics for no results query

    function openstreetmap.Geocode panics for no results query

    For instance for address: 31171 Fisher Manor,Simeonbury,United States

    panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1228a40]

    Because func response from http_geocoder.go returns nil when body is empty.

  • Adding context to Geocoder interface

    Adding context to Geocoder interface

    Would you accpet a PR, or consider modifying this module such that users could pass a context to the Geocoder interface? This addition would make this module much more powerful in production, since web servers would be able to pass the top level context for things like tracing and etc. The new interface would not be backwards compatible, but would be trivial for users to update, i.e. provide context.TODO to their calls as you've done

  • Could not set google region and language query parameters

    Could not set google region and language query parameters

    Sometimes we need to specify some more detailed query params. For example here we have a lack of language and region parameters for google geocoding api

  • How to find details for an address?

    How to find details for an address?

    I only want to use the lib only to autocomplete adresses. I want to search for "Fred-Grube-Platz 23, 30451 Hannover" and get the "formattedAdress" back. IS that possible? Or is only a conversion from adress to lat/lon possible?

  • Package returns abbreviations for city/state instead of full name

    Package returns abbreviations for city/state instead of full name

    Hello,

    By default the package does not include headers related to language, ie Accept-Language

    Using, Accept-Language = en for example will result in the full name of the city/state

    While, Accept-Language = EN for example will result in abbreviation for the city/state

    In my setup I often see the later being returned which results in abbreviations for city/state.

    Can we introduce an optional param to Geocoder to pass in headers when making a request to Nominatim (so that we can control the Accept-Language header)?

    Thank you!

    More about this issue is outlined here: https://github.com/openstreetmap/Nominatim/issues/783

  • Geocode should also return accuracy data

    Geocode should also return accuracy data

    Some providers do give certain details about what type of result it is. Having this information (when available) will help validate the results, and can help determine if I need to use another provider as a fallback if the results is not accurate enough.

rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources.
rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org     account access, and private resources.

rpCheckup - Catch AWS resource policy backdoors like Endgame rpCheckup is an AWS resource policy security checkup tool that identifies public, externa

Dec 26, 2022
A cloud native Identity & Access Proxy / API (IAP) and Access Control Decision API

Heimdall Heimdall is inspired by Ory's OAthkeeper, tries however to resolve the functional limitations of that product by also building on a more mode

Jan 6, 2023
"there" also called "GoThere" aims to be a simple Go Library to reduce redundant code for REST APIs.

there "there" also called "GoThere" aims to be a simple Go Library to reduce redundant code for REST APIs. Despite the existence of the other librarie

Dec 25, 2022
Opensea-go - Golang's library for OpenSea APIs

opensea-go Golang's library for OpenSea APIs (https://docs.opensea.io/reference)

Nov 26, 2022
The wazuh-integratord is a daemon that allows Wazuh to connect to external APIs and alerting tools such as Slack, VirusTotal and PagerDuty.

The wazuh-integratord is a daemon that allows Wazuh to connect to external APIs and alerting tools such as Slack, VirusTotal and PagerDuty.

Apr 22, 2022
lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin to AWS Lambda and Amazon API Gateway.

aws-lambda-go-api-proxy makes it easy to run Golang APIs written with frameworks such as Gin with AWS Lambda and Amazon API Gateway.

Jan 6, 2023
Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs

PnPjs is a fluent JavaScript API for consuming SharePoint and Microsoft Graph REST APIs in a type-safe way. You can use it with SharePoint Framework,

Dec 23, 2022
Tiny go package for fetching high and low value of a stock for any given period range using kite connect historical data APIs.

Tiny go package for fetching high and low value of stock for any given period range using Kite connect Historical data APIs.

Apr 27, 2022
Service that wrap up different movies-related APIs like IMDB and match it to streaming services
Service that wrap up different movies-related APIs like IMDB and match it to streaming services

Service that wrap up different movies-related APIs like IMDB and match it to streaming services. That way you can check in which platforms you can find your favorite movies.

Feb 10, 2022
Reverse-engineered API + SDK for the Amizone Student Portal.

go-amizone go-amizone is a simple and robust Go library and API server for the Amizone student portal. This library is intended to be used as a self-h

Dec 18, 2022
A golang client for the Twitch v3 API - public APIs only (for now)

go-twitch Test CLIENT_ID="<my client ID>" go test -v -cover Usage Example File: package main import ( "log" "os" "github.com/knspriggs/go-twi

Sep 27, 2022
Auto-generated Google APIs for Go.

Google APIs Client Library for Go Getting Started $ go get google.golang.org/api/tasks/v1 $ go get google.golang.org/api/moderator/v1 $ go get google.

Jan 8, 2023
Twilight is an unofficial Golang SDK for Twilio APIs
Twilight is an unofficial Golang SDK for Twilio APIs

Twilight is an unofficial Golang SDK for Twilio APIs. Twilight was born as a result of my inability to spell Twilio correctly. I searched for a Twillio Golang client library and couldn’t find any, I decided to build one. Halfway through building this, I realized I had spelled Twilio as Twillio when searching for a client library on Github.

Jul 2, 2021
Sync your bank transactions with google sheets using Open Banking APIs

Sync your bank transactions with google sheets using Open Banking APIs

Jul 22, 2022
Sync your bank transactions with google sheets using Open Banking APIs

this is a markdown version of the copy on the site landing page: https://youneedaspreadsheet.com You need a spreadsheet ?? Get on top of your finances

Jul 22, 2022
The MinIO Admin Go Client SDK provides APIs to manage MinIO services

Golang Admin Client API Reference The MinIO Admin Golang Client SDK provides APIs to manage MinIO services. This quickstart guide will show you how to

Dec 30, 2022
Go API Client for NASA's Open APIs

Go Client for Nasa Open APIs Description The Go Client for Nasa Open APIs is a Go Client for the following Nasa Open APIs: APOD: Astronomy Picture of

Sep 24, 2021
Http apis with AWS CDK for Go

Http apis with AWS CDK for Go Blog: https://harshq.medium.com/building-apps-with-aws-sdk-for-golang-api-gateway-and-lambda-b254858b1d71 Useful command

Jan 4, 2022
The task given by Appointy completed to develop APIs for a basic version of Instagram.

✨ Instagram APIs ✨ The task given by Appointy completed to develop APIs for a basic version of Instagram. Create an User Get User by Id Create a Post

Oct 9, 2021