-
Notifications
You must be signed in to change notification settings - Fork 30
Connecting to GeoNames
The GeoNames geographical database covers all countries and contains over eleven million placenames that are available for download free of charge.
You need to signup for a GeoNames user name on the GeoNames login page. You will need to update your account to allow for public API calls. Test your ability to connect to GeoNames with...
http://api.geonames.org/searchJSON?q=port&&maxRows=10&username=YOUR_ACCOUNT_NAME
You should see about 10 results for this URL.
Put the following statement in an initializer and restart the rails server.
Qa::Authorities::Geonames.username = 'YOUR_ACCOUNT_NAME'
Authority: | geonames |
---|
Subauthorities:
None supported
NOTE: The linked data module for QA also provides access to this authority. It returns additional data including the URI for terms. See Using-the-Linked-Data-module-to-access-authorities for more information.
/qa/search/geonames?q=port
Result:
[
{"id":"http://sws.geonames.org/2088122/","label":"Port Moresby, National Capital, Papua New Guinea"},
{"id":"http://sws.geonames.org/934154/","label":"Port Louis, Port Louis, Mauritius"},
etc.
]
NOTE: The qa request is converted to the following GeoNames request. This is for information only. You do not need to know this to use QA.
http://api.geonames.org/searchJSON?q=port&username=YOUR_ACCOUNT_NAME&maxRows=10
/qa/show/geonames/2088122
Result:
{"timezone":{
"gmtOffset":10,
"timeZoneId":"Pacific/Port_Moresby",
"dstOffset":10},
"bbox":{
"east":147.2209134174236,
"south":-9.546311526867365,
"north":-9.408148473132636,
"west":147.08086658257642,
"accuracyLevel":0},
etc.
}
NOTE: The qa request is converted to the following GeoNames request. This is for information only. You do not need to know this to use QA.
http://www.geonames.org/getJSON?geonameId=2088122&username=YOUR_ACCOUNT_NAME
Not supported
GeoNames documents their API at... https://www.geonames.org/export/web-services.html
Using Questioning Authority
- Connecting to Discogs
- Connecting to GeoNames
- Connecting to Getty
- Connecting to Library of Congress (LOC)
- Connecting to Medical Subject Headings (MeSH)
- Connecting to OCLC FAST
Custom Controlled Vocabularies
Linked Data Access to Authorities
- Connecting to Linked Data authorities
- Using the Linked Data module to access authorities
- Configuring access to a Linked Data authority
- Language processing in Linked Data authorities
Contributing to Questioning Authority
- Contributing a new external authority
- Template for authority documentation
- Understanding Existing Authorities