geocode-glib Reference Manual: GeocodePlace

## GeocodePlace GeocodePlace — Geocode place object |

## Synopsis

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

    struct              GeocodePlace;
    struct              GeocodePlaceClass;
    enum                GeocodePlaceType;
    GeocodePlace *      geocode_place_new                   (const char *name,
                                                             GeocodePlaceType place_type);
    GeocodePlace *      geocode_place_new_with_location     (const char *name,
                                                             GeocodePlaceType place_type,
                                                             GeocodeLocation *location);
    void                geocode_place_set_name              (GeocodePlace *place,
                                                             const char *name);
    const char *        geocode_place_get_name              (GeocodePlace *place);
    GeocodePlaceType    geocode_place_get_place_type        (GeocodePlace *place);
    void                geocode_place_set_location          (GeocodePlace *place,
                                                             GeocodeLocation *location);
    GeocodeLocation *   geocode_place_get_location          (GeocodePlace *place);
    void                geocode_place_set_street_address    (GeocodePlace *place,
                                                             const char *street_address);
    const char *        geocode_place_get_street_address    (GeocodePlace *place);
    void                geocode_place_set_street            (GeocodePlace *place,
                                                             const char *street);
    const char *        geocode_place_get_street            (GeocodePlace *place);
    void                geocode_place_set_building          (GeocodePlace *place,
                                                             const char *building);
    const char *        geocode_place_get_building          (GeocodePlace *place);
    void                geocode_place_set_postal_code       (GeocodePlace *place,
                                                             const char *postal_code);
    const char *        geocode_place_get_postal_code       (GeocodePlace *place);
    void                geocode_place_set_area              (GeocodePlace *place,
                                                             const char *area);
    const char *        geocode_place_get_area              (GeocodePlace *place);
    void                geocode_place_set_town              (GeocodePlace *place,
                                                             const char *town);
    const char *        geocode_place_get_town              (GeocodePlace *place);
    void                geocode_place_set_county            (GeocodePlace *place,
                                                             const char *county);
    const char *        geocode_place_get_county            (GeocodePlace *place);
    void                geocode_place_set_state             (GeocodePlace *place,
                                                             const char *state);
    const char *        geocode_place_get_state             (GeocodePlace *place);
    void                geocode_place_set_administrative_area
                                                            (GeocodePlace *place,
                                                             const char *admin_area);
    const char *        geocode_place_get_administrative_area
                                                            (GeocodePlace *place);
    void                geocode_place_set_country_code      (GeocodePlace *place,
                                                             const char *country_code);
    const char *        geocode_place_get_country_code      (GeocodePlace *place);
    void                geocode_place_set_country           (GeocodePlace *place,
                                                             const char *country);
    const char *        geocode_place_get_country           (GeocodePlace *place);
    void                geocode_place_set_continent         (GeocodePlace *place,
                                                             const char *continent);
    const char *        geocode_place_get_continent         (GeocodePlace *place);
    GIcon *             geocode_place_get_icon              (GeocodePlace *place);

## Object Hierarchy

      GObject
       +----GeocodePlace

      GEnum
       +----GeocodePlaceType

## Properties

      "administrative-area"      gchar*                : Read / Write
      "area"                     gchar*                : Read / Write
      "building"                 gchar*                : Read / Write
      "continent"                gchar*                : Read / Write
      "country"                  gchar*                : Read / Write
      "country-code"             gchar*                : Read / Write
      "county"                   gchar*                : Read / Write
      "icon"                     GIcon*                : Read / Write
      "location"                 GeocodeLocation*      : Read / Write
      "name"                     gchar*                : Read / Write
      "place-type"               GeocodePlaceType      : Read / Write / Construct Only
      "postal-code"              gchar*                : Read / Write
      "state"                    gchar*                : Read / Write
      "street"                   gchar*                : Read / Write
      "street-address"           gchar*                : Read / Write
      "town"                     gchar*                : Read / Write

## 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.

## Details

