Class: Interior::Geocoder
- Inherits:
-
Object
- Object
- Interior::Geocoder
- Includes:
- Meridians
- Defined in:
- lib/interior/geocoder.rb
Constant Summary collapse
- API_DOMAIN =
'www.geocommunicator.gov'
- API_PATH =
'TownshipGeocoder/TownshipGeocoder.asmx/GetLatLon'
- API_PARAM =
'TRS'
Constants included from Meridians
Class Method Summary collapse
-
.get_lat_lon(st, me, to, to_dir, ra, ra_dir, se = nil) ⇒ Object
st : state me : meridian to : township to_dir : township direction ra : range ra_dir : range_direction se : section.
-
.get_meridians(st) ⇒ Object
st : state.
Class Method Details
.get_lat_lon(st, me, to, to_dir, ra, ra_dir, se = nil) ⇒ Object
st : state me : meridian to : township to_dir : township direction ra : range ra_dir : range_direction se : section
22 23 24 25 26 27 |
# File 'lib/interior/geocoder.rb', line 22 def self.get_lat_lon(st, me, to, to_dir, ra, ra_dir, se = nil) trs = build_trs_param(st, me, to, to_dir, ra, ra_dir, se) xml = get_response_body(trs) result = parse_xml(xml) result ? Interior::Response.new(result[:lat], result[:lon], true) : Interior::Response.new end |
.get_meridians(st) ⇒ Object
st : state
30 31 32 33 |
# File 'lib/interior/geocoder.rb', line 30 def self.get_meridians(st) merds = MERIDIANS[st] merds ? merds : [] end |