Interior Travis CI Status

Township GeoCoder Web Service

Interior uses the GeoCommunicator GeoCoder Web Service provided by the US Department of the Interior. For detailed documentation on the web service API, consult the Methods, Parameters, and Results PDF.

Usage: Get Latitude / Longitude

Given township 1N, range 1E, section 35, and meridian 14 (Gila-Salt Meridian in the US Meridian table), we can get the center point latitude and longitude in the state of Arizona with:

require 'interior'
response = Interior::Geocoder.get_lat_lon('AZ', 14, 1, 'N', 1, 'E', 35)
response.success?   => true
response.latitude   => 33.384549272498
response.longitude  => -112.228362739723

Usage Map 1

Section is option. If omitted, the centerpoint latitude and longitude will be for the township and range:

require 'interior'
response = Interior::Geocoder.get_lat_lon('AZ', 14, 1, 'N', 1, 'E') # no section
response.success?   => true
response.latitude   => 33.4211630233451
response.longitude  => -112.254699834217

Usage Map 2

Usage: Get Meridians

For a collection of all meridians in Arizona:

require 'interior'
meridians = Interior::Geocoder.get_meridians('AZ')
meridians.inspect
  => [ { :name => 'Gila-Salt River', :id => 14 },
       { :name => 'Navajo',          :id => 22 },
       { :name => 'San Bernardino',  :id => 27 } ]

US Meridian Map

The US is divided into several meridians. A larger map and table are available for reference.

USA Meridians

US Meridian Table

Each meridian has a corresponding numeric key mapping:

State Meridian Code State Meridian Code
AL Huntsville 16 AL St. Stephens 25
AL Tallahasee 29 AR 5th 05
AZ Gila-Salt River 14 AZ Navajo 22
AZ San Bernardino 27 CA Gila-Salt River 14
CA Humboldt 15 CA Mount Diablo 21
CA San Bernardino 27 CO 6th 06
CO New Mex 23 CO Ute 31
FL Tallahasee 29 IA 5th 05
ID Boise 08 IL 2nd 02
IL 3rd 03 IL 4th Illinois 04
IN 1st 01 IN 2nd 02
KS 6th 06 LA Louisiana 18
LA St. Helena 24 MI Michigan 19
MN 5th 05 MN 4th 46
MO 5th 05 MS Chickasaw 09
MS Choctaw 10 MS Huntsville 16
MS St. Stephens 25 MS Washington 32
MT Prin 20 ND 5th 05
NE 6th 06 NM New Mex 23
NV Mount Diablo 21 NV San Bernardino 27
OH 1st 01 OH Michigan 19
OH Ohio River Survey 35 OH Between the Miamis 36
OH Muskingum River Basin 37 OH Ohio River Basin 38
OH 1st Scioto River Base 39 OH 2nd Scioto River Base 40
OH 3rd Scioto River Base 41 OH Twelve Mile Square 43
OH West of Great Miami 47 OH US Military Survey 48
OH Ct West Res 91 OH Ohio CO Pur 92
OH Va Military Survey 93 OK Cimarron 11
OK Indian 17 OR Willamette 33
SD 5th 05 SD 6th 06
SD Black Hills 07 UT Salt Lake 26
UT Uintah Spec 30 WA Willamette 33
WI 4th 46 WY 6th 06
WY Wind River 34