0.0
No commit activity in last 3 years
No release in over 3 years
Get latitude and longitude coordinates for a Philadelphia address.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 1.2.2
~> 1.8.4
>= 0
= 10.0.1
~> 3.12
= 2.12.0

Runtime

>= 0
 Project Readme

Build Status

phl_geocode

A Ruby gem for getting latitude and longitude coordinates for a Philadelphia address.

This is the Ruby version of the Node.js phl-geocode.

The gem uses Philadelphia's 311 Mobile Data Service API.

Get lat/long coordinates for a Philadelphia Address:

require "phl_geocode"
phl = PHLGeocode.new
phl.get_coordinates "1500 Market Street"

Example response:

[{
  :address => "1500 MARKET ST",
  :similarity => 100,
  :latitude => 39.9521740263203,
  :longitude => -75.1661518986459
}, {
  :address => "1500S MARKET ST",
  :similarity => 99,
  :latitude => 39.9521740263203,
  :longitude => -75.1661518986459
}]

Get the address key for a Philadelphia Address:

require "phl_geocode"
phl = PHLGeocode.new
phl.get_address_key "1500 Market Street"

Example response:

{
  :agency_id => "26",
  :topic_name => "AddressKeys",
  :topic_id => "410526",
  :address_ref => "01500 MARKET ST"
}

Override default settings:

require "phl_geocode"
phl = PHLGeocode.new :min_confidence => 100
phl.get_coordinates "1500 Market Street"