Class: Interior::Geocoder
- Inherits:
-
Object
- Object
- Interior::Geocoder
- Defined in:
- lib/interior/geocoder.rb
Constant Summary collapse
- API_DOMAIN =
'www.geocommunicator.gov'
- API_PATH =
'TownshipGeocoder/TownshipGeocoder.asmx/GetLatLon'
- API_PARAM =
'TRS'
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.
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
19 20 21 22 23 24 |
# File 'lib/interior/geocoder.rb', line 19 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]) : nil end |