{"id":19330176,"url":"https://github.com/pelias/geonames","last_synced_at":"2025-04-07T18:13:34.968Z","repository":{"id":16398903,"uuid":"19149752","full_name":"pelias/geonames","owner":"pelias","description":"Import pipeline for geonames in to Pelias","archived":false,"fork":false,"pushed_at":"2024-03-13T15:04:56.000Z","size":2905,"stargazers_count":43,"open_issues_count":15,"forks_count":37,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-04-15T11:37:38.792Z","etag":null,"topics":["geocoding","open-data"],"latest_commit_sha":null,"homepage":"https://pelias.io","language":"JavaScript","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/pelias.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,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"custom":"https://geocode.earth"}},"created_at":"2014-04-25T14:56:25.000Z","updated_at":"2023-03-24T06:25:04.000Z","dependencies_parsed_at":"2023-09-24T05:11:39.128Z","dependency_job_id":"b59fda63-c3d9-4c26-9cbe-9f6990547fdc","html_url":"https://github.com/pelias/geonames","commit_stats":{"total_commits":449,"total_committers":26,"mean_commits":17.26923076923077,"dds":0.7282850779510022,"last_synced_commit":"621fc62d8821bb728b7a26c0165731d5b1833311"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelias%2Fgeonames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelias%2Fgeonames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelias%2Fgeonames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelias%2Fgeonames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pelias","download_url":"https://codeload.github.com/pelias/geonames/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704571,"owners_count":20982298,"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":["geocoding","open-data"],"created_at":"2024-11-10T02:34:32.361Z","updated_at":"2025-04-07T18:13:34.947Z","avatar_url":"https://github.com/pelias.png","language":"JavaScript","funding_links":["https://geocode.earth"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"100\" src=\"https://raw.githubusercontent.com/pelias/design/master/logo/pelias_github/Github_markdown_hero.png\"\u003e\n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003eA modular, open-source search engine for our world.\u003c/h3\u003e\n\u003cp align=\"center\"\u003ePelias is a geocoder powered completely by open data, available freely to everyone.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://en.wikipedia.org/wiki/MIT_License\"\u003e\u003cimg src=\"https://img.shields.io/github/license/pelias/api?style=flat\u0026color=orange\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://hub.docker.com/u/pelias\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/pelias/api?style=flat\u0026color=informational\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://gitter.im/pelias/pelias\"\u003e\u003cimg src=\"https://img.shields.io/gitter/room/pelias/pelias?style=flat\u0026color=yellow\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/pelias/docker\"\u003eLocal Installation\u003c/a\u003e ·\n        \u003ca href=\"https://geocode.earth\"\u003eCloud Webservice\u003c/a\u003e ·\n\t\u003ca href=\"https://github.com/pelias/documentation\"\u003eDocumentation\u003c/a\u003e ·\n\t\u003ca href=\"https://gitter.im/pelias/pelias\"\u003eCommunity Chat\u003c/a\u003e\n\u003c/p\u003e\n\u003cdetails open\u003e\n\u003csummary\u003eWhat is Pelias?\u003c/summary\u003e\n\u003cbr /\u003e\nPelias is a search engine for places worldwide, powered by open data. It turns addresses and place names into geographic coordinates, and turns geographic coordinates into places and addresses. With Pelias, you’re able to turn your users’ place searches into actionable geodata and transform your geodata into real places.\n\u003cbr /\u003e\u003cbr /\u003e\nWe think open data, open source, and open strategy win over proprietary solutions at any part of the stack and we want to ensure the services we offer are in line with that vision. We believe that an open geocoder improves over the long-term only if the community can incorporate truly representative local knowledge.\n\u003c/details\u003e\n\n# Pelias Geonames importer\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pelias/pelias)\n[![Greenkeeper badge](https://badges.greenkeeper.io/pelias/geonames.svg)](https://greenkeeper.io/)\n\nThis Node.js package imports data from [Geonames](http://geonames.org/) into\n[Pelias](http://pelias.io). It includes utilities for downloading and cleaning up the data before\nimport.\n\n## Requirements\n\n- Node.js. See [Pelias Software requirements](https://github.com/pelias/documentation/blob/master/requirements.md) for supported versions.\n\n### Installation\n\n```bash\ngit clone https://github.com/pelias/geonames\ncd geonames\nnpm install\n```\n\n### Configuration\nThe importer can be configured from your local [pelias-config](https://github.com/pelias/config)\n(defaults to `~/pelias.json`) in the `imports.geonames` object:\n\n```json\n{\n\t\"imports\": {\n\t\t\"geonames\": {\n\t\t\t\"datapath\": \"/path/to/geonames/data\",\n\t\t\t\"countryCode\": \"MX\",\n\t\t\t\"sourceURL\": \"http://example.com/geonames/\"\n\t\t}\n\t}\n}\n```\n\nThe following are all *optional*:\n\n  * `datapath`: the path to geonames data. Defaults to a directory inside the importer.\n  * `countryCode`: the two digit ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1)) country code\n    for the country for which data will be downloaded and imported. Use `ALL` for all countries.\n  * `sourceURL`: allows for specification of an alternate url prefix for downloads.\n\t  Will be appended with your specified countryCode and `.zip`.\n\t  If the field is undefined or an empty string then the code defaults to the official Geonames dumps.\n\n#### Admin Lookup\nPelias has the ability to compute the admin hierarchy (county, region, country, etc)\nfrom [Who's on First](https://whosonfirst.org) data.\nFor more info on how admin lookup works, see the documentation for\n[pelias/wof-admin-lookup](https://github.com/pelias/wof-admin-lookup). By default,\nadminLookup is enabled.  To disable, set `imports.adminLookup.enabled` to `false` in Pelias config.\n\n**Note:** Admin lookup requires loading around 5GB of data into memory.\n\n### Usage\n\nA list of supported countries and their codes can be viewed with `npm run countryCodes`\n\n```bash\n$\u003e npm run countryCodes\n┌─────┬──────────────────────────────────────────────┬──────────────────────┬───────────┬───────────┐\n│ ISO │ Country                                      │ Capital              │ Continent │ geonameid │\n│ AD  │ Andorra                                      │ Andorra la Vella     │ EU        │           │\n│ AE  │ United Arab Emirates                         │ Abu Dhabi            │ AS        │ 290557    │\n│ AF  │ Afghanistan                                  │ Kabul                │ AS        │ 1149361   │\n│ AG  │ Antigua and Barbuda                          │ St. John's           │ NA        │ 3576396   │\n```\n\n#### Download the data\nThe data corresponding to the countryCode in the pelias config file will be downloaded.\n`npm run download`\n\n#### Import the downloaded data\n\n`npm start`\n\n### Updating Metadata\n\nThe metadata is not shipped with the repo, however, during normal usage running `npm install` will also trigger a script that updates the metadata.\n\n__However__ this hook will not trigger in non-interactive sessions such as many shell scripts. To explicitly download the metadata or refresh it (it changes very infrequently, perhaps every few months), run:\n\n```\nnpm run download_metadata\n```\n\nThe metadata _is_ packaged in our Docker images, so using an up to date docker image should guarantee recent enough metadata.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelias%2Fgeonames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelias%2Fgeonames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelias%2Fgeonames/lists"}