Skip to content

AsGz/geo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

geo country reverse

offline-country-reverse-geocoder with golang

how to use

go get github.com/AsGz/geo/georeverse
package main

import (
	"fmt"

	"github.com/AsGz/geo/georeverse"
)

func main() {
	dataPath := "./data/polygons.properties"
	c, err := georeverse.NewCountryReverser(dataPath)
	if err != nil {
		panic(err)
	}
	fmt.Println(c.GetCountryCode(-89.234005, 41.645332)) //US
	fmt.Println(c.GetCountryCode(35.128458, 31.722628)) //PS
	fmt.Println(c.GetCountryCode(35.183690, 31.749162)) //IL
}

About

offline-country-reverse-geocoder with golang

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages