GeocodePlace: geocode-glib Reference Manual

## GeocodePlace GeocodePlace — Geocode place object |

## Functions

GeocodePlace * | geocode_place_new ()
GeocodePlace * | geocode_place_new_with_location ()
gboolean | geocode_place_equal ()
void | geocode_place_set_name ()
const char * | geocode_place_get_name ()
GeocodePlaceType | geocode_place_get_place_type ()
GeocodeBoundingBox * | geocode_place_get_bounding_box ()
void | geocode_place_set_bounding_box ()
void | geocode_place_set_location ()
GeocodeLocation * | geocode_place_get_location ()
void | geocode_place_set_street_address ()
const char * | geocode_place_get_street_address ()
void | geocode_place_set_street ()
const char * | geocode_place_get_street ()
void | geocode_place_set_building ()
const char * | geocode_place_get_building ()
void | geocode_place_set_postal_code ()
const char * | geocode_place_get_postal_code ()
void | geocode_place_set_area ()
const char * | geocode_place_get_area ()
void | geocode_place_set_town ()
const char * | geocode_place_get_town ()
void | geocode_place_set_county ()
const char * | geocode_place_get_county ()
void | geocode_place_set_state ()
const char * | geocode_place_get_state ()
void | geocode_place_set_administrative_area ()
const char * | geocode_place_get_administrative_area ()
void | geocode_place_set_country_code ()
const char * | geocode_place_get_country_code ()
void | geocode_place_set_country ()
const char * | geocode_place_get_country ()
void | geocode_place_set_continent ()
const char * | geocode_place_get_continent ()
GIcon * | geocode_place_get_icon ()
const char * | geocode_place_get_osm_id ()
GeocodePlaceOsmType | geocode_place_get_osm_type ()

## Properties

gchar * | administrative-area | Read / Write
gchar * | area | Read / Write
GeocodeBoundingBox * | bounding-box | Read / Write
gchar * | building | Read / Write
gchar * | continent | Read / Write
gchar * | country | Read / Write
gchar * | country-code | Read / Write
gchar * | county | Read / Write
GIcon * | icon | Read
GeocodeLocation * | location | Read / Write
gchar * | name | Read / Write
gchar * | osm-id | Read / Write
GeocodePlaceOsmType | osm-type | Read / Write
GeocodePlaceType | place-type | Read / Write / Construct Only
gchar * | postal-code | Read / Write
gchar * | state | Read / Write
gchar * | street | Read / Write
gchar * | street-address | Read / Write
gchar * | town | Read / Write

## Types and Values

struct | GeocodePlace
struct | GeocodePlaceClass
enum | GeocodePlaceType
enum | GeocodePlaceOsmType

## Object Hierarchy

        GObject
        ╰── GeocodePlace

## Includes

    #include <geocode-glib/geocode-glib.h>

## Description

The GeocodePlace instance represents a place on earth. While GeocodeLocation represents a point on the planet, GeocodePlace represents places, e.g street, town, village, county, country or points of interest (POI) etc.

## Functions

### geocode_place_new ()

    GeocodePlace *
    geocode_place_new (const char *name,
                       GeocodePlaceType place_type);

Creates a new GeocodePlace object.

#### Parameters

name | the name of place |
place_type | the type of place |

#### Returns

a new GeocodePlace object. Use `g_object_unref()` when done.

### geocode_place_new_with_location ()

    GeocodePlace *
    geocode_place_new_with_location (const char *name,
                                     GeocodePlaceType place_type,
                                     GeocodeLocation *location);

Creates a new GeocodePlace object.

#### Parameters

name | the name of place |
place_type | the type of place |
location | the location info for the place |

#### Returns

a new GeocodePlace object. Use `g_object_unref()` when done.

### geocode_place_equal ()

    gboolean
    geocode_place_equal (GeocodePlace *a,
                         GeocodePlace *b);

Compare two GeocodePlace instances for equality. This compares all fields and only returns `TRUE` if the instances are exactly equal. For example, if both places have the same “location”, but place `b` has its “continent” property set and place `a` does not, `FALSE` will be returned.

Both instances must be non-`NULL`.

#### Parameters

a | a place |
b | another place |

#### Returns

`TRUE` if the instances are equal, `FALSE` otherwise

Since: 3.23.1

### geocode_place_set_name ()

    void
    geocode_place_set_name (GeocodePlace *place,
                            const char *name);

Sets the name of the `place` to `name` .

#### Parameters

place | A place |
name | the name of place |

### geocode_place_get_name ()

    const char *
    geocode_place_get_name (GeocodePlace *place);

Gets the name of the `place` .

#### Parameters

place | A place |

#### Returns

The name of the `place` .

### geocode_place_get_place_type ()

    GeocodePlaceType
    geocode_place_get_place_type (GeocodePlace *place);

Gets the type of the `place` .

#### Parameters

place | A place |

#### Returns

The type of the `place` .

### geocode_place_get_bounding_box ()

    GeocodeBoundingBox *
    geocode_place_get_bounding_box (GeocodePlace *place);

Gets the bounding box for the place `place` .

#### Parameters

place | A place |

#### Returns

A GeocodeBoundingBox, or NULL if boundaries are unknown.

[transfer none]

### geocode_place_set_bounding_box ()

    void
    geocode_place_set_bounding_box (GeocodePlace *place,
                                    GeocodeBoundingBox *bbox);

Sets the GeocodeBoundingBox for the place `place` .

#### Parameters

place | A place |
bbox | A GeocodeBoundingBox for the place |

### geocode_place_set_location ()

    void
    geocode_place_set_location (GeocodePlace *place,
                                GeocodeLocation *location);

Sets the location of `place` to `location` .

#### Parameters

place | A place |
location | A location |

### geocode_place_get_location ()

    GeocodeLocation *
    geocode_place_get_location (GeocodePlace *place);

Gets the associated location object.

#### Parameters

place | A place |

#### Returns

The associated location object.

[transfer none]

### geocode_place_set_street_address ()

    void
    geocode_place_set_street_address (GeocodePlace *place,
                                      const char *street_address);

Sets the street address of `place` to `street_address` .

#### Parameters

place | A place |
street_address | a street address for the place |

### geocode_place_get_street_address ()

    const char *
    geocode_place_get_street_address (GeocodePlace *place);

Gets the street address of the `place` .

#### Parameters

place | A place |

#### Returns

The street address of the `place` .

### geocode_place_set_street ()

    void
    geocode_place_set_street (GeocodePlace *place,
                              const char *street);

Sets the street of `place` to `street` .

#### Parameters

place | A place |
street | a street |

### geocode_place_get_street ()

    const char *
    geocode_place_get_street (GeocodePlace *place);

Gets the street of the `place` .

#### Parameters

place | A place |

#### Returns

The street of the `place` .

### geocode_place_set_building ()

    void
    geocode_place_set_building (GeocodePlace *place,
                                const char *building);

Sets the building of `place` to `building` .

#### Parameters

place | A place |
building | a building |

### geocode_place_get_building ()

    const char *
    geocode_place_get_building (GeocodePlace *place);

Gets the building of the `place` .

#### Parameters

place | A place |

#### Returns

The building of the `place` .

### geocode_place_set_postal_code ()

    void
    geocode_place_set_postal_code (GeocodePlace *place,
                                   const char *postal_code);

Sets the postal code of `place` to `postal_code` .

#### Parameters

place | A place |
postal_code | a postal code for the place |

### geocode_place_get_postal_code ()

    const char *
    geocode_place_get_postal_code (GeocodePlace *place);

Gets the postal code of the `place` .

#### Parameters

place | A place |

#### Returns

The postal code of the `place` .

### geocode_place_set_area ()

    void
    geocode_place_set_area (GeocodePlace *place,
                            const char *area);

Sets the area of `place` to `area` .

#### Parameters

place | A place |
area | a area |

### geocode_place_get_area ()

    const char *
    geocode_place_get_area (GeocodePlace *place);

Gets the area of the `place` .

#### Parameters

place | A place |

#### Returns

The area of the `place` .

### geocode_place_set_town ()

    void
    geocode_place_set_town (GeocodePlace *place,
                            const char *town);

Sets the town of `place` to `town` .

#### Parameters

place | A place |
town | a town for the place |

### geocode_place_get_town ()

    const char *
    geocode_place_get_town (GeocodePlace *place);

Gets the town of the `place` .

#### Parameters

place | A place |

#### Returns

The town of the `place` .

### geocode_place_set_county ()

    void
    geocode_place_set_county (GeocodePlace *place,
                              const char *county);

Sets the county of `place` to `county` .

#### Parameters

place | A place |
county | a county for the place |

### geocode_place_get_county ()

    const char *
    geocode_place_get_county (GeocodePlace *place);

Gets the county of the `place` .

#### Parameters

place | A place |

#### Returns

The country of the `place` .

### geocode_place_set_state ()

    void
    geocode_place_set_state (GeocodePlace *place,
                             const char *state);

Sets the state of `place` to `state` .

#### Parameters

place | A place |
state | a state for the place |

### geocode_place_get_state ()

    const char *
    geocode_place_get_state (GeocodePlace *place);

Gets the state of the `place` .

#### Parameters

place | A place |

#### Returns

The state of the `place` .

### geocode_place_set_administrative_area ()

    void
    geocode_place_set_administrative_area (GeocodePlace *place,
                                           const char *admin_area);

Sets the local administrative area of `place` to `admin_area` .

#### Parameters

place | A place |
admin_area | an administrative area for the place |

### geocode_place_get_administrative_area ()

    const char *
    geocode_place_get_administrative_area (GeocodePlace *place);

Gets the local administrative area of the `place` .

#### Parameters

place | A place |

#### Returns

The local administrative area of the `place` .

### geocode_place_set_country_code ()

    void
    geocode_place_set_country_code (GeocodePlace *place,
                                    const char *country_code);

Sets the ISO country code of `place` to `country_code` .

#### Parameters

place | A place |
country_code | an ISO country code for the place |

### geocode_place_get_country_code ()

    const char *
    geocode_place_get_country_code (GeocodePlace *place);

Gets the ISO-3166 country code of the `place` .

#### Parameters

place | A place |

#### Returns

The ISO-3166 country code of the `place` , in upper case.

### geocode_place_set_country ()

    void
    geocode_place_set_country (GeocodePlace *place,
                               const char *country);

Sets the country of `place` to `country` .

#### Parameters

place | A place |
country | a country for the place |

### geocode_place_get_country ()

    const char *
    geocode_place_get_country (GeocodePlace *place);

Gets the country of the `place` .

#### Parameters

place | A place |

#### Returns

The country of the `place` .

### geocode_place_set_continent ()

    void
    geocode_place_set_continent (GeocodePlace *place,
                                 const char *continent);

Sets the continent of `place` to `continent` .

#### Parameters

place | A place |
continent | a continent for the place |

### geocode_place_get_continent ()

    const char *
    geocode_place_get_continent (GeocodePlace *place);

Gets the continent of the `place` .

#### Parameters

place | A place |

#### Returns

The continent of the `place` .

### geocode_place_get_icon ()

    GIcon *
    geocode_place_get_icon (GeocodePlace *place);

Gets the GIcon representing the `place` .

#### Parameters

place | A place |

#### Returns

The GIcon representing the `place` .

[transfer none]

### geocode_place_get_osm_id ()

    const char *
    geocode_place_get_osm_id (GeocodePlace *place);

Gets the OpenStreetMap ID of the `place` .

#### Parameters

place | A place |

#### Returns

The osm ID of the `place` .

### geocode_place_get_osm_type ()

    GeocodePlaceOsmType
    geocode_place_get_osm_type (GeocodePlace *place);

Gets the OpenStreetMap type of the `place` .

#### Parameters

place | A place |

#### Returns

The osm type of the `place` .

## Types and Values

### struct GeocodePlace

    struct GeocodePlace;

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

### struct GeocodePlaceClass

    struct GeocodePlaceClass {
    };

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

### enum GeocodePlaceType

Type of the place.

#### Members

GEOCODE_PLACE_TYPE_UNKNOWN | Type is unknown for this place. |
GEOCODE_PLACE_TYPE_BUILDING | A building or house. |
GEOCODE_PLACE_TYPE_STREET | A street. |
GEOCODE_PLACE_TYPE_TOWN | A populated settlement such as a city, town, village. |
GEOCODE_PLACE_TYPE_STATE | One of the primary administrative areas within a country. |
GEOCODE_PLACE_TYPE_COUNTY | One of the secondary administrative areas within a country. |
GEOCODE_PLACE_TYPE_LOCAL_ADMINISTRATIVE_AREA | One of the tertiary administrative areas within a country. |
GEOCODE_PLACE_TYPE_POSTAL_CODE | A partial or full postal code. |
GEOCODE_PLACE_TYPE_COUNTRY | One of the countries or dependent territories defined by the ISO 3166-1 standard. |
GEOCODE_PLACE_TYPE_ISLAND | An island. |
GEOCODE_PLACE_TYPE_AIRPORT | An airport. |
GEOCODE_PLACE_TYPE_RAILWAY_STATION | A railway station. |
GEOCODE_PLACE_TYPE_BUS_STOP | A bus stop. |
GEOCODE_PLACE_TYPE_MOTORWAY | A high capacity highways designed to safely carry fast motor traffic. |
GEOCODE_PLACE_TYPE_DRAINAGE | A water feature such as a river, canal, lake, bay or ocean. |
GEOCODE_PLACE_TYPE_LAND_FEATURE | A land feature such as a park, mountain or beach. |
GEOCODE_PLACE_TYPE_MISCELLANEOUS | A uncategorized place. |
GEOCODE_PLACE_TYPE_SUPERNAME | An area covering multiple countries. |
GEOCODE_PLACE_TYPE_POINT_OF_INTEREST | A point of interest such as a school, hospital or tourist attraction. |
GEOCODE_PLACE_TYPE_SUBURB | A subdivision of a town such as a suburb or neighborhood. |
GEOCODE_PLACE_TYPE_COLLOQUIAL | A place known by a colloquial name. |
GEOCODE_PLACE_TYPE_ZONE | An area known within a specific context such as MSA or area code. |
GEOCODE_PLACE_TYPE_HISTORICAL_STATE | A historical primary administrative area within a country. |
GEOCODE_PLACE_TYPE_HISTORICAL_COUNTY | A historical secondary administrative area within a country. |
GEOCODE_PLACE_TYPE_CONTINENT | One of the major land masses on the Earth. |
GEOCODE_PLACE_TYPE_TIME_ZONE | An area defined by the Olson standard (tz database). |
GEOCODE_PLACE_TYPE_ESTATE | A housing development or subdivision known by name. |
GEOCODE_PLACE_TYPE_HISTORICAL_TOWN | A historical populated settlement that is no longer known by its original name. |
GEOCODE_PLACE_TYPE_OCEAN | One of the five major bodies of water on the Earth. |
GEOCODE_PLACE_TYPE_SEA | An area of open water smaller than an ocean. |
GEOCODE_PLACE_TYPE_SCHOOL | Institution designed for learning under the supervision of teachers. |
GEOCODE_PLACE_TYPE_PLACE_OF_WORSHIP | All places of worship independently of the religion or denomination. |
GEOCODE_PLACE_TYPE_RESTAURANT | Generally formal place with sit-down facilities selling full meals served by waiters. |
GEOCODE_PLACE_TYPE_BAR | A bar or pub. |
GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION | A light rail station or tram stop. |

### enum GeocodePlaceOsmType

Osm type of the place.

#### Members

GEOCODE_PLACE_OSM_TYPE_UNKNOWN | Unknown type |
GEOCODE_PLACE_OSM_TYPE_NODE | Defines a point in space. |
GEOCODE_PLACE_OSM_TYPE_RELATION | Used to explain how other elements work together. |
GEOCODE_PLACE_OSM_TYPE_WAY | Defines a linear feature and area boundaries. |

## Property Details

### The `“administrative-area”` property

      “administrative-area”      gchar *

The local administrative area.

Flags: Read / Write

Default value: NULL

### The `“area”` property

      “area”                     gchar *

A named area such as a campus or neighborhood.

Flags: Read / Write

Default value: NULL

### The `“bounding-box”` property

      “bounding-box”             GeocodeBoundingBox *

The bounding box for the place.

Flags: Read / Write

### The `“building”` property

      “building”                 gchar *

A specific building on a street or in an area.

Flags: Read / Write

Default value: NULL

### The `“continent”` property

      “continent”                gchar *

The continent.

Flags: Read / Write

Default value: NULL

### The `“country”` property

      “country”                  gchar *

The country.

Flags: Read / Write

Default value: NULL

### The `“country-code”` property

      “country-code”             gchar *

The country code.

Flags: Read / Write

Default value: NULL

### The `“county”` property

      “county”                   gchar *

The county.

Flags: Read / Write

Default value: NULL

### The `“icon”` property

      “icon”                     GIcon *

GIcon representing the `GeocodePlace` .

Flags: Read

### The `“location”` property

      “location”                 GeocodeLocation *

The location info for the place.

Flags: Read / Write

### The `“name”` property

      “name”                     gchar *

The name of the place.

Flags: Read / Write

Default value: NULL

### The `“osm-id”` property

      “osm-id”                   gchar *

The OpenStreetMap id of the place.

Flags: Read / Write

Default value: NULL

### The `“osm-type”` property

      “osm-type”                 GeocodePlaceOsmType

The OpenStreetMap type of the place.

Flags: Read / Write

Default value: GEOCODE_PLACE_OSM_TYPE_UNKNOWN

### The `“place-type”` property

      “place-type”               GeocodePlaceType

The type of the place.

Flags: Read / Write / Construct Only

Default value: GEOCODE_PLACE_TYPE_UNKNOWN

### The `“postal-code”` property

      “postal-code”              gchar *

The postal code.

Flags: Read / Write

Default value: NULL

### The `“state”` property

      “state”                    gchar *

The state.

Flags: Read / Write

Default value: NULL

### The `“street”` property

      “street”                   gchar *

The street name.

Flags: Read / Write

Default value: NULL

### The `“street-address”` property

      “street-address”           gchar *

The street address.

Flags: Read / Write

Default value: NULL

### The `“town”` property

      “town”                     gchar *

The town.

Flags: Read / Write

Default value: NULL