https://github.com/platx/geonames
A simple Go client for the Geonames API. Supports Webservice API and data downloads.
https://github.com/platx/geonames
geo geonames go golang http
Last synced: 7 months ago
JSON representation
A simple Go client for the Geonames API. Supports Webservice API and data downloads.
- Host: GitHub
- URL: https://github.com/platx/geonames
- Owner: platx
- License: mit
- Created: 2025-03-16T11:28:11.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-16T21:00:46.000Z (7 months ago)
- Last Synced: 2025-03-16T21:24:16.486Z (7 months ago)
- Topics: geo, geonames, go, golang, http
- Language: Go
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Geonames Golang client
======================
[](https://github.com/platx/geonames/releases/latest)
[](LICENSE)
[](https://codecov.io/github/platx/geonames)
[](https://godoc.org/github.com/platx/geonames)
[](https://goreportcard.com/report/github.com/platx/geonames)This is a simple Golang client for the [Geonames](http://www.geonames.org/) API. It supports both [Webservice API](https://www.geonames.org/export/web-services.html) and [Download server](https://download.geonames.org/export/dump/).
## Features
* Easy-to-use Golang wrapper for Geonames API.
* Includes web service endpoints and downloadable data processing.
* Implements various API services like country info, nearby locations, postal codes, and Wikipedia data.# Installation
```bash
go get github.com/platx/geonames
```# Usage
## Webservices
### Webservice usage example
```go
package mainimport (
"context"
"fmt"
"log""github.com/platx/geonames/webservice"
)func main() {
client := webservice.NewClient("your-username")
result, err := client.Search(context.Background(), webservice.SearchRequest{
Name: "London",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}
```### Supported API services
Refer to the following table to check supported and implemented endpoints (emoji ✅ is clickable).| WebService | Implemented | XML | JSON | RDF | CSV | TXT | RSS | KML |
|------------------------------------------------------------------------------------------------------------------|---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| [astergdem](https://www.geonames.org/export/web-services.html#astergdem ) | ❌ | [✅](http://api.geonames.org/astergdem?lat=50.01&lng=10.2&username=demo&style=full&type=XML) | [✅](http://api.geonames.org/astergdemJSON?formatted=true&lat=50.01&lng=10.2&username=demo&style=full) | ❌ | ❌ | [✅](http://api.geonames.org/astergdem?lat=50.01&lng=10.2&username=demo&style=full) | ❌ | ❌ |
| [children](https://www.geonames.org/export/place-hierarchy.html#children) | ❌ | [✅](http://api.geonames.org/children?geonameId=3175395&username=demo&style=full) | [✅](http://api.geonames.org/childrenJSON?formatted=true&geonameId=3175395&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [contains](https://www.geonames.org/export/place-hierarchy.html#contains) | ❌ | [✅](http://api.geonames.org/contains?geonameId=2746385&username=demo&style=full) | [✅](http://api.geonames.org/containsJSON?formatted=true&geonameId=2746385&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [countryCode](https://www.geonames.org/export/web-services.html#countrycode) | [✅](./webservice/country_code.go) | [✅](http://api.geonames.org/countryCodeXML?lat=47.03&lng=10.2&username=demo&style=full) | [✅](http://api.geonames.org/countryCodeJSON?formatted=true&lat=47.03&lng=10.2&username=demo&style=full) | ❌ | ❌ | [✅](http://api.geonames.org/countryCode?lat=47.03&lng=10.2&username=demo&style=full) | ❌ | ❌ |
| [countryInfo](https://www.geonames.org/export/web-services.html#countryInfo) | [✅](./webservice/country_info.go) | [✅](http://api.geonames.org/countryInfo?lang=it&country=DE&username=demo&style=full) | [✅](http://api.geonames.org/countryInfoJSON?formatted=true&lang=it&country=DE&username=demo&style=full) | ❌ | [✅](http://api.geonames.org/countryInfoCSV?lang=it&country=DE&username=demo&style=full) | ❌ | ❌ | ❌ |
| [countrySubdivision](https://www.geonames.org/export/web-services.html#countrysubdiv) | ❌ | [✅](http://api.geonames.org/countrySubdivision?lat=47.03&lng=10.2&username=demo&style=full) | [✅](http://api.geonames.org/countrySubdivisionJSON?formatted=true&lat=47.03&lng=10.2&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [earthquakes](https://www.geonames.org/export/JSON-webservices.html#earthquakesJSON) | ❌ | [✅](http://api.geonames.org/earthquakes?north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo&style=full) | [✅](http://api.geonames.org/earthquakesJSON?formatted=true&north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [extendedFindNearby](https://www.geonames.org/export/web-services.html#extendedFindNearby) | ❌ | [✅](http://api.geonames.org/extendedFindNearby?lat=46.2022156980098&lng=6.14569187164307&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearby](https://www.geonames.org/export/web-services.html#findNearby) | [✅](./webservice/find_nearby.go) | [✅](http://api.geonames.org/findNearby?lat=48.865618158309374&lng=2.344207763671875&fclass=P&fcode=PPLA&fcode=PPL&fcode=PPLC&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyJSON?formatted=true&lat=48.865618158309374&lng=2.344207763671875&fclass=P&fcode=PPLA&fcode=PPL&fcode=PPLC&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearbyPlaceName](https://www.geonames.org/export/web-services.html#findNearbyPlaceName) | [✅](./webservice/find_nearby_place_name.go) | [✅](http://api.geonames.org/findNearbyPlaceName?lat=47.3&lng=9&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyPlaceNameJSON?formatted=true&lat=47.3&lng=9&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearbyPostalCodes](https://www.geonames.org/export/web-services.html#findNearbyPostalCodes) | ❌ | [✅](http://api.geonames.org/findNearbyPostalCodes?postalcode=8775&country=CH&radius=10&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyPostalCodesJSON?formatted=true&postalcode=8775&country=CH&radius=10&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearbyStreets](https://www.geonames.org/maps/us-reverse-geocoder.html#findNearbyStreets) | ❌ | [✅](http://api.geonames.org/findNearbyStreets?lat=37.451&lng=-122.18&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyStreetsJSON?formatted=true&lat=37.451&lng=-122.18&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearbyStreetsOSM](https://www.geonames.org/maps/osm-reverse-geocoder.html#findNearbyStreetsOSM) | ❌ | [✅](http://api.geonames.org/findNearbyStreetsOSM?lat=37.451&lng=-122.18&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyStreetsOSMJSON?formatted=true&lat=37.451&lng=-122.18&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearByWeather](https://www.geonames.org/export/JSON-webservices.html#findNearByWeatherJSON) | ❌ | [✅](http://api.geonames.org/findNearByWeather?lat=42&lng=-2&username=demo&style=full) | [✅](http://api.geonames.org/findNearByWeatherJSON?formatted=true&lat=42&lng=-2&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearbyWikipedia](https://www.geonames.org/export/wikipedia-webservice.html#findNearbyWikipedia) | [✅](./webservice/find_nearby_wikipedia.go) | [✅](http://api.geonames.org/findNearbyWikipedia?lat=47&lng=9&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyWikipediaJSON?formatted=true&lat=47&lng=9&username=demo&style=full) | ❌ | ❌ | ❌ | [✅](http://api.geonames.org/findNearbyWikipediaRSS?lat=47&lng=9&username=demo&style=full) | ❌ |
| [findNearestAddress](https://www.geonames.org/maps/us-reverse-geocoder.html#findNearestAddress) | ❌ | [✅](http://api.geonames.org/findNearestAddress?lat=37.451&lng=-122.18&username=demo&style=full) | [✅](http://api.geonames.org/findNearestAddressJSON?formatted=true&lat=37.451&lng=-122.18&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearestIntersection](https://www.geonames.org/maps/us-reverse-geocoder.html#findNearestIntersection) | ❌ | [✅](http://api.geonames.org/findNearestIntersection?lat=37.451&lng=-122.18&username=demo&style=full) | [✅](http://api.geonames.org/findNearestIntersectionJSON?formatted=true&lat=37.451&lng=-122.18&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearestIntersectionOSM](https://www.geonames.org/maps/osm-reverse-geocoder.html#findNearestIntersectionOSM) | ❌ | [✅](http://api.geonames.org/findNearestIntersectionOSM?lat=37.451&lng=-122.18&username=demo&style=full) | [✅](http://api.geonames.org/findNearestIntersectionOSMJSON?formatted=true&lat=37.451&lng=-122.18&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [findNearbyPOIsOSM](https://www.geonames.org/maps/osm-reverse-geocoder.html#findNearbyPOIsOSM) | ❌ | [✅](http://api.geonames.org/findNearbyPOIsOSM?lat=37.451&lng=-122.18&username=demo&style=full) | [✅](http://api.geonames.org/findNearbyPOIsOSMJSON?formatted=true&lat=37.451&lng=-122.18&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [address](https://www.geonames.org/maps/addresses.html#address) | ❌ | [✅](http://api.geonames.org/address?lat=52.358&lng=4.881&username=demo) | [✅](http://api.geonames.org/addressJSON?lat=52.358&lng=4.881&username=demoJSON) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [geoCodeAddress](https://www.geonames.org/maps/addresses.html#geoCodeAddress) | ❌ | [✅](http://api.geonames.org/geoCodeAddress?q=Museumplein+6+amsterdam&username=demo) | [✅](http://api.geonames.org/geoCodeAddressJSON?q=Museumplein+6+amsterdam&username=demo) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [streetNameLookup](https://www.geonames.org/maps/addresses.html#streetNameLookup) | ❌ | [✅](http://api.geonames.org/streetNameLookup?q=Museum&country=NL&username=demo) | [✅](http://api.geonames.org/streetNameLookupJSON?q=Museum&country=NL&username=demo) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [get](https://www.geonames.org/export/web-services.html#get) | [✅](./webservice/get.go) | [✅](http://api.geonames.org/get?geonameId=6295630&username=demo&style=full) | [✅](http://api.geonames.org/getJSON?formatted=true&geonameId=6295630&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [gtopo30](https://www.geonames.org/export/web-services.html#gtopo30) | ❌ | [✅](http://api.geonames.org/gtopo30?lat=47.01&lng=10.2&username=demo&style=full&type=XML) | [✅](http://api.geonames.org/gtopo30JSON?formatted=true&lat=47.01&lng=10.2&username=demo&style=full) | ❌ | ❌ | [✅](http://api.geonames.org/gtopo30?lat=47.01&lng=10.2&username=demo&style=full) | ❌ | ❌ |
| [hierarchy](https://www.geonames.org/export/place-hierarchy.html#hierarchy) | ❌ | [✅](http://api.geonames.org/hierarchy?geonameId=2657896&username=demo&style=full) | [✅](http://api.geonames.org/hierarchyJSON?formatted=true&geonameId=2657896&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [neighbourhood](https://www.geonames.org/export/web-services.html#neighbourhood) | ❌ | [✅](http://api.geonames.org/neighbourhood?lat=40.78343&lng=-73.96625&username=demo&style=full) | [✅](http://api.geonames.org/neighbourhoodJSON?formatted=true&lat=40.78343&lng=-73.96625&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [neighbours](https://www.geonames.org/export/place-hierarchy.html#neighbours) | ❌ | [✅](http://api.geonames.org/neighbours?geonameId=2658434&username=demo&style=full) | [✅](http://api.geonames.org/neighboursJSON?formatted=true&geonameId=2658434&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [ocean](https://www.geonames.org/export/web-services.html#ocean ) | ❌ | [✅](http://api.geonames.org/ocean?lat=40.78343&lng=-43.96625&username=demo&style=full) | [✅](http://api.geonames.org/oceanJSON?formatted=true&lat=40.78343&lng=-43.96625&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [postalCodeCountryInfo](https://www.geonames.org/export/web-services.html#postalCodeCountryInfo) | ❌ | [✅](http://api.geonames.org/postalCodeCountryInfo?&username=demo&style=full) | [✅](http://api.geonames.org/postalCodeCountryInfoJSON?formatted=true&&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [postalCodeLookup](https://www.geonames.org/export/web-services.html#postalCodeLookupJSON) | [✅](./webservice/postal_code_lookup.go) | ❌ | [✅](http://api.geonames.org/postalCodeLookupJSON?formatted=true&postalcode=6600&country=AT&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [postalCodeSearch](https://www.geonames.org/export/web-services.html#postalCodeSearch) | [✅](./webservice/postal_code_search.go) | [✅](http://api.geonames.org/postalCodeSearch?postalcode=9011&maxRows=10&username=demo&style=full) | [✅](http://api.geonames.org/postalCodeSearchJSON?formatted=true&postalcode=9011&maxRows=10&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [rssToGeo](https://www.geonames.org/rss-to-georss-converter.html) | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | [✅](http://api.geonames.org/rssToGeoRSS?feedUrl=http://feeds.reuters.com/reuters/worldNews&username=demo&style=full) | [✅](http://api.geonames.org/rssToGeoRSS?type=kml&feedUrl=http://feeds.reuters.com/reuters/worldNews&username=demo&style=full) |
| [search](https://www.geonames.org/export/geonames-search.html) | [✅](./webservice/search.go) | [✅](http://api.geonames.org/search?q=london&maxRows=10&lang=es&username=demo&style=full) | [✅](http://api.geonames.org/searchJSON?formatted=true&q=london&maxRows=10&lang=es&username=demo&style=full) | [✅](http://api.geonames.org/searchRDF?q=london&maxRows=10&lang=es&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ |
| [siblings](https://www.geonames.org/export/place-hierarchy.html#siblings) | ❌ | [✅](http://api.geonames.org/siblings?geonameId=3017382&username=demo&style=full) | [✅](http://api.geonames.org/siblingsJSON?formatted=true&geonameId=3017382&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [srtm1](https://www.geonames.org/export/web-services.html#srtm1) | ❌ | [✅](http://api.geonames.org/srtm1XML?lat=50.01&lng=10.2&username=demo&style=full) | [✅](http://api.geonames.org/srtm1JSON?formatted=true&lat=50.01&lng=10.2&username=demo&style=full) | ❌ | ❌ | [✅](http://api.geonames.org/srtm1?lat=50.01&lng=10.2&username=demo&style=full) | ❌ | ❌ |
| [srtm3](https://www.geonames.org/export/web-services.html#srtm3) | ❌ | [✅](http://api.geonames.org/srtm3XML?lat=50.01&lng=10.2&username=demo&style=full) | [✅](http://api.geonames.org/srtm3JSON?formatted=true&lat=50.01&lng=10.2&username=demo&style=full) | ❌ | ❌ | [✅](http://api.geonames.org/srtm3?lat=50.01&lng=10.2&username=demo&style=full) | ❌ | ❌ |
| [timezone](https://www.geonames.org/export/web-services.html#timezone) | [✅](./webservice/timezone.go) | [✅](http://api.geonames.org/timezone?lat=47.01&lng=10.2&username=demo&style=full) | [✅](http://api.geonames.org/timezoneJSON?formatted=true&lat=47.01&lng=10.2&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [weather](https://www.geonames.org/export/JSON-webservices.html#weatherJSON) | ❌ | [✅](http://api.geonames.org/weather?north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo&style=full) | [✅](http://api.geonames.org/weatherJSON?formatted=true&north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [weatherIcao](https://www.geonames.org/export/JSON-webservices.html#weatherIcaoJSON) | ❌ | [✅](http://api.geonames.org/weatherIcao?ICAO=LSZH&username=demo&style=full) | [✅](http://api.geonames.org/weatherIcaoJSON?formatted=true&ICAO=LSZH&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [wikipediaBoundingBox](https://www.geonames.org/export/wikipedia-webservice.html#wikipediaBoundingBox) | [✅](./webservice/wikipedia_bounding_box.go) | [✅](http://api.geonames.org/wikipediaBoundingBox?north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo&style=full) | [✅](http://api.geonames.org/wikipediaBoundingBoxJSON?formatted=true&north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |
| [wikipediaSearch](https://www.geonames.org/export/wikipedia-webservice.html#wikipediaSearch) | [✅](./webservice/wikipedia_search.go) | [✅](http://api.geonames.org/wikipediaSearch?q=london&maxRows=10&username=demo&style=full) | [✅](http://api.geonames.org/wikipediaSearchJSON?formatted=true&q=london&maxRows=10&username=demo&style=full) | ❌ | ❌ | ❌ | ❌ | ❌ |# Download
### Download usage example
```go
package mainimport (
"context"
"fmt"
"log""github.com/platx/geonames/download"
)func main() {
client := download.NewClient()
err := client.AllCountries(context.Background(), func(parsed download.GeoName) error {
fmt.Println(parsed)
return nil
})
if err != nil {
log.Fatal(err)
}
}
```### Supported files
Refer to the following table to check supported and implemented files (emoji ✅ is clickable).| File name | Implemented | Description |
|------------------------------------------------------------------------------------------|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| XX.zip | [✅](./download/by_country.go) | features for country with iso code XX, see 'geoname' table for columns. |
| [no-country.zip](https://download.geonames.org/export/dump/no-country.zip) | [✅](./download/no_country.go) | features not belonging to a country. |
| [allCountries.zip](https://download.geonames.org/export/dump/allCountries.zip) | [✅](./download/all_countries.go) | all countries combined in one file, see 'geoname' table for columns. |
| [cities500.zip](https://download.geonames.org/export/dump/cities500.zip) | [✅](./download/cities.go) | all cities with a population > 500 or seats of adm div down to PPLA4 (ca 185.000), see 'geoname' table for columns. |
| [cities1000.zip](https://download.geonames.org/export/dump/cities1000.zip) | [✅](./download/cities.go) | all cities with a population > 1000 or seats of adm div down to PPLA3 (ca 130.000), see 'geoname' table for columns. |
| [cities5000.zip](https://download.geonames.org/export/dump/cities5000.zip) | [✅](./download/cities.go) | all cities with a population > 5000 or PPLA (ca 50.000), see 'geoname' table for columns. |
| [cities15000.zip](https://download.geonames.org/export/dump/cities15000.zip) | [✅](./download/cities.go) | all cities with a population > 15000 or capitals (ca 25.000), see 'geoname' table for columns. |
| [alternateNamesV2.zip](https://download.geonames.org/export/dump/alternateNamesV2.zip) | [✅](./download/alternate_names.go) | alternate names with language codes and geonameId, file with iso language codes, with new columns from and to. |
| [alternateNames.zip](https://download.geonames.org/export/dump/alternateNames.zip) | ❌ | obsolete use V2, this file does not have the new columns to and from and will be removed in the future. |
| [admin1CodesASCII.txt](https://download.geonames.org/export/dump/admin1CodesASCII.txt) | [✅](./download/admin_division.go) | names in English for admin divisions. Columns: code, name, name ascii, geonameid. |
| [admin2Codes.txt](https://download.geonames.org/export/dump/admin2Codes.txt) | [✅](./download/admin_division.go) | names for administrative subdivision 'admin2 code' (UTF8), Format : concatenated codes name asciiname geonameId. |
| [iso-languagecodes.txt](https://download.geonames.org/export/dump/iso-languagecodes.txt) | [✅](./download/languages.go) | iso 639 language codes, as used for alternate names in file alternateNames.zip. |
| featureCodes_xx.txt | [✅](./download/feature_codes.go) | name and description for feature classes and feature codes. |
| [timeZones.txt](https://download.geonames.org/export/dump/timeZones.txt) | [✅](./download/time_zones.go) | countryCode, timezoneId, gmt offset on 1st of January, dst offset to gmt on 1st of July (of the current year), rawOffset without DST. |
| [countryInfo.txt](https://download.geonames.org/export/dump/countryInfo.txt) | [✅](./download/country_info.go) | country information : iso codes, fips codes, languages, capital ,... |
| modifications-{date}.txt | [✅](./download/modifications.go) | all records modified on the previous day, the date is in yyyy-MM-dd format. You can use this file to daily synchronize your own geonames database. |
| deletes-{date}.txt | [✅](./download/deletes.go) | all records deleted on the previous day, format : geonameId name comment. |
| alternateNamesModifications-{date}.txt | [✅](./download/alternate_names_modifications.go) | all alternate names modified on the previous day. |
| alternateNamesDeletes-{date}.txt | [✅](./download/alternate_names_deletes.go) | all alternate names deleted on the previous day, format : alternateNameId geonameId name comment. |
| [userTags.zip](https://download.geonames.org/export/dump/userTags.zip) | [✅](./download/user_tags.go) | user tags , format : geonameId tag. |
| [hierarchy.zip](https://download.geonames.org/export/dump/hierarchy.zip) | [✅](./download/hierarchy.go) | parentId, childId, type. The type 'ADM' stands for the admin hierarchy modeled by the admin1-4 codes. The other entries are entered with the user interface. The relation toponym-adm hierarchy is not included in the file, it can instead be built from the admincodes of the toponym. |
| [adminCode5.zip](https://download.geonames.org/export/dump/adminCode5.zip) | [✅](./download/admin_division.go) | the new adm5 column is not yet exported in the other files (in order to not break import scripts). Instead it is availabe as separate file. |# License
* This package is licensed under the [MIT License](./LICENSE). Feel free to use it in your open-source and commercial projects.
* GeoNames data is free and licensed under the [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/). You should give credit to GeoNames when using data or web services with a link or another reference to GeoNames.# Contribution
Feel free to submit issues and pull requests to improve functionality and coverage. Please make sure to add tests for new features.