geocoding
Intro, Options, and Workflows
What is Geocoding?
Turns a description of a location into
geographic coordinates from spatial reference data.
Descriptor Examples
Input used to generate a lat/lng
- Zip Code
- Address
- Place Name
- Census Block
Spatial Reference Data Examples
Used to find and assign geographic coordinates
- Buildings
- Parcels
- Address Points
- Street Centerlines
- Zip Code Boundaries
- GNIS Place Names (USGS)
reverse geocoding
Coding of a point location (lat/lng) to a readable address or place name.
Cascading Geocoder
Uses multiple geocoders and 'cascades' through them to find the best result.
Oregon's Geocoder
- Statewide Address Points
- Navteq Address Points
- ORTRANS - Street Centerlines
- GNIS Place Names
- Zip Code Tabulation Areas (Census)
- PLSS
- Oregon City Limits
Oregon's Geocoder Details
Other Available Geocoders
Caveats of Using External Geocoders
- Usually limit to number of free geocodes
- License agreement can exclude storage of addresses
- Spatial reference dataset source abstracted out
- May not support batch geocoding
Recommendation
Let your project determine your geocoding solutions:
- Consider integrating multiple geocoding API's
- Take into consideration scalability
- Always take into account level of accuracy
- Make your results transparent
Using Oregon's Geocoder
- Input Address Fields
- Outuput Candidate Fields
- Properties
- API Reference / Help
Using Oregon's Geocoder
- REST HTTP Protocol
- HTML, JSON, KMZ Response
Example : Python
address = raw_input("Enter an address: ")
url = "http://navigator.state.or.us/arcgis/rest/services/Locators/" \
"gc_Composite/GeocodeServer/findAddressCandidates?"
params = {'SingleLine' : address, \
'outFields' : '*', 'f' : 'pjson'}
params_encode = urllib.urlencode(params)
url += params_encode
res = urllib.urlopen(url)
res_json = res.read()
res_dict = json.loads(res_json)
geocoding
Intro, Options, and Workflows