GeocodePlace

GeocodePlace — Geocode place object

Synopsis

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

struct              GeocodePlace;
struct              GeocodePlaceClass;
enum                GeocodePlaceType;
enum                GeocodePlaceOsmType;
GeocodePlace *      geocode_place_new                   (const char *name,
                                                         GeocodePlaceType place_type);
GeocodePlace *      geocode_place_new_with_location     (const char *name,
                                                         GeocodePlaceType place_type,
                                                         GeocodeLocation *location);
gboolean            geocode_place_equal                 (GeocodePlace *a,
                                                         GeocodePlace *b);
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);
GeocodeBoundingBox * geocode_place_get_bounding_box     (GeocodePlace *place);
void                geocode_place_set_bounding_box      (GeocodePlace *place,
                                                         GeocodeBoundingBox *bbox);
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);
const char *        geocode_place_get_osm_id            (GeocodePlace *place);
GeocodePlaceOsmType geocode_place_get_osm_type          (GeocodePlace *place);

Object Hierarchy

  GObject
   +----GeocodePlace

Properties

  "administrative-area"      gchar*                : Read / Write
  "area"                     gchar*                : Read / Write
  "bounding-box"             GeocodeBoundingBox*   : 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
  "location"                 GeocodeLocation*      : Read / Write
  "name"                     gchar*                : Read / Write
  "osm-id"                   gchar*                : Read / Write
  "osm-type"                 GeocodePlaceOsmType   : 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,
        GEOCODE_PLACE_TYPE_SCHOOL,
        GEOCODE_PLACE_TYPE_PLACE_OF_WORSHIP,
        GEOCODE_PLACE_TYPE_RESTAURANT,
        GEOCODE_PLACE_TYPE_BAR,
        GEOCODE_PLACE_TYPE_LIGHT_RAIL_STATION
} 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_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

typedef enum {
  GEOCODE_PLACE_OSM_TYPE_UNKNOWN,
  GEOCODE_PLACE_OSM_TYPE_NODE,
  GEOCODE_PLACE_OSM_TYPE_RELATION,
  GEOCODE_PLACE_OSM_TYPE_WAY
} GeocodePlaceOsmType;

Osm type of the place.

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.

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

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.

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_get_bounding_box ()

GeocodeBoundingBox * geocode_place_get_bounding_box     (GeocodePlace *place);

Gets the bounding box for the place place.

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.

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.

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]

geocode_place_get_osm_id ()

const char *        geocode_place_get_osm_id            (GeocodePlace *place);

Gets the OpenStreetMap ID of the place.

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.

place :

A place

Returns :

The osm type of the place.

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 "bounding-box" property

  "bounding-box"             GeocodeBoundingBox*   : Read / Write

The bounding box for the place.


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

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 "osm-id" property

  "osm-id"                   gchar*                : Read / Write

The OpenStreetMap id of the place.

Default value: NULL


The "osm-type" property

  "osm-type"                 GeocodePlaceOsmType   : Read / Write

The OpenStreetMap type of the place.

Default value: GEOCODE_PLACE_OSM_TYPE_UNKNOWN


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