GeocodeGlib.Nominatim

g GObject.GInterface GObject.GInterface GeocodeGlib.Backend GeocodeGlib.Backend GObject.GInterface->GeocodeGlib.Backend GObject.Object GObject.Object GeocodeGlib.Nominatim GeocodeGlib.Nominatim GObject.Object->GeocodeGlib.Nominatim GeocodeGlib.Backend->GeocodeGlib.Nominatim

Subclasses:

None

Methods

Inherited:

GObject.Object (37), GeocodeGlib.Backend (6)

Structs:

GObject.ObjectClass (5)

class

get_gnome ()

class

new (base_url, maintainer_email_address)

Virtual Methods

Inherited:

GObject.Object (7), GeocodeGlib.Backend (6)

do_query (uri, cancellable)

do_query_async (uri, cancellable, callback, *user_data)

do_query_finish (res)

Properties

Name

Type

Flags

Short Description

base-url

str

r/w/co

Base URL of the Nominatim service

maintainer-email-address

str

r/w/co

E-mail address of the maintainer

user-agent

str

r/w

User-Agent string to send with HTTP(S) requests

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class GeocodeGlib.Nominatim(**kwargs)
Bases:

GObject.Object, GeocodeGlib.Backend

Abstract:

No

Structure:

GeocodeGlib.NominatimClass

All the fields in the GeocodeGlib.Nominatim structure are private and should never be accessed directly.

New in version 3.23.1.

classmethod get_gnome()
Returns:

a new GeocodeGlib.Nominatim. Use GObject.Object.unref() when done.

Return type:

GeocodeGlib.Nominatim

Gets a reference to the default Nominatim server on nominatim.gnome.org.

This function is thread-safe.

New in version 3.23.1.

classmethod new(base_url, maintainer_email_address)
Parameters:
  • base_url (str) – a the base URL of the Nominatim server.

  • maintainer_email_address (str) – the email address of the software maintainer.

Returns:

a new GeocodeGlib.Nominatim. Use GObject.Object.unref() when done.

Return type:

GeocodeGlib.Nominatim

Creates a new backend implementation for an online Nominatim server. See the documentation for GeocodeGlib.Nominatim :base-url and GeocodeGlib.Nominatim :maintainer-email-address.

New in version 3.23.1.

do_query(uri, cancellable) virtual
Parameters:
Return type:

str

do_query_async(uri, cancellable, callback, *user_data) virtual
Parameters:
do_query_finish(res) virtual
Parameters:

res (Gio.AsyncResult) –

Return type:

str

Property Details

GeocodeGlib.Nominatim.props.base_url
Name:

base-url

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The base URL of the Nominatim service, for example https://nominatim.example.org.

New in version 3.23.1.

GeocodeGlib.Nominatim.props.maintainer_email_address
Name:

maintainer-email-address

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

E-mail address of the maintainer of the software making the geocoding requests to the Nominatim server. This is used to contact them in the event of a problem with their usage. See the Nominatim API.

New in version 3.23.1.

GeocodeGlib.Nominatim.props.user_agent
Name:

user-agent

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

User-Agent string to send with HTTP(S) requests, or None to use the default user agent, which is derived from the geocode-glib version and Gio.Application :id, for example: geocode-glib/3.20 (MyAppId).

As per the Nominatim usage policy, it should be set to a string which identifies the application which is using geocode-glib, and must be a valid user agent string.

New in version 3.23.1.