https://github.com/mdb/phl_geocode.rb
Get latitude and longitude coordinates for a Philadelphia address.
https://github.com/mdb/phl_geocode.rb
Last synced: about 1 year ago
JSON representation
Get latitude and longitude coordinates for a Philadelphia address.
- Host: GitHub
- URL: https://github.com/mdb/phl_geocode.rb
- Owner: mdb
- Created: 2012-11-17T17:16:39.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-25T23:50:15.000Z (about 13 years ago)
- Last Synced: 2025-03-25T17:49:30.753Z (about 1 year ago)
- Language: Ruby
- Size: 263 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/mdb/phl_geocode.rb)
# 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](http://github.com/mdb/phl-geocode).
The gem uses Philadelphia's [311 Mobile Data Service API](http://services.phila.gov/ULRS311).
## 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"