Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geonames_local

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geonames_local

  • 3.3.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Geonames Local

Downloads and store Geonames.org data locally (MongoDB, Mongoid). Making every Geoname API operation possible on your servers. No hit limit, fast as possible.

  • Download all country data
  • Merges ZIP into cities, so you have masks
  • Updates using geonames IDs, no duplication

Use

Install where you want to populate the DB:

gem install geonames_local

You will also need in your system:

  • unzip
  • curl

Config

Create a config yml file:

geonames init

Will generate a geonames.yml file on your folder. The file is self explanatory.

Geonames splits the nations/countries database from the rest, so: It'll also populate the nations collection automatically: 252 nations.

geonames -c geonames.yml

To run it. Use -v for verbose.

If you are not sure your country/nation code, use:

geonames list <search>

Mongoid

Using http://github.com/fireho/geopolitical models:

City.first.region.nation.abbr => "BR"

Next

  • IP Geonames? http://ipinfodb.com
  • Hoods? ftp://geoftp.ibge.gov.br/malhas_digitais/censo_2010/setores_censitarios/
  • ActiveRecord/PostGIS - someone else

FAQs

Package last updated on 21 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc