| English | 中文 |
This is an acquisition/quality path, not an enabled geocoding API. First distinguish forward address lookup, reverse lookup and administrative point-in-polygon matching. A result from one does not validate the others.
Prefer an authorized local gazetteer or institutional service when it fits the task. Online geocoding sends address/location information to a third party. The user’s explicit authorized online task can define that scope; do not ask again for the same permitted action. Residential, patient, employee or confidential locations must not be submitted without an appropriate permitted route. Keep private queries, returned exact coordinates and caches outside Git.
Public Nominatim is not a default generic agent geocoder. Its current policy requires a deliberate informed developer choice, limits traffic (at most one request per second for the public server, with additional bulk restrictions), requires identification/attribution and caching, forbids personal/confidential submissions, autocomplete and systematic extraction. A generic skill must not silently build it into an address service. Self-hosted/other providers have their own applicable terms; a client library does not override them.
geopy and tidygeocoder expose forward/reverse client methods for multiple providers. Select a provider, endpoint, region/language, rate, retry budget and permitted cache terms before writing its task adapter. Neither library is a universal free backend. No live service is verified by this skill.
| Operation | R route | Python route |
|---|---|---|
| Local gazetteer | Explicit keyed join and candidate counts in a prepared table | pandas merge with preserved keys and candidate counts |
| Forward lookup | Provider-specific tidygeocoder::geocode / geo |
Selected geopy provider’s geocode method |
| Reverse lookup | Provider-specific reverse_geocode / reverse_geo |
Selected provider’s reverse method |
| Administrative assignment | R containment helper, with known CRS and reviewed boundaries | Python containment helper under the same contract |
| Provider-coordinate conversion | Separately reviewed provider interface | Separately reviewed provider interface |
There is no default provider, hidden API key loader or generic network executable. Any online adapter remains task-specific until tested and registered. AMap’s coordinate interface is an example of a separate provider contract, not an ordinary EPSG transform or an implemented service here.
Use a private task table with source ID, query classification, source/provider version, candidate count, returned precision, coordinate convention, resolution/review status and cache policy. Keep API keys and session state separate. Public summaries may report aggregate match rates and validation methods, with personal query text and sensitive coordinates removed.