### 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

    typedef enum {
            GEOCODE_PLACE_TYPE_UNKNOWN = 0,
            GEOCODE_PLACE_TYPE_BUILDING,
            GEOCODE_PLACE_TYPE_STREET,
            GEOCODE_PLACE_TYPE_TOWN,
            GEOCODE_PLACE_TYPE_STATE,
            GEOCODE_PLACE_TYPE_COUNTY,
            GEOCODE_PLACE_TYPE_LOCAL_ADMINISTRATIVE_AREA,
            GEOCODE_PLACE_TYPE_POSTAL_CODE,
            GEOCODE_PLACE_TYPE_COUNTRY,
            GEOCODE_PLACE_TYPE_ISLAND,
            GEOCODE_PLACE_TYPE_AIRPORT,
            GEOCODE_PLACE_TYPE_RAILWAY_STATION,
            GEOCODE_PLACE_TYPE_BUS_STOP,
            GEOCODE_PLACE_TYPE_MOTORWAY,
            GEOCODE_PLACE_TYPE_DRAINAGE,
            GEOCODE_PLACE_TYPE_LAND_FEATURE,
            GEOCODE_PLACE_TYPE_MISCELLANEOUS,
            GEOCODE_PLACE_TYPE_SUPERNAME,
            GEOCODE_PLACE_TYPE_POINT_OF_INTEREST,
            GEOCODE_PLACE_TYPE_SUBURB,
            GEOCODE_PLACE_TYPE_COLLOQUIAL,
            GEOCODE_PLACE_TYPE_ZONE,
            GEOCODE_PLACE_TYPE_HISTORICAL_STATE,
            GEOCODE_PLACE_TYPE_HISTORICAL_COUNTY,
            GEOCODE_PLACE_TYPE_CONTINENT,
            GEOCODE_PLACE_TYPE_TIME_ZONE,
            GEOCODE_PLACE_TYPE_ESTATE,
            GEOCODE_PLACE_TYPE_HISTORICAL_TOWN,
            GEOCODE_PLACE_TYPE_OCEAN,
            GEOCODE_PLACE_TYPE_SEA
    } GeocodePlaceType;

Type of the place.

`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_new ()

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

Creates a new GeocodePlace object.

`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.

`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_set_name ()

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

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

`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`.

`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`.

`place` : | A place
Returns : | The type of the `place`.

### geocode_place_set_location ()

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

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

`place` : | A place
`location` : | A location

### geocode_place_get_location ()

    GeocodeLocation *   geocode_place_get_location          (GeocodePlace *place);

Gets the associated location object.

`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`.

`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`.

`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`.

`place` : | A place
`street` : | a street

### geocode_place_get_street ()

    const char *        geocode_place_get_street            (GeocodePlace *place);

Gets the street of the `place`.

`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`.

`place` : | A place
`building` : | a building

### geocode_place_get_building ()

    const char *        geocode_place_get_building          (GeocodePlace *place);

Gets the building of the `place`.

`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`.

`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`.

`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`.

`place` : | A place
`area` : | a area

### geocode_place_get_area ()

    const char *        geocode_place_get_area              (GeocodePlace *place);

Gets the area of the `place`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`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`.

`place` : | A place
Returns : | The GIcon representing the `place`. [transfer none]

## Property Details

### The `"administrative-area"` property

      "administrative-area"      gchar*                : Read / Write

The local administrative area.

Default value: NULL

### The `"area"` property

      "area"                     gchar*                : Read / Write

A named area such as a campus or neighborhood.

Default value: NULL

### The `"building"` property

      "building"                 gchar*                : Read / Write

A specific building on a street or in an area.

Default value: NULL

### The `"continent"` property

      "continent"                gchar*                : Read / Write

The continent.

Default value: NULL

### The `"country"` property

      "country"                  gchar*                : Read / Write

The country.

Default value: NULL

### The `"country-code"` property

      "country-code"             gchar*                : Read / Write

The country code.

Default value: NULL

### The `"county"` property

      "county"                   gchar*                : Read / Write

The county.

Default value: NULL

### The `"icon"` property

      "icon"                     GIcon*                : Read / Write

GIcon representing the `GeocodePlace`.

### The `"location"` property

      "location"                 GeocodeLocation*      : Read / Write

The location info for the place.

### The `"name"` property

      "name"                     gchar*                : Read / Write

The name of the place.

Default value: NULL

### The `"place-type"` property

      "place-type"               GeocodePlaceType      : Read / Write / Construct Only

The type of the place.

Default value: GEOCODE_PLACE_TYPE_UNKNOWN

### The `"postal-code"` property

      "postal-code"              gchar*                : Read / Write

The postal code.

Default value: NULL

### The `"state"` property

      "state"                    gchar*                : Read / Write

The state.

Default value: NULL

### The `"street"` property

      "street"                   gchar*                : Read / Write

The street name.

Default value: NULL

### The `"street-address"` property

      "street-address"           gchar*                : Read / Write

The street address.

Default value: NULL

### The `"town"` property

      "town"                     gchar*                : Read / Write

The town.

Default value: NULL