Protocol definitions for the geo module.
FC/IS rule: protocols are interfaces — no implementation here. Adapters (shell layer) implement these protocols.
Protocol definitions for the geo module. FC/IS rule: protocols are interfaces — no implementation here. Adapters (shell layer) implement these protocols.
Contract for geo result caching.
The default implementation (DbGeoCache) persists results in a
geo_cache database table. An atom-backed implementation is used
in tests.
Contract for geo result caching. The default implementation (DbGeoCache) persists results in a `geo_cache` database table. An atom-backed implementation is used in tests.
(cache-lookup this query-hash)Look up a cached geocoding result by its query hash.
Args: query-hash - SHA-256 hex string (produced by address/query-hash)
Returns: GeoResult map with :cached? true if found and not expired, else nil.
Look up a cached geocoding result by its query hash. Args: query-hash - SHA-256 hex string (produced by address/query-hash) Returns: GeoResult map with :cached? true if found and not expired, else nil.
(cache-store! this query-hash result)Persist a geocoding result in the cache.
Args: query-hash - SHA-256 hex string result - GeoResult map to store
Returns: nil (side-effect only).
Persist a geocoding result in the cache. Args: query-hash - SHA-256 hex string result - GeoResult map to store Returns: nil (side-effect only).
Contract for geocoding provider adapters.
Implementations live in shell/adapters/:
Contract for geocoding provider adapters. Implementations live in shell/adapters/: - NominatimAdapter (OpenStreetMap, free, rate-limited to 1 req/sec) - GoogleAdapter (Google Maps Geocoding API, requires API key) - MapboxAdapter (Mapbox Geocoding API, requires access token) - PdokAdapter (PDOK Locatieserver, Dutch addresses, no key)
(geocode this query)Forward geocode an address query to coordinates.
Args: query - AddressQuery map with optional :address :postcode :house-number :house-number-addition :city :country
Returns: GeoResult map on success, nil on no results or error.
Forward geocode an address query to coordinates.
Args:
query - AddressQuery map with optional :address :postcode :house-number
:house-number-addition :city :country
Returns:
GeoResult map on success, nil on no results or error.(reverse-geocode this point)Reverse geocode coordinates to an address.
Args: point - GeoPoint map with :lat and :lng
Returns: GeoResult map on success, nil on no results or error.
Reverse geocode coordinates to an address. Args: point - GeoPoint map with :lat and :lng Returns: GeoResult map on success, nil on no results or error.
The :wagoe/geo-service component, for an app that calls it through a port rather than requiring wagoe.geo.shell.service.
opts: :only - provider keywords this call may use, e.g. #{:pdok}; the configured order is kept. Absent: every configured provider.
The :wagoe/geo-service component, for an app that calls it through a port
rather than requiring wagoe.geo.shell.service.
opts:
:only - provider keywords this call may use, e.g. #{:pdok}; the configured
order is kept. Absent: every configured provider.(lookup this query opts)Forward geocode an AddressQuery, cache first. GeoResult or nil.
Forward geocode an AddressQuery, cache first. GeoResult or nil.
(reverse-lookup this point opts)Reverse geocode a GeoPoint. GeoResult or nil.
Reverse geocode a GeoPoint. GeoResult or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |