All Projects → sildur → Offline_geocoder

sildur / Offline_geocoder

Licence: apache-2.0
Offline Geocoder

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Offline geocoder

Unimidi
Realtime MIDI IO for Ruby
Stars: ✭ 229 (+257.81%)
Mutual labels:  gem, jruby
Mobile Sdk
CARTO Mobile SDK core project
Stars: ✭ 116 (+81.25%)
Mutual labels:  geocoding, offline
warm-blanket
Ruby gem for warming up web services on boot
Stars: ✭ 1 (-98.44%)
Mutual labels:  gem, jruby
Nominatim Docker
Fully-featured container for geocoding, reverse geocoding and address lookup based on Nominatim and Open Street Map data.
Stars: ✭ 52 (-18.75%)
Mutual labels:  geocoding
Web Archives
A web archives reader
Stars: ✭ 52 (-18.75%)
Mutual labels:  offline
Dry Validation
Validation library with type-safe schemas and rules
Stars: ✭ 1,087 (+1598.44%)
Mutual labels:  gem
Nipp
🎒 Portable Programmable Text Convertor Hosted on URL: https://nwtgck.github.io/nipp
Stars: ✭ 64 (+0%)
Mutual labels:  offline
Local Npm
Local and offline-first npm mirror
Stars: ✭ 1,040 (+1525%)
Mutual labels:  offline
Local Feature Android
Add online and offline text translation to Android apps
Stars: ✭ 60 (-6.25%)
Mutual labels:  offline
Nanolightwallet
RaiBlocks Light Wallet written in NodeJS
Stars: ✭ 55 (-14.06%)
Mutual labels:  offline
Apollo Cache Persist
🎏 Simple persistence for all Apollo Cache implementations
Stars: ✭ 1,078 (+1584.38%)
Mutual labels:  offline
Matchete
A DSL for method overloading in Ruby based on pattern matching
Stars: ✭ 53 (-17.19%)
Mutual labels:  gem
Validated object
Self-validating Ruby objects
Stars: ✭ 57 (-10.94%)
Mutual labels:  gem
Pig Ci Rails
Monitor your Ruby Applications metrics (Memory, SQL Requests & Request Time) as part of your test suite.
Stars: ✭ 53 (-17.19%)
Mutual labels:  gem
React Native Learning Resources
Collection of some good resources for react-native ✨ 🔥 💥
Stars: ✭ 61 (-4.69%)
Mutual labels:  offline
Navi
Open Source Project for Grow with Google Udacity Scholarship Challenge - Navigation app using offline first strategy and google maps api - To get started please refer to the README.md - CONTRIBUTING.md and the project Wiki
Stars: ✭ 51 (-20.31%)
Mutual labels:  offline
Prestashop
Free PWA & SPA for PrestaShop
Stars: ✭ 59 (-7.81%)
Mutual labels:  offline
Geo On Fire
A library to create high performance geolocation queries for Firebase. Checkout the demos: https://run.plnkr.co/plunks/AYaN8ABEDcMntgbJyLVW/ and https://run.plnkr.co/plunks/xJgstAvXYcp0w7MbOOjm/
Stars: ✭ 54 (-15.62%)
Mutual labels:  geocoding
Google Time Zone
Get time zones for coordinates
Stars: ✭ 54 (-15.62%)
Mutual labels:  geocoding
Colorize
Ruby string class extension. It add some methods to set color, background color and text effect on console easier using ANSI escape sequences.
Stars: ✭ 1,082 (+1590.63%)
Mutual labels:  gem

Build Status Code Climate Gem Version Gem

OfflineGeocoder

A gem for offline reverse geocoding. It uses data from the GeoNames project.

Installation

Add this line to your application's Gemfile:

gem 'offline_geocoder'

And then execute:

$ bundle

Or install it yourself as:

$ gem install offline_geocoder

Usage

require "offline_geocoder"
geocoder = OfflineGeocoder.new
results = geocoder.search(51.5214588, -0.1729636)
p results

The above code will output this:

{:lat=>51.51116, :lon=>-0.18426, :name=>"Bayswater", :admin1=>"England", :admin2=>"Greater London", :cc=>"GB", :country=>"United Kingdom"}

Alternatively, you can use named parameters when searching:

results = geocoder.search(lat: 51.5214588, lon: -0.1729636)

Searching for names or attributes

You can search for names, countries and such. The first result will be returned.

Searches are case sensitive and must match entirely. e.g. "York" will not find "New York", and "Cote dIvoire" will not match "Cote d'Ivoire".

require "offline_geocoder"
geocoder = OfflineGeocoder.new
aus = geocoder.search(name: "Bayswater")
p aus
gb = geocoder.search(name: "Bayswater", country: "United Kingdom")
p gb

The above code will output this:

{:lat=>-37.85, :lon=>145.26667, :name=>"Bayswater", :admin1=>"Victoria", :admin2=>"Knox", :cc=>"AU", :country=>"Australia"}
{:lat=>51.51116, :lon=>-0.18426, :name=>"Bayswater", :admin1=>"England", :admin2=>"Greater London", :cc=>"GB", :country=>"United Kingdom"}

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contact Me

If you find any bugs or have a problem while using this library, please open an issue in this repo (or a pull request :)).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].