Navit SVN

/work/compile/navit/src/navit/map/garmin/gar2navit.h

00001 /*
00002         Copyright (C) 2007  Alexander Atanasov      <aatanasov@gmail.com>
00003 
00004         This program is free software; you can redistribute it and/or modify
00005         it under the terms of the GNU General Public License as published by
00006         the Free Software Foundation; version 2 of the License.
00007 
00008         This program is distributed in the hope that it will be useful,
00009         but WITHOUT ANY WARRANTY; without even the implied warranty of
00010         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011         GNU General Public License for more details.
00012 
00013         You should have received a copy of the GNU General Public License
00014         along with this program; if not, write to the Free Software
00015         Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
00016         MA  02110-1301  USA
00017     
00018         Garmin and MapSource are registered trademarks or trademarks
00019         of Garmin Ltd. or one of its subsidiaries.
00020 
00021 */
00022 
00023 #define GROUP_RGN1      0
00024 #define GROUP_RGN2      1
00025 
00026 struct gar2navit {
00027         unsigned short id;
00028         unsigned short maxid;
00029         enum item_type ntype;
00030         unsigned group;
00031         char *descr;
00032         struct gar2navit *next;
00033 };
00034 
00035 #define G2N_POINT               1
00036 #define G2N_POLYLINE            2
00037 #define G2N_POLYGONE            3
00038 #define G2N_KIND_MASK           0xF0000000
00039 #define G2N_KIND_SHIFT          28
00040 #define G2N_RGN1                (GROUP_RGN1<<29)
00041 #define G2N_RGN2                (GROUP_RGN2<<29)
00042 
00043 struct gar2nav_conv {
00044         struct gar2navit *points;
00045         struct gar2navit *polylines;
00046         struct gar2navit *polygons;
00047 };
00048 
00049 struct gar2nav_conv *g2n_conv_load(char *file);
00050 enum item_type g2n_get_type(struct gar2nav_conv *c, unsigned int type, unsigned short id);
00051 char *g2n_get_descr(struct gar2nav_conv *c, int type, unsigned short id);
00052 struct gar2nav_conv *g2n_default_conv(void);