navit  0.5.3-trunk
csv.c File Reference
#include "config.h"
#include <stdlib.h>
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#include "debug.h"
#include "plugin.h"
#include "projection.h"
#include "item.h"
#include "map.h"
#include "maptype.h"
#include "attr.h"
#include "transform.h"
#include "file.h"
#include "quadtree.h"
#include "csv.h"

Data Structures

struct  quadtree_data
 

Functions

static int csv_coord_set (void *priv_data, struct coord *c, int count, enum change_mode mode)
 
static struct itemcsv_create_item (struct map_rect_priv *mr, enum item_type it_type)
 
static void quadtree_item_free (void *mr, struct quadtree_item *qitem)
 
static void quadtree_item_free_do (void *qitem)
 
struct quadtree_dataquadtree_data_dup (struct quadtree_data *qdata)
 
static void save_map_csv (struct map_priv *m)
 
static void map_destroy_csv (struct map_priv *m)
 
static void csv_coord_rewind (void *priv_data)
 
static int csv_coord_get (void *priv_data, struct coord *c, int count)
 
static void csv_attr_rewind (void *priv_data)
 
static int csv_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr)
 
static int csv_attr_set (void *priv_data, struct attr *attr, enum change_mode mode)
 
static int csv_type_set (void *priv_data, enum item_type type)
 
static void map_csv_debug_dump_hash_item (gpointer key, gpointer value, gpointer user_data)
 
static void map_csv_debug_dump (struct map_priv *map)
 
static struct map_rect_privmap_rect_new_csv (struct map_priv *map, struct map_selection *sel)
 
static void map_rect_destroy_csv (struct map_rect_priv *mr)
 
static struct itemmap_rect_get_item_csv (struct map_rect_priv *mr)
 
static struct itemmap_rect_get_item_byid_csv (struct map_rect_priv *mr, int id_hi, int id_lo)
 
static int csv_get_attr (struct map_priv *m, enum attr_type type, struct attr *attr)
 
static struct map_privmap_new_csv (struct map_methods *meth, struct attr **attrs, struct callback_list *cbl)
 
void plugin_init (void)
 

Variables

static int map_id
 
static const int zoom_max = 18
 
static struct item_methods methods_csv
 
static struct map_methods map_methods_csv
 

Function Documentation

◆ csv_attr_get()

static int csv_attr_get ( void *  priv_data,
enum attr_type  attr_type,
struct attr attr 
)
static

◆ csv_attr_rewind()

static void csv_attr_rewind ( void *  priv_data)
static

◆ csv_attr_set()

◆ csv_coord_get()

static int csv_coord_get ( void *  priv_data,
struct coord c,
int  count 
)
static

References map_rect_priv::c, and c.

◆ csv_coord_rewind()

static void csv_coord_rewind ( void *  priv_data)
static

◆ csv_coord_set()

◆ csv_create_item()

◆ csv_get_attr()

static int csv_get_attr ( struct map_priv m,
enum attr_type  type,
struct attr attr 
)
static

◆ csv_type_set()

static int csv_type_set ( void *  priv_data,
enum item_type  type 
)
static

◆ map_csv_debug_dump()

static void map_csv_debug_dump ( struct map_priv map)
static

Dump all map data (including deleted items) to the log.

References map_csv_debug_dump_hash_item().

Referenced by map_rect_new_csv().

◆ map_csv_debug_dump_hash_item()

static void map_csv_debug_dump_hash_item ( gpointer  key,
gpointer  value,
gpointer  user_data 
)
static

◆ map_destroy_csv()

◆ map_new_csv()

◆ map_rect_destroy_csv()

static void map_rect_destroy_csv ( struct map_rect_priv mr)
static

◆ map_rect_get_item_byid_csv()

static struct item* map_rect_get_item_byid_csv ( struct map_rect_priv mr,
int  id_hi,
int  id_lo 
)
static

◆ map_rect_get_item_csv()

◆ map_rect_new_csv()

◆ plugin_init()

void plugin_init ( void  )

◆ quadtree_data_dup()

struct quadtree_data* quadtree_data_dup ( struct quadtree_data qdata)

◆ quadtree_item_free()

static void quadtree_item_free ( void *  mr,
struct quadtree_item qitem 
)
static

◆ quadtree_item_free_do()

static void quadtree_item_free_do ( void *  qitem)
static

◆ save_map_csv()

Variable Documentation

◆ map_id

int map_id
static

Navit, a modular navigation system. Copyright (C) 2005-2011 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Referenced by map_new_csv().

◆ map_methods_csv

struct map_methods map_methods_csv
static
Initial value:
= {
"utf-8",
NULL,
NULL,
NULL,
}
static struct map_rect_priv * map_rect_new_csv(struct map_priv *map, struct map_selection *sel)
Definition: csv.c:489
static int csv_get_attr(struct map_priv *m, enum attr_type type, struct attr *attr)
Definition: csv.c:576
static struct item * map_rect_get_item_csv(struct map_rect_priv *mr)
Definition: csv.c:535
static void map_rect_destroy_csv(struct map_rect_priv *mr)
Definition: csv.c:525
static struct item * csv_create_item(struct map_rect_priv *mr, enum item_type it_type)
Definition: csv.c:580
static void map_destroy_csv(struct map_priv *m)
Definition: csv.c:177
static struct item * map_rect_get_item_byid_csv(struct map_rect_priv *mr, int id_hi, int id_lo)
Definition: csv.c:556
@ projection_mg
Definition: projection.h:25

Referenced by map_new_csv().

◆ methods_csv

struct item_methods methods_csv
static
Initial value:
= {
NULL,
}
static int csv_coord_set(void *priv_data, struct coord *c, int count, enum change_mode mode)
Definition: csv.c:370
static int csv_coord_get(void *priv_data, struct coord *c, int count)
Definition: csv.c:192
static void csv_coord_rewind(void *priv_data)
Definition: csv.c:189
static int csv_type_set(void *priv_data, enum item_type type)
Definition: csv.c:337
static int csv_attr_set(void *priv_data, struct attr *attr, enum change_mode mode)
Definition: csv.c:263
static void csv_attr_rewind(void *priv_data)
Definition: csv.c:202
static int csv_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
Definition: csv.c:206

Referenced by csv_create_item(), map_new_csv(), and map_rect_new_csv().

◆ zoom_max

const int zoom_max = 18
static

Referenced by csv_create_item(), and map_new_csv().