MemphisMap

MemphisMap — OpenStreetMap map data object.

Synopsis

                    MemphisMap;
MemphisMap*         memphis_map_new                     ();
void                memphis_map_free                    (MemphisMap *map);
void                memphis_map_load_from_file          (MemphisMap *map,
                                                         const gchar *filename,
                                                         GError **error);
void                memphis_map_load_from_data          (MemphisMap *map,
                                                         const gchar *data,
                                                         guint size,
                                                         GError **error);
void                memphis_map_get_bounding_box        (MemphisMap *map,
                                                         gdouble *minlat,
                                                         gdouble *minlon,
                                                         gdouble *maxlat,
                                                         gdouble *maxlon);

Object Hierarchy

  GObject
   +----MemphisMap

Description

Stores an area with OSM map data. The data can be loaded from an OSM XML file or a character array with XML data.

Reference: http://wiki.openstreetmap.org/wiki/.osm

Details

MemphisMap

typedef struct _MemphisMap MemphisMap;


memphis_map_new ()

MemphisMap*         memphis_map_new                     ();

Returns :

a new MemphisMap without any data.

Since 0.1


memphis_map_free ()

void                memphis_map_free                    (MemphisMap *map);

Frees the memory of a MemphisMap.

map :

a MemphisMap

Since 0.1


memphis_map_load_from_file ()

void                memphis_map_load_from_file          (MemphisMap *map,
                                                         const gchar *filename,
                                                         GError **error);

Load map data from an OSM XML file.

map :

a MemphisMap

filename :

a path to a OSM map file

error :

a pointer to a GError or NULL

Since 0.2


memphis_map_load_from_data ()

void                memphis_map_load_from_data          (MemphisMap *map,
                                                         const gchar *data,
                                                         guint size,
                                                         GError **error);

Load map data from an OSM XML file.

map :

a MemphisMap

data :

a character array with OSM data

size :

the size of the array

error :

a pointer to a GError or NULL

Since 0.2


memphis_map_get_bounding_box ()

void                memphis_map_get_bounding_box        (MemphisMap *map,
                                                         gdouble *minlat,
                                                         gdouble *minlon,
                                                         gdouble *maxlat,
                                                         gdouble *maxlon);

Get the exent of the bounding box that contains all map data.

map :

a MemphisMap

minlat :

the minimum latitude. out.

minlon :

the minimum longitude. out.

maxlat :

the maximum latitude. out.

maxlon :

the maximum longitude. out.

Since 0.1