![]() |
![]() |
![]() |
geocode-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#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
);
"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
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.
struct GeocodePlace;
All the fields in the GeocodePlace structure are private and should never be accessed directly.
struct GeocodePlaceClass { };
All the fields in the GeocodePlaceClass structure are private and should never be accessed directly.
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.
Type is unknown for this place. | |
A building or house. | |
A street. | |
A populated settlement such as a city, town, village. | |
One of the primary administrative areas within a country. | |
One of the secondary administrative areas within a country. | |
One of the tertiary administrative areas within a country. | |
A partial or full postal code. | |
One of the countries or dependent territories defined by the ISO 3166-1 standard. | |
An island. | |
An airport. | |
A railway station. | |
A bus stop. | |
A high capacity highways designed to safely carry fast motor traffic. | |
A water feature such as a river, canal, lake, bay or ocean. | |
A land feature such as a park, mountain or beach. | |
A uncategorized place. | |
An area covering multiple countries. | |
A point of interest such as a school, hospital or tourist attraction. | |
A subdivision of a town such as a suburb or neighborhood. | |
A place known by a colloquial name. | |
An area known within a specific context such as MSA or area code. | |
A historical primary administrative area within a country. | |
A historical secondary administrative area within a country. | |
One of the major land masses on the Earth. | |
An area defined by the Olson standard (tz database). | |
A housing development or subdivision known by name. | |
A historical populated settlement that is no longer known by its original name. | |
One of the five major bodies of water on the Earth. | |
An area of open water smaller than an ocean. | |
Institution designed for learning under the supervision of teachers. | |
All places of worship independently of the religion or denomination. | |
Generally formal place with sit-down facilities selling full meals served by waiters. | |
A bar or pub. | |
A light rail station or tram stop. |
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.
GeocodePlace * geocode_place_new (const char *name
,GeocodePlaceType place_type
);
Creates a new GeocodePlace object.
|
the name of place |
|
the type of place |
Returns : |
a new GeocodePlace object. Use g_object_unref() when done. |
GeocodePlace * geocode_place_new_with_location (const char *name
,GeocodePlaceType place_type
,GeocodeLocation *location
);
Creates a new GeocodePlace object.
|
the name of place |
|
the type of place |
|
the location info for the place |
Returns : |
a new GeocodePlace object. Use g_object_unref() when done. |
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 place |
|
another place |
Returns : |
TRUE if the instances are equal, FALSE otherwise |
Since 3.23.1
void geocode_place_set_name (GeocodePlace *place
,const char *name
);
Sets the name of the place
to name
.
|
A place |
|
the name of place |
const char * geocode_place_get_name (GeocodePlace *place
);
Gets the name of the place
.
|
A place |
Returns : |
The name of the place . |
GeocodePlaceType geocode_place_get_place_type (GeocodePlace *place
);
Gets the type of the place
.
|
A place |
Returns : |
The type of the place . |
GeocodeBoundingBox * geocode_place_get_bounding_box (GeocodePlace *place
);
Gets the bounding box for the place place
.
|
A place |
Returns : |
A GeocodeBoundingBox, or NULL if boundaries are unknown. [transfer none] |
void geocode_place_set_bounding_box (GeocodePlace *place
,GeocodeBoundingBox *bbox
);
Sets the GeocodeBoundingBox for the place place
.
|
A place |
|
A GeocodeBoundingBox for the place |
void geocode_place_set_location (GeocodePlace *place
,GeocodeLocation *location
);
Sets the location of place
to location
.
|
A place |
|
A location |
GeocodeLocation * geocode_place_get_location (GeocodePlace *place
);
Gets the associated location object.
|
A place |
Returns : |
The associated location object. [transfer none] |
void geocode_place_set_street_address (GeocodePlace *place
,const char *street_address
);
Sets the street address of place
to street_address
.
|
A place |
|
a street address for the place |
const char * geocode_place_get_street_address (GeocodePlace *place
);
Gets the street address of the place
.
|
A place |
Returns : |
The street address of the place . |
void geocode_place_set_street (GeocodePlace *place
,const char *street
);
Sets the street of place
to street
.
|
A place |
|
a street |
const char * geocode_place_get_street (GeocodePlace *place
);
Gets the street of the place
.
|
A place |
Returns : |
The street of the place . |
void geocode_place_set_building (GeocodePlace *place
,const char *building
);
Sets the building of place
to building
.
|
A place |
|
a building |
const char * geocode_place_get_building (GeocodePlace *place
);
Gets the building of the place
.
|
A place |
Returns : |
The building of the place . |
void geocode_place_set_postal_code (GeocodePlace *place
,const char *postal_code
);
Sets the postal code of place
to postal_code
.
|
A place |
|
a postal code for the place |
const char * geocode_place_get_postal_code (GeocodePlace *place
);
Gets the postal code of the place
.
|
A place |
Returns : |
The postal code of the place . |
void geocode_place_set_area (GeocodePlace *place
,const char *area
);
Sets the area of place
to area
.
|
A place |
|
a area |
const char * geocode_place_get_area (GeocodePlace *place
);
Gets the area of the place
.
|
A place |
Returns : |
The area of the place . |
void geocode_place_set_town (GeocodePlace *place
,const char *town
);
Sets the town of place
to town
.
|
A place |
|
a town for the place |
const char * geocode_place_get_town (GeocodePlace *place
);
Gets the town of the place
.
|
A place |
Returns : |
The town of the place . |
void geocode_place_set_county (GeocodePlace *place
,const char *county
);
Sets the county of place
to county
.
|
A place |
|
a county for the place |
const char * geocode_place_get_county (GeocodePlace *place
);
Gets the county of the place
.
|
A place |
Returns : |
The country of the place . |
void geocode_place_set_state (GeocodePlace *place
,const char *state
);
Sets the state of place
to state
.
|
A place |
|
a state for the place |
const char * geocode_place_get_state (GeocodePlace *place
);
Gets the state of the place
.
|
A place |
Returns : |
The state of the place . |
void geocode_place_set_administrative_area (GeocodePlace *place
,const char *admin_area
);
Sets the local administrative area of place
to admin_area
.
|
A place |
|
an administrative area for the place |
const char * geocode_place_get_administrative_area
(GeocodePlace *place
);
Gets the local administrative area of the place
.
|
A place |
Returns : |
The local administrative area of the place . |
void geocode_place_set_country_code (GeocodePlace *place
,const char *country_code
);
Sets the ISO country code of place
to country_code
.
|
A place |
|
an ISO country code for the place |
const char * geocode_place_get_country_code (GeocodePlace *place
);
Gets the ISO-3166 country code of the place
.
|
A place |
Returns : |
The ISO-3166 country code of the place , in upper case. |
void geocode_place_set_country (GeocodePlace *place
,const char *country
);
Sets the country of place
to country
.
|
A place |
|
a country for the place |
const char * geocode_place_get_country (GeocodePlace *place
);
Gets the country of the place
.
|
A place |
Returns : |
The country of the place . |
void geocode_place_set_continent (GeocodePlace *place
,const char *continent
);
Sets the continent of place
to continent
.
|
A place |
|
a continent for the place |
const char * geocode_place_get_continent (GeocodePlace *place
);
Gets the continent of the place
.
|
A place |
Returns : |
The continent of the place . |
GIcon * geocode_place_get_icon (GeocodePlace *place
);
Gets the GIcon representing the place
.
|
A place |
Returns : |
The GIcon representing the place . [transfer none]
|
const char * geocode_place_get_osm_id (GeocodePlace *place
);
Gets the OpenStreetMap ID of the place
.
|
A place |
Returns : |
The osm ID of the place . |
GeocodePlaceOsmType geocode_place_get_osm_type (GeocodePlace *place
);
Gets the OpenStreetMap type of the place
.
|
A place |
Returns : |
The osm type of the place . |
"administrative-area"
property "administrative-area" gchar* : Read / Write
The local administrative area.
Default value: NULL
"area"
property "area" gchar* : Read / Write
A named area such as a campus or neighborhood.
Default value: NULL
"bounding-box"
property"bounding-box" GeocodeBoundingBox* : Read / Write
The bounding box for the place.
"building"
property "building" gchar* : Read / Write
A specific building on a street or in an area.
Default value: NULL
"country-code"
property "country-code" gchar* : Read / Write
The country code.
Default value: NULL
"osm-id"
property "osm-id" gchar* : Read / Write
The OpenStreetMap id of the place.
Default value: NULL
"osm-type"
property"osm-type" GeocodePlaceOsmType : Read / Write
The OpenStreetMap type of the place.
Default value: GEOCODE_PLACE_OSM_TYPE_UNKNOWN
"place-type"
property"place-type" GeocodePlaceType : Read / Write / Construct Only
The type of the place.
Default value: GEOCODE_PLACE_TYPE_UNKNOWN
"street-address"
property "street-address" gchar* : Read / Write
The street address.
Default value: NULL