navit
0.5.1-trunk
|
#include <stdlib.h>
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "config.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 "shapefil.h"
Data Structures | |
struct | map_priv |
Represents the map from a single binfile. More... | |
struct | map_rect_priv |
Implementation-specific map rect data. More... | |
struct | longest_match_list_item |
struct | longest_match_list |
struct | longest_match |
Macros | |
#define | IS_ARC(x) ((x).nSHPType == SHPT_ARC || (x).nSHPType == SHPT_ARCZ || (x).nSHPType == SHPT_ARCM) |
#define | IS_POLYGON(x) ((x).nSHPType == SHPT_POLYGON || (x).nSHPType == SHPT_POLYGONZ || (x).nSHPType == SHPT_POLYGONM) |
Functions | |
static void | map_destroy_shapefile (struct map_priv *m) |
static void | shapefile_coord_rewind (void *priv_data) |
static void | shapefile_coord (struct map_rect_priv *mr, int idx, struct coord *c) |
static int | shapefile_coord_get (void *priv_data, struct coord *c, int count) |
static void | shapefile_attr_rewind (void *priv_data) |
static void | longest_match_add_match (struct longest_match *lm, struct longest_match_list_item *lmi, char *match) |
static void | longest_match_item_destroy (struct longest_match_list_item *lmi, long flags) |
static struct longest_match_list_item * | longest_match_item_new (struct longest_match_list *lml, void *data) |
static struct longest_match_list * | longest_match_list_new (struct longest_match *lm) |
static void | longest_match_list_destroy (struct longest_match_list *lml, long flags) |
static struct longest_match_list * | longest_match_get_list (struct longest_match *lm, int list) |
static struct longest_match * | longest_match_new (void) |
static void | longest_match_destroy (struct longest_match *lm, long flags) |
static void | longest_match_clear (struct longest_match *lm) |
static void | longest_match_add_key_value (struct longest_match *lm, char *k, char *v) |
static int | longest_match_list_find (struct longest_match *lm, struct longest_match_list *lml, void **list, int max_list_len) |
static void | build_match (struct longest_match *lm, struct longest_match_list *lml, char *line) |
static void | build_matches (struct map_priv *m, char *matches) |
static void | process_fields (struct map_priv *m, int id) |
static int | attr_resolve (struct map_rect_priv *mr, enum attr_type attr_type, struct attr *attr) |
static int | shapefile_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr) |
static struct map_rect_priv * | map_rect_new_shapefile (struct map_priv *map, struct map_selection *sel) |
static void | map_rect_destroy_shapefile (struct map_rect_priv *mr) |
static struct item * | map_rect_get_item_shapefile (struct map_rect_priv *mr) |
static struct item * | map_rect_get_item_byid_shapefile (struct map_rect_priv *mr, int id_hi, int id_lo) |
static struct map_priv * | map_new_shapefile (struct map_methods *meth, struct attr **attrs, struct callback_list *cbl) |
void | plugin_init (void) |
static SAFile | VSI_SHP_Open (const char *pszFilename, const char *pszAccess) |
static SAOffset | VSI_SHP_Read (void *p, SAOffset size, SAOffset nmemb, SAFile file) |
static SAOffset | VSI_SHP_Write (void *p, SAOffset size, SAOffset nmemb, SAFile file) |
static SAOffset | VSI_SHP_Seek (SAFile file, SAOffset offset, int whence) |
static SAOffset | VSI_SHP_Tell (SAFile file) |
static int | VSI_SHP_Flush (SAFile file) |
static int | VSI_SHP_Close (SAFile file) |
static void | VSI_SHP_Error (const char *message) |
static int | VSI_SHP_Remove (const char *pszFilename) |
void | SASetupDefaultHooks (SAHooks *psHooks) |
Variables | |
struct map_priv | __attribute__ |
static struct item_methods | methods_shapefile |
static struct map_methods | map_methods_shapefile |
#define IS_ARC | ( | x | ) | ((x).nSHPType == SHPT_ARC || (x).nSHPType == SHPT_ARCZ || (x).nSHPType == SHPT_ARCM) |
Navit, a modular navigation system. Copyright (C) 2005-2008 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_rect_get_item_shapefile(), and shapefile_coord_get().
#define IS_POLYGON | ( | x | ) | ((x).nSHPType == SHPT_POLYGON || (x).nSHPType == SHPT_POLYGONZ || (x).nSHPType == SHPT_POLYGONM) |
Referenced by shapefile_coord_get().
|
static |
References map_rect_priv::attr, attr_free(), attr_from_line(), attr_new_from_text(), map_rect_priv::attr_pos, attr_to_name(), dbg, map_priv::hDBF, item::id_hi, map_rect_priv::item, map_rect_priv::line, lvl_debug, map_rect_priv::m, name, map_priv::nFields, type, and value.
Referenced by shapefile_attr_get().
|
static |
References dbg, longest_match_add_match(), longest_match_item_new(), lvl_debug, and p.
Referenced by build_matches().
|
static |
References build_match(), map_priv::lm, longest_match_list_new(), longest_match_new(), and p.
Referenced by map_rect_new_shapefile().
|
static |
References longest_match::match_hash, and longest_match::match_present.
Referenced by process_fields().
|
static |
|
static |
References longest_match::match_present, and longest_match::match_present_count.
Referenced by map_rect_get_item_shapefile().
|
static |
References longest_match_list_destroy(), longest_match::longest_match_lists, longest_match::match_hash, and longest_match::match_present.
Referenced by map_rect_new_shapefile().
|
static |
References longest_match::longest_match_lists.
Referenced by map_rect_get_item_shapefile().
|
static |
References longest_match_list_item::data, and longest_match_list_item::match_idx.
Referenced by longest_match_list_destroy().
|
static |
References longest_match_list_item::data, data, and longest_match_list::longest_match_list_items.
Referenced by build_match().
|
static |
References longest_match_item_destroy(), and longest_match_list::longest_match_list_items.
Referenced by longest_match_destroy().
|
static |
|
static |
References longest_match::longest_match_lists.
Referenced by build_matches().
|
static |
References longest_match::match_hash, and longest_match::match_present_count.
Referenced by build_matches().
|
static |
References map_priv::adfMaxBound, map_priv::adfMinBound, attr_search(), map_priv::charset, map_methods::charset, data, dbg, file_wordexp_destroy(), file_wordexp_get_array(), file_wordexp_new(), map_priv::filename, map_priv::flags, map_priv::hDBF, map_priv::hSHP, lvl_debug, map_methods_shapefile, map_priv::nEntities, map_priv::nFields, map_priv::nShapeType, attr::num, map_priv::offset, map_priv::pro, projection_from_name(), attr::str, and attr::u.
Referenced by plugin_init().
|
static |
References map_rect_priv::attr, attr_free(), map_rect_priv::psShape, and map_rect_priv::str.
|
static |
References item::id_hi, map_rect_priv::idx, and map_rect_get_item_shapefile().
|
static |
References attr_from_line(), map_rect_priv::cidx_rewind, dbg, map_priv::hSHP, item::id_hi, map_rect_priv::idx, IS_ARC, map_rect_priv::item, item_from_name(), map_rect_priv::line, map_priv::lm, longest_match_clear(), longest_match_get_list(), longest_match_list_find(), lvl_debug, lvl_error, map_rect_priv::m, map_priv::nEntities, map_rect_priv::part, map_rect_priv::part_rewind, process_fields(), map_rect_priv::psShape, shapefile_attr_rewind(), shapefile_coord_rewind(), item::type, and type.
Referenced by map_rect_get_item_byid_shapefile().
|
static |
References build_matches(), changed(), data, map_priv::dbfmap_data, dbg, file, file_create(), file_data_free(), file_data_read_all(), file_destroy(), file_size(), map_priv::filename, item::id_hi, item::id_lo, map_rect_priv::idx, map_rect_priv::item, map_priv::lm, longest_match_destroy(), lvl_debug, lvl_error, map_rect_priv::m, item::meth, methods_shapefile, item::priv_data, and size.
void plugin_init | ( | void | ) |
References dbg, lvl_debug, and map_new_shapefile().
References map_priv::hDBF, map_priv::lm, longest_match_add_key_value(), and map_priv::nFields.
Referenced by map_rect_get_item_shapefile().
void SASetupDefaultHooks | ( | SAHooks * | psHooks | ) |
|
static |
References map_rect_priv::aidx, map_rect_priv::anext, map_rect_priv::attr_pos, map_priv::flags, and map_rect_priv::m.
Referenced by map_rect_get_item_shapefile().
|
static |
References coord_geo::lat, coord_geo::lng, map_rect_priv::m, map_priv::offset, map_priv::pro, projection_mg, map_rect_priv::psShape, transform_from_geo(), transform_from_to(), coord::x, and coord::y.
Referenced by shapefile_coord_get().
|
static |
References map_rect_priv::cidx, map_rect_priv::cidx_rewind, map_rect_priv::part, and map_rect_priv::part_rewind.
Referenced by map_rect_get_item_shapefile().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
References dbg, and lvl_error.
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
|
static |
Referenced by SASetupDefaultHooks().
struct map_priv __attribute__ |
|
static |
Referenced by map_new_shapefile().
|
static |
Referenced by map_rect_new_shapefile().