Struct nominatim_rs::client::Client [−][src]
pub struct Client {
pub user_agent: String,
pub email: Option<String>,
pub base_url: Url,
pub client: Client,
}
Expand description
A nominatim client that is binded to the nominatim web api.
Fields
user_agent: String
The user agent of your service. This is required by the Nominatim terms of service.
Note that changing it does nothing unless respecified in the client.
email: Option<String>
Strongly Recommended, your email so Nominatim can contact you in case they dislike your usecase.
base_url: Url
The base URL
client: Client
Implementations
Creates a new client base
User Agent
The user agent of your service. This is required by the Nominatim terms of service.
Strongly Recommended, your email so Nominatim can contact you in case they dislike your usecase.
Reverse geocoding generates an address from a latitude and longitude.
How it works
The reverse geocoding API does not exactly compute the address for the coordinate it receives. It works by finding the closest suitable OSM object and returning its address information. This may occasionally lead to unexpected results.
First of all, Nominatim only includes OSM objects in its index that are suitable for searching. Small, unnamed paths for example are missing from the database and can therefore not be used for reverse geocoding either.
The other issue to be aware of is that the closest OSM object may not always have a similar enough address to the coordinate you were requesting. For example, in dense city areas it may belong to a completely different street.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more