broughcut / geopost
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit 6166fb72515317ed590caf988b2ec9463eb9cef6
tree 03892507e16b050df35e6ceba3dd1c4dbdf88a74
parent 3a0b2454a2a7e6dde78372b36f7d3a8bcba11d26
tree 03892507e16b050df35e6ceba3dd1c4dbdf88a74
parent 3a0b2454a2a7e6dde78372b36f7d3a8bcba11d26
geopost /
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Sat Mar 22 20:58:13 -0700 2008 | |
| |
README | ||
| |
Rakefile | Sat Mar 22 20:58:13 -0700 2008 | |
| |
init.rb | ||
| |
install.rb | Sat Mar 22 20:58:13 -0700 2008 | |
| |
lib/ | Sun Mar 23 13:35:53 -0700 2008 | |
| |
tasks/ | ||
| |
test/ | ||
| |
uninstall.rb | Sat Mar 22 20:58:13 -0700 2008 |
README
Geopost
=======
Geocode postcodes using Emad Fanous's localsearchmaps.com api.
Precisely geocodes full UK postocdes, falling back to a comprehensive
local list of primary postcode areas.
Results are cached in lib/geocoded. I'll merge cache files from forked
repos to speed up queries and reduce the burden on Emad's server.
Example
=======
Geo::Post.new("EC2A 3JL")
Geo::Post.new(90210, :us)
Where 'bar' object has postcode attribute and writable lat and lng
attributes:
Geo::Post.new(bar)
Actual driving distance and travel time between two postcodes:
Loading development environment (Rails 2.0.2)
>> Geo::Drive.new("sw19", "l37 ! 2hn")
"RECEIVED 25025 CHUNK"
"Got A BLANK chunk line"
=> #<Geo::Drive:0xb70cf99c @miles=233.0, @from="SW19", @minutes=10, @hours=4, @to="L37+2HN">
Passed postcodes filtered through Geo:Post for error correction.

