You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(59) |
Sep
(43) |
Oct
(95) |
Nov
(135) |
Dec
(108) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(229) |
Feb
(141) |
Mar
(59) |
Apr
(70) |
May
(64) |
Jun
(87) |
Jul
(57) |
Aug
(108) |
Sep
(74) |
Oct
(203) |
Nov
(141) |
Dec
(108) |
2009 |
Jan
(114) |
Feb
(91) |
Mar
(101) |
Apr
(69) |
May
(54) |
Jun
(82) |
Jul
(49) |
Aug
(109) |
Sep
(81) |
Oct
(93) |
Nov
(100) |
Dec
(79) |
2010 |
Jan
(46) |
Feb
(36) |
Mar
(135) |
Apr
(103) |
May
(116) |
Jun
(130) |
Jul
(52) |
Aug
(31) |
Sep
(46) |
Oct
(48) |
Nov
(98) |
Dec
(110) |
2011 |
Jan
(234) |
Feb
(184) |
Mar
(150) |
Apr
(43) |
May
(53) |
Jun
(52) |
Jul
(112) |
Aug
(72) |
Sep
(79) |
Oct
(23) |
Nov
(6) |
Dec
(30) |
2012 |
Jan
(39) |
Feb
(37) |
Mar
(49) |
Apr
(60) |
May
(63) |
Jun
(38) |
Jul
(33) |
Aug
(24) |
Sep
(20) |
Oct
(14) |
Nov
(23) |
Dec
(50) |
2013 |
Jan
(30) |
Feb
(32) |
Mar
(27) |
Apr
(41) |
May
(59) |
Jun
(21) |
Jul
(10) |
Aug
(73) |
Sep
(23) |
Oct
(60) |
Nov
(14) |
Dec
(15) |
2014 |
Jan
(4) |
Feb
(8) |
Mar
(11) |
Apr
(6) |
May
(27) |
Jun
(4) |
Jul
(29) |
Aug
(62) |
Sep
(11) |
Oct
(17) |
Nov
(58) |
Dec
(9) |
2015 |
Jan
(23) |
Feb
(3) |
Mar
(26) |
Apr
(47) |
May
(8) |
Jun
(28) |
Jul
(10) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Albert L F. <af...@us...> - 2008-01-07 21:27:08
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3573 Added Files: nl.po Log Message: add (initial) dutch language file --- NEW FILE: nl.po --- # German translations for navit # Copyright (C) 2007 # This file is distributed under the same license as the navit package. # Albert Fabe, 2007. # msgid "" msgstr "" "Project-Id-Version: Navit 0.0.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-12-26 11:26+0100\n" "PO-Revision-Date: 2007-07-10 21:53+0200\n" "Last-Translator: afaber <afaber_at_sourceforge_dot._net>\n" "Language-Team: afaber\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../src/main.c:94 #, c-format msgid "Running from source directory\n" msgstr "Gestart vanuit de source directory\n" #: ../src/main.c:110 #, c-format msgid "setting '%s' to '%s'\n" msgstr "setting '%s' naar '%s'\n" #: ../src/main.c:173 #, c-format msgid "No config file navit.xml, navit.xml.local found\n" msgstr "Geen config file navit.xml, navit.xml.local gevonden\n" #: ../src/main.c:177 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Error bij het verwerken van '%s': %s\n" #: ../src/main.c:180 #, c-format msgid "Using '%s'\n" msgstr "Gebruik '%s'\n" #: ../src/main.c:183 #, c-format msgid "No instance has been created, exiting\n" msgstr "Geen instantie ge-creerd, beeindigen\n" #: ../src/navigation.c:173 #, c-format msgid "%d m" msgstr "%d Meter" #: ../src/navigation.c:175 #, c-format msgid "in %d m" msgstr "na %d meter" #: ../src/navigation.c:179 #, c-format msgid "%d meters" msgstr "%d Meter" #: ../src/navigation.c:181 #, c-format msgid "in %d meters" msgstr "na %d meter" #: ../src/navigation.c:187 #, c-format msgid "%d.%d kilometer" msgstr "%d,%d kilometer" #: ../src/navigation.c:189 #, c-format msgid "in %d.%d kilometers" msgstr "na %d,%d kilometer" #: ../src/navigation.c:193 #, c-format msgid "one kilometer" msgid_plural "%d kilometers" msgstr[0] "een kilometer" msgstr[1] "%d kilometer" #: ../src/navigation.c:195 #, c-format msgid "in one kilometer" msgid_plural "in %d kilometers" msgstr[0] "na één kilometer" msgstr[1] "in %d kilometer" #: ../src/navigation.c:399 msgid "right" msgstr "rechts" #: ../src/navigation.c:406 msgid "left" msgstr "links" #: ../src/navigation.c:410 msgid "easily " msgstr "flauwe " #: ../src/navigation.c:414 msgid "strongly " msgstr "scherpe " #: ../src/navigation.c:417 msgid "unknown " msgstr "niet bekend " # #: ../src/navigation.c:423 msgid "When possible, please turn around" msgstr "Wanneer mogelijk, omkeren" #: ../src/navigation.c:430 #, c-format msgid "Follow the road for the next %s" msgstr "Weg volgen voor %s" #: ../src/navigation.c:434 msgid "soon" msgstr "binnenkort" #: ../src/navigation.c:440 msgid "now" msgstr "nu" #: ../src/navigation.c:443 msgid "error" msgstr "error" #. TRANSLATORS: The first argument is strength, the second direction and the third distance #: ../src/navigation.c:447 #, c-format msgid "Turn %1$s%2$s %3$s" msgstr "%3$s %1$s%2$s afslaan" #: ../src/navigation.c:450 #, c-format msgid "You have reached your destination %s" msgstr "%s bestemming bereikt" #: ../src/navit.c:614 ../src/gui/gtk/gui_gtk_action.c:185 msgid "Layout" msgstr "Layout" #: ../src/navit.c:630 msgid "Projection" msgstr "Projectie" #: ../src/navit.c:685 msgid "Former Destinations" msgstr "Vorige bestemmingen" #: ../src/navit.c:695 msgid "Bookmarks" msgstr "Bookmarks" #: ../src/navit.c:733 msgid "Vehicle" msgstr "Voertuig" #: ../src/navit.c:768 msgid "Command" msgstr "Opdracht" #: ../src/navit.c:773 msgid "Length" msgstr "Lengte" #: ../src/navit.c:778 msgid "Time" msgstr "Tijd" #: ../src/navit.c:783 msgid "Destination Length" msgstr "Afstand" #: ../src/navit.c:788 msgid "Destination Time" msgstr "Aankomsttijd" #: ../src/navit.c:810 ../src/gui/gtk/gui_gtk_action.c:189 msgid "Roadbook" msgstr "Route" #: ../src/navit.c:1030 ../src/gui/gtk/destination.c:365 #: ../src/gui/gtk/gui_gtk_action.c:184 msgid "Map" msgstr "Kaart" #: ../src/navit.c:1037 ../src/gui/gtk/gui_gtk_action.c:183 msgid "Route" msgstr "Route" #: ../src/country.c:24 msgid "Czech Republic" msgstr "Tsjechië" #: ../src/country.c:25 msgid "Slovakia" msgstr "Slowakije" #: ../src/country.c:26 msgid "San Marino" msgstr "San Marino" #: ../src/country.c:27 msgid "Estonia" msgstr "Estland" #: ../src/country.c:28 msgid "Georgia" msgstr "Georgien" #: ../src/country.c:29 msgid "Latvia" msgstr "Letland" #: ../src/country.c:30 msgid "Lithuania" msgstr "Litouwen" #: ../src/country.c:31 msgid "Moldova" msgstr "Moldavië" #: ../src/country.c:32 msgid "Russian Federation" msgstr "Rusland" #: ../src/country.c:33 msgid "Ukraine" msgstr "Oekraïne" #: ../src/country.c:34 msgid "Belarus" msgstr "Wit-Rusland" #: ../src/country.c:35 msgid "Egypt" msgstr "Egypte" #: ../src/country.c:36 msgid "Greece" msgstr "Griekenland" #: ../src/country.c:37 msgid "Netherlands" msgstr "Nederland" #: ../src/country.c:38 msgid "Belgium" msgstr "België" #: ../src/country.c:39 msgid "France" msgstr "Frankrijk" #: ../src/country.c:40 msgid "Spain" msgstr "Spanje" #: ../src/country.c:41 msgid "Hungary" msgstr "Hongarije" #: ../src/country.c:42 msgid "Italy" msgstr "Italië" #: ../src/country.c:43 msgid "Romania" msgstr "Roemenië" #: ../src/country.c:44 msgid "Switzerland" msgstr "Zwitserland" #: ../src/country.c:45 msgid "Austria" msgstr "Oostenrijk" #: ../src/country.c:46 msgid "United Kingdom" msgstr "Groot-Brittannië" #: ../src/country.c:47 msgid "Denmark" msgstr "Denemarken" #: ../src/country.c:48 msgid "Sweden" msgstr "Zweden" #: ../src/country.c:49 msgid "Norway" msgstr "Norwegen" #: ../src/country.c:50 msgid "Poland" msgstr "Polen" #: ../src/country.c:51 msgid "Germany" msgstr "Duitsland" #: ../src/country.c:52 msgid "Gibraltar" msgstr "Gibraltar" #: ../src/country.c:53 msgid "Portugal" msgstr "Portugal" #: ../src/country.c:54 msgid "Luxembourg" msgstr "Luxemburg" #: ../src/country.c:55 msgid "Ireland" msgstr "Irland" #: ../src/country.c:56 msgid "Iceland" msgstr "Island" #: ../src/country.c:57 msgid "Albania" msgstr "Albanien" #: ../src/country.c:58 msgid "Malta" msgstr "Malta" #: ../src/country.c:59 msgid "Cyprus" msgstr "Zypern" #: ../src/country.c:60 msgid "Finland" msgstr "Finnland" #: ../src/country.c:61 msgid "Bulgaria" msgstr "Bulgarien" #: ../src/country.c:62 msgid "Lebanon" msgstr "Libanon" #: ../src/country.c:63 msgid "Andorra" msgstr "Andorra" #: ../src/country.c:64 msgid "Syria" msgstr "Syrien" # #: ../src/country.c:65 msgid "Saudi Arabia" msgstr "Saudi-Arabien" #: ../src/country.c:66 msgid "Libia" msgstr "Libyen" #: ../src/country.c:67 msgid "Israel" msgstr "Israel" #: ../src/country.c:68 msgid "Palestinia" msgstr "Palestina" #: ../src/country.c:69 msgid "Liechtenstein" msgstr "Lichtenstein" #: ../src/country.c:70 msgid "Morocco" msgstr "Marokko" #: ../src/country.c:71 msgid "Algeria" msgstr "Algerije" #: ../src/country.c:72 msgid "Tunisia" msgstr "Tunesië" #: ../src/country.c:73 msgid "Serbia" msgstr "Servië" #: ../src/country.c:74 msgid "Jordan" msgstr "Jordanie" #: ../src/country.c:75 msgid "Croatia" msgstr "Kroatië" #: ../src/country.c:76 msgid "Slovenia" msgstr "Slovenië" #: ../src/country.c:77 msgid "Bosnia and Herzegovina" msgstr "Bosnië en Herzegovina" #: ../src/country.c:78 msgid "Macedonia" msgstr "Macedonië" #: ../src/country.c:79 msgid "Turkey" msgstr "Turkije" #: ../src/country.c:80 msgid "Monaco" msgstr "Monaco" #: ../src/country.c:81 msgid "Azerbaijan" msgstr "Azerbaijan" #: ../src/country.c:82 msgid "Armenia" msgstr "Armenie" #: ../src/country.c:83 msgid "Faroe Islands" msgstr "Färöer" #: ../src/country.c:84 msgid "Western Sahara" msgstr "Westsahara" #: ../src/country.c:85 msgid "Svalbard and Jan Mayen" msgstr "Svalbard und Jan Mayen" #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:100 #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 msgid "Car" msgstr "Auto" #: ../src/gui/gtk/destination.c:99 msgid "Iso2" msgstr "Iso2" #: ../src/gui/gtk/destination.c:99 msgid "Iso3" msgstr "Iso3" #: ../src/gui/gtk/destination.c:99 ../src/gui/gtk/destination.c:331 msgid "Country" msgstr "Land" # #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "Postal" msgstr "Postcode" #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "Town" msgstr "Plaats" # #: ../src/gui/gtk/destination.c:100 ../src/gui/gtk/destination.c:101 #: ../src/gui/gtk/destination.c:102 msgid "District" msgstr "District" #: ../src/gui/gtk/destination.c:101 ../src/gui/gtk/destination.c:102 #: ../src/gui/gtk/destination.c:340 msgid "Street" msgstr "Straat" #: ../src/gui/gtk/destination.c:102 ../src/gui/gtk/destination.c:342 msgid "Number" msgstr "Nummer" # #: ../src/gui/gtk/destination.c:326 msgid "Enter Destination" msgstr "Bestemming" #: ../src/gui/gtk/destination.c:333 msgid "Zip Code" msgstr "Postcode" #: ../src/gui/gtk/destination.c:335 msgid "City" msgstr "Plaats" #: ../src/gui/gtk/destination.c:337 msgid "District/Township" msgstr "Ortsteil/Gemeinde" #: ../src/gui/gtk/destination.c:366 msgid "Bookmark" msgstr "Markeren" #: ../src/gui/gtk/destination.c:367 ../src/gui/gtk/gui_gtk_action.c:195 msgid "Destination" msgstr "Bestemming" #: ../src/gui/gtk/gui_gtk_action.c:182 msgid "Display" msgstr "Tonen" #: ../src/gui/gtk/gui_gtk_action.c:186 msgid "ZoomOut" msgstr "Verkleinen" #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "ZoomIn" msgstr "Vergroten" #: ../src/gui/gtk/gui_gtk_action.c:188 msgid "Refresh" msgstr "Verversen" #: ../src/gui/gtk/gui_gtk_action.c:191 ../src/gui/gtk/gui_gtk_action.c:193 msgid "Info" msgstr "Info" #: ../src/gui/gtk/gui_gtk_action.c:196 msgid "Clear" msgstr "Wissen" #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Test" msgstr "Test" #: ../src/gui/gtk/gui_gtk_action.c:198 msgid "_Quit" msgstr "beëindigen" #: ../src/gui/gtk/gui_gtk_action.c:205 msgid "Cursor" msgstr "Cursor" #: ../src/gui/gtk/gui_gtk_action.c:206 msgid "Tracking" msgstr "Volgen" #: ../src/gui/gtk/gui_gtk_action.c:207 msgid "Orientation" msgstr "Oriëntatie" #: ../src/gui/gtk/gui_gtk_action.c:209 ../src/gui/gtk/gui_gtk_action.c:211 msgid "Fullscreen" msgstr "Beeldvullend" #: ../src/gui/gtk/gui_gtk_action.c:219 msgid "Data" msgstr "Data" #: ../src/gui/gtk/gui_gtk_action.c:220 msgid "VisibleBlocks" msgstr "Toon blokken" #: ../src/gui/gtk/gui_gtk_action.c:221 msgid "VisibleTowns" msgstr "Sichtbare Städte" #: ../src/gui/gtk/gui_gtk_action.c:222 msgid "VisiblePolys" msgstr "Toon polygonen" #: ../src/gui/gtk/gui_gtk_action.c:223 msgid "VisibleStreets" msgstr "Toon straten" #: ../src/gui/gtk/gui_gtk_action.c:224 msgid "VisiblePoints" msgstr "Toon punten" #: ../src/gui/gtk/gui_gtk_action.c:225 msgid "RouteGraph" msgstr "Route-Graph" #~ msgid "Point 0x%x 0x%x" #~ msgstr "Punt 0x%x 0x%x" #~ msgid "Screen %d %d" #~ msgstr "Scherm %d %d" #~ msgid "Set as position" #~ msgstr "Zet als positie" #~ msgid "Set as destination" #~ msgstr "Zet als bestemming" #~ msgid "Add as bookmark" #~ msgstr "Opnemen als bladwijzer" #~ msgid "two kilometers" #~ msgstr "twee kilometer" #~ msgid "in two kilometers" #~ msgstr "in twee kilometer" #~ msgid "three kilometers" #~ msgstr "drie kilometer" #~ msgid "in three kilometers" #~ msgstr "in drie kilometers" #~ msgid "four kilometers" #~ msgstr "vier kilometer" #~ msgid "in four kilometers" #~ msgstr "in vier kilometer" #~ msgid "%d kilometers" #~ msgstr "%d kilometer" #~ msgid "in %d kilometers" #~ msgstr "in %d Kilometers" |
From: Albert L F. <af...@us...> - 2008-01-07 21:24:45
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2285 Modified Files: xmlconfig.c Log Message: add config.h file to emulate strtok_r on win32 Index: xmlconfig.c =================================================================== RCS file: /cvsroot/navit/navit/src/xmlconfig.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** xmlconfig.c 5 Jan 2008 22:46:19 -0000 1.24 --- xmlconfig.c 7 Jan 2008 21:24:47 -0000 1.25 *************** *** 21,24 **** --- 21,25 ---- #include "log.h" #include "xmlconfig.h" + #include "config.h" |
From: Martin S. <mar...@us...> - 2008-01-07 13:24:34
|
Update of /cvsroot/navit/navit/src/graphics/gtk_drawing_area In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20357/graphics/gtk_drawing_area Modified Files: graphics_gtk_drawing_area.c Log Message: Fix:GTK:Works now also on non-utf8-locales Index: graphics_gtk_drawing_area.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** graphics_gtk_drawing_area.c 16 Dec 2007 22:28:13 -0000 1.22 --- graphics_gtk_drawing_area.c 7 Jan 2008 13:24:36 -0000 1.23 *************** *** 344,350 **** struct text_render *ret; struct text_glyph *curr; ! wchar_t wtext[1024]; ! len=mbstowcs(wtext, text, 1024); ret=g_malloc(sizeof(*ret)+len*sizeof(struct text_glyph *)); ret->glyph_count=len; --- 344,350 ---- struct text_render *ret; struct text_glyph *curr; ! char *p=text; ! len=g_utf8_strlen(text, -1); ret=g_malloc(sizeof(*ret)+len*sizeof(struct text_glyph *)); ret->glyph_count=len; *************** *** 366,370 **** { ! glyph_index = FT_Get_Char_Index(font->face, wtext[n]); FT_Load_Glyph(font->face, glyph_index, FT_LOAD_DEFAULT ); FT_Render_Glyph(font->face->glyph, ft_render_mode_normal ); --- 366,370 ---- { ! glyph_index = FT_Get_Char_Index(font->face, g_utf8_get_char(p)); FT_Load_Glyph(font->face, glyph_index, FT_LOAD_DEFAULT ); FT_Render_Glyph(font->face->glyph, ft_render_mode_normal ); *************** *** 390,393 **** --- 390,394 ---- x += slot->advance.x; y -= slot->advance.y; + p=g_utf8_next_char(p); } return ret; |
From: Martin S. <mar...@us...> - 2008-01-07 13:24:04
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20316 Modified Files: main.c Log Message: Fix:Core:Works now also on non-utf8-locales Index: main.c =================================================================== RCS file: /cvsroot/navit/navit/src/main.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** main.c 5 Jan 2008 20:04:22 -0000 1.24 --- main.c 7 Jan 2008 13:24:07 -0000 1.25 *************** *** 130,135 **** g_free(s); } ! bindtextdomain( "navit", getenv("NAVIT_LOCALEDIR")); ! textdomain( "navit" ); debug_init(); --- 130,136 ---- g_free(s); } ! bindtextdomain(PACKAGE, getenv("NAVIT_LOCALEDIR")); ! bind_textdomain_codeset (PACKAGE, "UTF-8"); ! textdomain(PACKAGE); debug_init(); |
From: andi <bod...@us...> - 2008-01-06 16:52:47
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19182 Modified Files: setwpt.c Log Message: fix:setwpt:desc->description Index: setwpt.c =================================================================== RCS file: /cvsroot/navit/navit/src/tools/gpx2navit_txt/src/setwpt.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** setwpt.c 5 Jan 2008 18:20:24 -0000 1.1 --- setwpt.c 6 Jan 2008 16:50:57 -0000 1.2 *************** *** 39,43 **** //generate the file ! fprintf(pdata->fp,"type=%s label=\"%s\" desc=\"%s\" gc_type=\"%s\"\n", poi_type,pdata->attr->name,pdata->attr->desc,pdata->attr->type); fprintf(pdata->fp,"%3.6f %4.6f\n",x[0],y[0]); --- 39,43 ---- //generate the file ! fprintf(pdata->fp,"type=%s label=\"%s\" description=\"%s\" gc_type=\"%s\"\n", poi_type,pdata->attr->name,pdata->attr->desc,pdata->attr->type); fprintf(pdata->fp,"%3.6f %4.6f\n",x[0],y[0]); |
From: Martin S. <mar...@us...> - 2008-01-06 16:35:17
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12627 Modified Files: attr_def.h Log Message: Add:Core:Added new attributes from bodenseepingu Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** attr_def.h 5 Jan 2008 20:04:22 -0000 1.25 --- attr_def.h 6 Jan 2008 16:35:21 -0000 1.26 *************** *** 83,86 **** --- 83,88 ---- ATTR(name) ATTR(source) + ATTR(description) + ATTR(gc_type) ATTR2(0x0003ffff,type_string_end) ATTR(order_limit) |
From: Martin S. <mar...@us...> - 2008-01-06 16:02:26
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29862 Modified Files: gui_sdl_window.cpp Log Message: Fix:SDL:Changed to new navigation api Index: gui_sdl_window.cpp =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/gui_sdl_window.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** gui_sdl_window.cpp 4 Jan 2008 16:19:20 -0000 1.44 --- gui_sdl_window.cpp 6 Jan 2008 16:02:15 -0000 1.45 *************** *** 98,104 **** using namespace CEGUI; ! ! struct navigation_list *list; ! list=navigation_list_new(nav); // First, ensure the navigation tip is visible. quick workaround for when resuming a destination --- 98,113 ---- using namespace CEGUI; ! ! struct map *map; ! struct map_rect *mr; ! ! if (! nav) ! return; ! map=navigation_get_map(nav); ! if (! map) ! return; ! mr=map_rect_new(map, NULL); ! if (! mr) ! return; // First, ensure the navigation tip is visible. quick workaround for when resuming a destination *************** *** 108,112 **** try { struct attr attr; ! item_attr_get(navigation_list_get_item(list), attr_navigation_speech, &attr); WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->setText((CEGUI::utf8*)(attr.u.str)); } --- 117,123 ---- try { struct attr attr; ! item_attr_get(map_rect_get_item(mr), attr_navigation_speech, &attr); ! map_rect_destroy(mr); ! mr=map_rect_new(map, NULL); WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->setText((CEGUI::utf8*)(attr.u.str)); } *************** *** 132,137 **** struct attr attr; ! list=navigation_list_new(nav); ! while ((item=navigation_list_get_item(list))) { mcl->addRow(); item_attr_get(item, attr_navigation_short, &attr); --- 143,147 ---- struct attr attr; ! while ((item=map_rect_get_item(mr))) { mcl->addRow(); item_attr_get(item, attr_navigation_short, &attr); *************** *** 140,144 **** mcl->setItem(itemListbox, 0, mcl->getRowCount()-1); } ! navigation_list_destroy(list); } catch (CEGUI::Exception& e) --- 150,154 ---- mcl->setItem(itemListbox, 0, mcl->getRowCount()-1); } ! map_rect_destroy(mr); } catch (CEGUI::Exception& e) |
From: Martin S. <mar...@us...> - 2008-01-05 22:46:17
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32464 Modified Files: attr.c item_def.h layout.c layout.h map.c map.h navit.c navit.xml route.c route.h transform.c transform.h xmlconfig.c Log Message: Add:Core:Added graph segments to route graph map Index: attr.c =================================================================== RCS file: /cvsroot/navit/navit/src/attr.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** attr.c 5 Jan 2008 20:04:21 -0000 1.14 --- attr.c 5 Jan 2008 22:46:19 -0000 1.15 *************** *** 115,118 **** --- 115,124 ---- enum attr_type type=attr->type; + if (type >= attr_type_item_begin && type <= attr_type_item_end) { + struct item *item=attr->u.item; + if (! item) + return g_strdup("(nil)"); + return g_strdup_printf("type=0x%x id=0x%x,0x%x map=%p (%s:%s)", item->type, item->id_hi, item->id_lo, item->map, item->map ? map_get_type(item->map) : "", item->map ? map_get_filename(item->map) : ""); + } if (type >= attr_type_string_begin && type <= attr_type_string_end) { if (map) { Index: navit.xml =================================================================== RCS file: /cvsroot/navit/navit/src/navit.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** navit.xml 5 Jan 2008 21:10:08 -0000 1.25 --- navit.xml 5 Jan 2008 22:46:19 -0000 1.26 *************** *** 817,822 **** <label label_size="5" /> </item> <item type="rg_point" order="0-"> ! <circle color="#FF089C" radius="10" /> </item> </layer> --- 817,825 ---- <label label_size="5" /> </item> + <item type="rg_segment" order="0-"> + <polyline color="#FF089C" width="1" /> + </item> <item type="rg_point" order="0-"> ! <circle color="#FF089C" radius="10" label_size="7" /> </item> </layer> Index: transform.h =================================================================== RCS file: /cvsroot/navit/navit/src/transform.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** transform.h 20 Dec 2007 21:17:44 -0000 1.10 --- transform.h 5 Jan 2008 22:46:19 -0000 1.11 *************** *** 16,19 **** --- 16,20 ---- void transform_to_geo(enum projection pro, struct coord *c, struct coord_geo *g); void transform_from_geo(enum projection pro, struct coord_geo *g, struct coord *c); + void transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to); int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int flags); void transform_reverse(struct transformation *t, struct point *p, struct coord *c); Index: route.h =================================================================== RCS file: /cvsroot/navit/navit/src/route.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** route.h 1 Jan 2008 22:13:02 -0000 1.17 --- route.h 5 Jan 2008 22:46:19 -0000 1.18 *************** *** 77,80 **** --- 77,81 ---- struct map *route_get_graph_map(struct route *route); void route_toggle_routegraph_display(struct route *route); + void route_set_projection(struct route *this_, enum projection pro); void route_init(void); /* end of prototypes */ Index: map.c =================================================================== RCS file: /cvsroot/navit/navit/src/map.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** map.c 28 Dec 2007 10:04:39 -0000 1.11 --- map.c 5 Jan 2008 22:46:19 -0000 1.12 *************** *** 99,102 **** --- 99,108 ---- void + map_set_projection(struct map *this_, enum projection pro) + { + this_->meth.pro=pro; + } + + void map_destroy(struct map *m) { Index: item_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/item_def.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** item_def.h 5 Jan 2008 16:12:19 -0000 1.15 --- item_def.h 5 Jan 2008 22:46:19 -0000 1.16 *************** *** 243,246 **** --- 243,247 ---- ITEM(marine_hazard) ITEM(roundabout) + ITEM(rg_segment) /* Area */ ITEM2(0xc0000000,area) Index: route.c =================================================================== RCS file: /cvsroot/navit/navit/src/route.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** route.c 4 Jan 2008 20:18:15 -0000 1.37 --- route.c 5 Jan 2008 22:46:19 -0000 1.38 *************** *** 1314,1317 **** --- 1314,1318 ---- struct map_rect_priv { struct route_info_handle *ri; + enum attr_type attr_next; int pos_next; int pos; *************** *** 1323,1327 **** struct route_path_segment *seg; struct route_graph_point *point; ! char *label; }; --- 1324,1329 ---- struct route_path_segment *seg; struct route_graph_point *point; ! struct route_graph_segment *rseg; ! char *str; }; *************** *** 1336,1339 **** --- 1338,1343 ---- rm_attr_rewind(void *priv_data) { + struct map_rect_priv *mr = priv_data; + mr->attr_next = attr_street_item; } *************** *** 1346,1349 **** --- 1350,1359 ---- attr->type=attr_type; switch (attr_type) { + case attr_any: + while (mr->attr_next != attr_none) { + if (rm_attr_get(priv_data, mr->attr_next, attr)) + return 1; + } + return 0; case attr_street_item: if (seg) *************** *** 1351,1354 **** --- 1361,1365 ---- else attr->u.item=mr->sitem; + mr->attr_next=attr_length; return 1; case attr_length: *************** *** 1357,1360 **** --- 1368,1372 ---- else attr->u.num=mr->length; + mr->attr_next=attr_time; return 1; case attr_time: *************** *** 1363,1366 **** --- 1375,1379 ---- else attr->u.num=route_time(route->speedlist, mr->sitem, mr->length); + mr->attr_next=attr_none; return 1; default: *************** *** 1423,1426 **** --- 1436,1446 ---- }; + static void + rp_attr_rewind(void *priv_data) + { + struct map_rect_priv *mr = priv_data; + mr->attr_next = attr_label; + } + static int rp_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) *************** *** 1428,1442 **** struct map_rect_priv *mr = priv_data; struct route_graph_point *p = mr->point; switch (attr_type) { ! case attr_any: ! case attr_label: ! attr->type = attr_label; ! if (mr->label) ! g_free(mr->label); ! mr->label=g_strdup_printf("x=%d y=%d", p->c.x, p->c.y); ! attr->u.str = mr->label; ! return 1; ! default: ! return 0; } } --- 1448,1477 ---- struct map_rect_priv *mr = priv_data; struct route_graph_point *p = mr->point; + if (mr->item.type != type_rg_point) + return 0; switch (attr_type) { ! case attr_any: ! while (mr->attr_next != attr_none) { ! if (rm_attr_get(priv_data, mr->attr_next, attr)) ! return 1; ! } ! case attr_label: ! attr->type = attr_label; ! if (mr->str) ! g_free(mr->str); ! mr->str=g_strdup_printf("%d", p->value); ! attr->u.str = mr->str; ! mr->attr_next=attr_none; ! return 1; ! case attr_debug: ! attr->type = attr_debug; ! if (mr->str) ! g_free(mr->str); ! mr->str=g_strdup_printf("x=%d y=%d", p->c.x, p->c.y); ! attr->u.str = mr->str; ! mr->attr_next=attr_none; ! return 1; ! default: ! return 0; } } *************** *** 1447,1455 **** struct map_rect_priv *mr = priv_data; struct route_graph_point *p = mr->point; int rc = 0,i; for (i=0; i < count; i++) { ! if (mr->last_coord >= 1) ! break; ! c[i] = p->c; mr->last_coord++; rc++; --- 1482,1500 ---- struct map_rect_priv *mr = priv_data; struct route_graph_point *p = mr->point; + struct route_graph_segment *seg = mr->rseg; int rc = 0,i; for (i=0; i < count; i++) { ! if (mr->item.type == type_rg_point) { ! if (mr->last_coord >= 1) ! break; ! c[i] = p->c; ! } else { ! if (mr->last_coord >= 2) ! break; ! if (mr->last_coord) ! c[i] = seg->end->c; ! else ! c[i] = seg->start->c; ! } mr->last_coord++; rc++; *************** *** 1461,1465 **** rm_coord_rewind, rp_coord_get, ! rm_attr_rewind, rp_attr_get, }; --- 1506,1510 ---- rm_coord_rewind, rp_coord_get, ! rp_attr_rewind, rp_attr_get, }; *************** *** 1487,1490 **** --- 1532,1538 ---- mr->pos_next=1; mr->sitem=&(route_get_pos(priv->route)->street->item); + mr->item.priv_data = mr; + mr->item.type = type_street_route; + mr->item.meth = &methods_route_item; if (mr->ri) { mr->length=route_info_length(route_get_pos(priv->route), route_get_dst(priv->route), 0); *************** *** 1506,1509 **** --- 1554,1560 ---- mr=g_new0(struct map_rect_priv, 1); mr->mpriv = priv; + mr->item.priv_data = mr; + mr->item.type = type_rg_point; + mr->item.meth = &methods_point_item; return mr; } *************** *** 1514,1519 **** if (mr->ri) route_info_close(mr->ri); ! if (mr->label) ! g_free(mr->label); g_free(mr); } --- 1565,1570 ---- if (mr->ri) route_info_close(mr->ri); ! if (mr->str) ! g_free(mr->str); g_free(mr); } *************** *** 1524,1545 **** struct route *r = mr->mpriv->route; struct route_graph_point *p = mr->point; ! if (!p) ! p = r->graph->route_points; else ! p = p->next; ! if (!p) ! return NULL; ! mr->point = p; ! mr->last_coord = 0; ! mr->item.id_hi = 0; ! mr->item.id_lo = 0; ! mr->item.map = NULL; ! mr->item.priv_data = mr; ! mr->item.type = type_rg_point; ! mr->item.meth = &methods_point_item; ! return &mr->item; } static struct item * rm_get_item(struct map_rect_priv *mr) --- 1575,1619 ---- struct route *r = mr->mpriv->route; struct route_graph_point *p = mr->point; + struct route_graph_segment *seg = mr->rseg; ! if (mr->item.type == type_rg_point) { ! if (!p) ! p = r->graph->route_points; ! else ! p = p->next; ! if (p) { ! mr->point = p; ! mr->item.id_lo++; ! rm_coord_rewind(mr); ! rp_attr_rewind(mr); ! return &mr->item; ! } else ! mr->item.type = type_rg_segment; ! } ! if (!seg) ! seg=r->graph->route_segments; else ! seg=seg->next; ! if (seg) { ! mr->rseg = seg; ! mr->item.id_lo++; ! rm_coord_rewind(mr); ! rp_attr_rewind(mr); ! return &mr->item; ! } ! return NULL; ! ! } ! ! static struct item * ! rp_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo) ! { ! struct item *ret=NULL; ! while (id_lo-- > 0) ! ret=rp_get_item(mr); ! return ret; } + static struct item * rm_get_item(struct map_rect_priv *mr) *************** *** 1576,1585 **** mr->seg = seg; mr->last_coord = 0; ! mr->item.id_hi = 0; ! mr->item.id_lo = 0; ! mr->item.map = NULL; ! mr->item.priv_data = mr; ! mr->item.type = type_street_route; ! mr->item.meth = &methods_route_item; return &mr->item; } --- 1650,1655 ---- mr->seg = seg; mr->last_coord = 0; ! mr->item.id_lo++; ! rm_attr_rewind(mr); return &mr->item; } *************** *** 1588,1593 **** rm_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo) { ! dbg(0,"called on Route map\n"); ! return NULL; } --- 1658,1665 ---- rm_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo) { ! struct item *ret=NULL; ! while (id_lo-- > 0) ! ret=rm_get_item(mr); ! return ret; } *************** *** 1612,1616 **** rm_rect_destroy, rp_get_item, ! rm_get_item_byid, NULL, NULL, --- 1684,1688 ---- rm_rect_destroy, rp_get_item, ! rp_get_item_byid, NULL, NULL, *************** *** 1684,1688 **** } ! void --- 1756,1763 ---- } ! void ! route_set_projection(struct route *this_, enum projection pro) ! { ! } void Index: transform.c =================================================================== RCS file: /cvsroot/navit/navit/src/transform.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** transform.c 21 Dec 2007 14:10:16 -0000 1.16 --- transform.c 5 Jan 2008 22:46:19 -0000 1.17 *************** *** 70,73 **** --- 70,81 ---- } + void + transform_from_to(struct coord *cfrom, enum projection from, struct coord *cto, enum projection to) + { + struct coord_geo g; + transform_to_geo(from, cfrom, &g); + transform_from_geo(to, &g, cto); + } + int transform(struct transformation *t, enum projection pro, struct coord *c, struct point *p, int count, int unique) Index: layout.c =================================================================== RCS file: /cvsroot/navit/navit/src/layout.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** layout.c 5 Jul 2007 16:15:42 -0000 1.3 --- layout.c 5 Jan 2008 22:46:19 -0000 1.4 *************** *** 67,71 **** struct element * ! polyline_new(struct color *color, int width) { struct element *e; --- 67,71 ---- struct element * ! polyline_new(struct color *color, int width, int directed) { struct element *e; *************** *** 75,78 **** --- 75,79 ---- e->color=*color; e->u.polyline.width=width; + e->u.polyline.directed=directed; return e; Index: map.h =================================================================== RCS file: /cvsroot/navit/navit/src/map.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** map.h 28 Dec 2007 10:04:39 -0000 1.12 --- map.h 5 Jan 2008 22:46:19 -0000 1.13 *************** *** 143,146 **** --- 143,147 ---- void map_convert_free(char *str); enum projection map_projection(struct map *this_); + void map_set_projection(struct map *this_, enum projection pro); void map_destroy(struct map *m); struct map_rect *map_rect_new(struct map *m, struct map_selection *sel); Index: xmlconfig.c =================================================================== RCS file: /cvsroot/navit/navit/src/xmlconfig.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** xmlconfig.c 3 Jan 2008 22:55:51 -0000 1.23 --- xmlconfig.c 5 Jan 2008 22:46:19 -0000 1.24 *************** *** 500,505 **** { struct color color; ! const char *width; ! int w=0; if (! find_color(state, 1, &color)) --- 500,505 ---- { struct color color; ! const char *width, *directed; ! int w=0,d=0; if (! find_color(state, 1, &color)) *************** *** 508,512 **** if (width) w=convert_number(width); ! state->element_object=polyline_new(&color, w); if (! state->element_object) return 0; --- 508,516 ---- if (width) w=convert_number(width); ! directed=find_attribute(state, "directed", 0); ! if (directed) ! d=convert_number(directed); ! ! state->element_object=polyline_new(&color, w, d); if (! state->element_object) return 0; Index: layout.h =================================================================== RCS file: /cvsroot/navit/navit/src/layout.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** layout.h 9 Oct 2007 16:48:34 -0000 1.4 --- layout.h 5 Jan 2008 22:46:19 -0000 1.5 *************** *** 17,20 **** --- 17,21 ---- struct element_polyline { int width; + int directed; } polyline; struct element_polygon { *************** *** 56,60 **** void itemtype_add_element(struct itemtype *itemtype, struct element *element); struct element *polygon_new(struct color *color); ! struct element *polyline_new(struct color *color, int width); struct element *circle_new(struct color *color, int radius, int width, int label_size); struct element *label_new(int label_size); --- 57,61 ---- void itemtype_add_element(struct itemtype *itemtype, struct element *element); struct element *polygon_new(struct color *color); ! struct element *polyline_new(struct color *color, int width, int directed); struct element *circle_new(struct color *color, int radius, int width, int label_size); struct element *label_new(int label_size); Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** navit.c 5 Jan 2008 20:04:22 -0000 1.71 --- navit.c 5 Jan 2008 22:46:19 -0000 1.72 *************** *** 1448,1451 **** --- 1448,1452 ---- { this_->route=route; + route_set_projection(route, transform_get_projection(this_->trans)); } |
From: andi <bod...@us...> - 2008-01-05 21:10:07
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26466 Modified Files: navit.xml Log Message: corrected track in navit.xml Index: navit.xml =================================================================== RCS file: /cvsroot/navit/navit/src/navit.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** navit.xml 5 Jan 2008 18:01:36 -0000 1.24 --- navit.xml 5 Jan 2008 21:10:08 -0000 1.25 *************** *** 437,441 **** <circle color="#000000" radius="3" label_size="15" /> </item> ! <item type="track" order="0-"> <polyline color="#3f3f3f" width="1" /> </item> --- 437,441 ---- <circle color="#000000" radius="3" label_size="15" /> </item> ! <item type="track" order="3-"> <polyline color="#3f3f3f" width="1" /> </item> |
From: Alexander A. <za...@us...> - 2008-01-05 21:02:02
|
Update of /cvsroot/navit/navit/src/xpm In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23411 Modified Files: Makefile.am Log Message: Fix:build breakage Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/xpm/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 5 Jan 2008 16:10:27 -0000 1.9 --- Makefile.am 5 Jan 2008 21:02:04 -0000 1.10 *************** *** 1,5 **** include $(top_srcdir)/Makefile.inc xpm_DATA = airport.xpm attraction.xpm bank.xpm bar.xpm bus.xpm camping.xpm car_dealer.xpm church.xpm cinema.xpm dumping-station.xpm fastfood.xpm firebrigade.xpm flag_bk_tr.xpm flag_bk_wh.xpm flag_bl_wh.xpm fuel.xpm golf.xpm highway_exit.xpm hospital.xpm hotel.xpm information.xpm library.xpm museum.xpm parking.xpm pharmacy.xpm picnic.xpm police.xpm post.xpm restaurant.xpm restroom.xpm skiing.xpm sports.xpm swimming.xpm telephone.xpm theater.xpm tower.xpm traffic_signals.xpm trailerpark.xpm unknown.xpm gc_tradi.xpm gc_multi.xpm gc_mystery.xpm gc_event.xpm ! gc_reference.xpm gc_webcam.xpm gc_question.xpm gc_stages.xpm EXTRA_DIST = $(xpm_DATA) #burgerking.ico: --- 1,5 ---- include $(top_srcdir)/Makefile.inc xpm_DATA = airport.xpm attraction.xpm bank.xpm bar.xpm bus.xpm camping.xpm car_dealer.xpm church.xpm cinema.xpm dumping-station.xpm fastfood.xpm firebrigade.xpm flag_bk_tr.xpm flag_bk_wh.xpm flag_bl_wh.xpm fuel.xpm golf.xpm highway_exit.xpm hospital.xpm hotel.xpm information.xpm library.xpm museum.xpm parking.xpm pharmacy.xpm picnic.xpm police.xpm post.xpm restaurant.xpm restroom.xpm skiing.xpm sports.xpm swimming.xpm telephone.xpm theater.xpm tower.xpm traffic_signals.xpm trailerpark.xpm unknown.xpm gc_tradi.xpm gc_multi.xpm gc_mystery.xpm gc_event.xpm ! xpm_DATA += gc_reference.xpm gc_webcam.xpm gc_question.xpm gc_stages.xpm EXTRA_DIST = $(xpm_DATA) #burgerking.ico: |
From: Martin S. <mar...@us...> - 2008-01-05 20:04:22
|
Update of /cvsroot/navit/navit/src/gui/gtk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31681/gui/gtk Modified Files: gui_gtk_statusbar.c Log Message: Fix:Core:Changed navigation to provide a map Index: gui_gtk_statusbar.c =================================================================== RCS file: /cvsroot/navit/navit/src/gui/gtk/gui_gtk_statusbar.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gui_gtk_statusbar.c 4 Jan 2008 21:42:07 -0000 1.7 --- gui_gtk_statusbar.c 5 Jan 2008 20:04:22 -0000 1.8 *************** *** 12,15 **** --- 12,16 ---- #include "transform.h" #include "navit.h" + #include "map.h" #include "navigation.h" #include "gui_gtk.h" *************** *** 62,74 **** static void ! statusbar_route_update(struct statusbar_priv *this, struct navit *nav, struct vehicle *v) { ! struct navigation *navig; ! struct navigation_list *list; ! struct item *item; struct attr attr; ! double route_len; time_t eta; ! struct tm *eta_tm; char buffer[128]; char *utf8; --- 63,76 ---- static void ! statusbar_route_update(struct statusbar_priv *this, struct navit *navit, struct vehicle *v) { ! struct navigation *nav=NULL; ! struct map *map=NULL; ! struct map_rect *mr=NULL; ! struct item *item=NULL; struct attr attr; ! double route_len=0; time_t eta; ! struct tm *eta_tm=NULL; char buffer[128]; char *utf8; *************** *** 81,102 **** int dir_idx; ! navig=navit_get_navigation(nav); ! if (! navig) ! return; ! list=navigation_list_new(navig); ! if (! list) ! return; ! item=navigation_list_get_item(list); ! if (! item) ! return; ! if (!item_attr_get(item, attr_destination_length, &attr)) ! return; ! route_len=attr.u.num; ! if (!item_attr_get(item, attr_destination_time, &attr)) ! return; ! eta=time(NULL)+attr.u.num/10; ! eta_tm=localtime(&eta); ! navigation_list_destroy(list); ! sprintf(buffer,"Route %4.0fkm %02d:%02d ETA",route_len/1000, eta_tm->tm_hour, eta_tm->tm_min); if (strcmp(buffer, this->route_text)) { strcpy(this->route_text, buffer); --- 83,105 ---- int dir_idx; ! if (navit) ! nav=navit_get_navigation(navit); ! if (nav) ! map=navigation_get_map(nav); ! if (map) ! mr=map_rect_new(map, NULL); ! if (mr) ! item=map_rect_get_item(mr); ! if (item) { ! if (item_attr_get(item, attr_destination_length, &attr)) ! route_len=attr.u.num; ! if (item_attr_get(item, attr_destination_time, &attr)) { ! eta=time(NULL)+attr.u.num/10; ! eta_tm=localtime(&eta); ! } ! } ! if (mr) ! map_rect_destroy(mr); ! sprintf(buffer,"Route %4.0fkm %02d:%02d ETA",route_len/1000, eta_tm ? eta_tm->tm_hour : 0 , eta_tm ? eta_tm->tm_min : 0); if (strcmp(buffer, this->route_text)) { strcpy(this->route_text, buffer); |
From: Martin S. <mar...@us...> - 2008-01-05 20:04:21
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31681 Modified Files: attr.c attr.h attr_def.h main.c navigation.c navigation.h navit.c popup.c Log Message: Fix:Core:Changed navigation to provide a map Index: navigation.h =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** navigation.h 9 Oct 2007 16:48:37 -0000 1.9 --- navigation.h 5 Jan 2008 20:04:22 -0000 1.10 *************** *** 17,27 **** void navigation_set_mapset(struct navigation *this_, struct mapset *ms); int navigation_set_announce(struct navigation *this_, enum item_type type, int *level); - struct navigation_list *navigation_list_new(struct navigation *this_); - struct item *navigation_list_get_item(struct navigation_list *this_); - void navigation_list_destroy(struct navigation_list *this_); void navigation_update(struct navigation *this_, struct route *route); void navigation_destroy(struct navigation *this_); int navigation_register_callback(struct navigation *this_, enum attr_type type, struct callback *cb); void navigation_unregister_callback(struct navigation *this_, enum attr_type type, struct callback *cb); /* end of prototypes */ #ifdef __cplusplus --- 17,26 ---- void navigation_set_mapset(struct navigation *this_, struct mapset *ms); int navigation_set_announce(struct navigation *this_, enum item_type type, int *level); void navigation_update(struct navigation *this_, struct route *route); void navigation_destroy(struct navigation *this_); int navigation_register_callback(struct navigation *this_, enum attr_type type, struct callback *cb); void navigation_unregister_callback(struct navigation *this_, enum attr_type type, struct callback *cb); + struct map * navigation_get_map(struct navigation *this_); + void navigation_init(void); /* end of prototypes */ #ifdef __cplusplus Index: attr.c =================================================================== RCS file: /cvsroot/navit/navit/src/attr.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** attr.c 1 Jan 2008 22:13:02 -0000 1.13 --- attr.c 5 Jan 2008 20:04:21 -0000 1.14 *************** *** 9,12 **** --- 9,13 ---- #include "color.h" #include "attr.h" + #include "map.h" struct attr_name { *************** *** 108,111 **** --- 109,131 ---- } + char * + attr_to_text(struct attr *attr, struct map *map, int pretty) + { + char *ret; + enum attr_type type=attr->type; + + if (type >= attr_type_string_begin && type <= attr_type_string_end) { + if (map) { + char *mstr=map_convert_string(map, attr->u.str); + ret=g_strdup(mstr); + } else + ret=g_strdup(attr->u.str); + return ret; + } + if (type >= attr_type_int_begin && type <= attr_type_int_end) + return g_strdup_printf("%d", attr->u.num); + return g_strdup("(no text)"); + } + struct attr * attr_search(struct attr **attrs, struct attr *last, enum attr_type attr) Index: attr.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** attr.h 28 Dec 2007 10:04:38 -0000 1.13 --- attr.h 5 Jan 2008 20:04:22 -0000 1.14 *************** *** 39,42 **** --- 39,43 ---- struct log *log; struct route *route; + struct navigation *navigation; } u; }; Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** navigation.c 4 Jan 2008 20:18:15 -0000 1.33 --- navigation.c 5 Jan 2008 20:04:22 -0000 1.34 *************** *** 17,20 **** --- 17,21 ---- #include "navit.h" #include "callback.h" + #include "plugin.h" #define _(STRING) gettext(STRING) *************** *** 22,25 **** --- 23,27 ---- struct navigation { struct mapset *ms; + struct map *map; struct item_hash *hash; struct navigation_itm *first; *************** *** 44,59 **** }; - struct navigation_list { - struct navigation *nav; - struct navigation_command *cmd; - struct navigation_command *cmd_next; - struct navigation_itm *itm; - struct navigation_itm *itm_next; - struct item item; - #if 0 - char *str; - #endif - }; - struct navigation * navigation_new(struct mapset *ms) --- 46,49 ---- *************** *** 466,543 **** } - static int - navigation_list_item_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) - { - struct navigation_list *this_=priv_data; - attr->type=attr_type; - switch(attr_type) { - case attr_navigation_short: - case attr_navigation_long: - case attr_navigation_long_exact: - case attr_navigation_speech: - attr->u.str=show_maneuver(this_->nav, this_->itm, this_->cmd, attr_type); - return 1; - case attr_length: - attr->u.num=this_->itm->dest_length-this_->cmd->itm->dest_length; - return 1; - case attr_time: - attr->u.num=this_->itm->dest_time-this_->cmd->itm->dest_time; - return 1; - case attr_destination_length: - attr->u.num=this_->itm->dest_length; - return 1; - case attr_destination_time: - attr->u.num=this_->itm->dest_time; - return 1; - default: - attr->type=attr_none; - return 0; - } - } - - struct item_methods navigation_list_item_methods = { - NULL, - NULL, - NULL, - navigation_list_item_attr_get, - }; - - - - struct navigation_list * - navigation_list_new(struct navigation *this_) - { - struct navigation_list *ret=g_new0(struct navigation_list, 1); - ret->nav=this_; - ret->cmd_next=this_->cmd_first; - ret->itm_next=this_->first; - ret->item.meth=&navigation_list_item_methods; - ret->item.priv_data=ret; - return ret; - } - - struct item * - navigation_list_get_item(struct navigation_list *this_) - { - if (!this_->cmd_next) - return NULL; - this_->cmd=this_->cmd_next; - this_->itm=this_->itm_next; - #if 0 - this_->str=show_maneuver(this_->nav, this_->itm, this_->cmd, mode); - #endif - this_->itm_next=this_->cmd->itm; - this_->cmd_next=this_->cmd->next; - - return &this_->item; - } - - - void - navigation_list_destroy(struct navigation_list *this_) - { - g_free(this_); - } - static void navigation_call_callbacks(struct navigation *this_, int force_speech) --- 456,459 ---- *************** *** 734,735 **** --- 650,795 ---- callback_list_remove_destroy(this_->callback, cb); } + + struct map * + navigation_get_map(struct navigation *this_) + { + struct attr navigation_attr={.type=attr_navigation,.u.navigation=this_}; + struct attr data_attr={.type=attr_data,.u.str=""}; + struct attr *attrs_navigation[]={&navigation_attr, &data_attr, NULL}; + + if (! this_->map) + this_->map=map_new("navigation",attrs_navigation); + return this_->map; + } + + struct map_priv { + struct navigation *navigation; + }; + + struct map_rect_priv { + struct navigation *nav; + struct navigation_command *cmd; + struct navigation_command *cmd_next; + struct navigation_itm *itm; + struct navigation_itm *itm_next; + struct item item; + }; + + static int + navigation_map_item_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) + { + struct map_rect_priv *this_=priv_data; + attr->type=attr_type; + switch(attr_type) { + case attr_navigation_short: + case attr_navigation_long: + case attr_navigation_long_exact: + case attr_navigation_speech: + attr->u.str=show_maneuver(this_->nav, this_->itm, this_->cmd, attr_type); + return 1; + case attr_length: + attr->u.num=this_->itm->dest_length-this_->cmd->itm->dest_length; + return 1; + case attr_time: + attr->u.num=this_->itm->dest_time-this_->cmd->itm->dest_time; + return 1; + case attr_destination_length: + attr->u.num=this_->itm->dest_length; + return 1; + case attr_destination_time: + attr->u.num=this_->itm->dest_time; + return 1; + default: + attr->type=attr_none; + return 0; + } + } + + static struct item_methods navigation_map_item_methods = { + NULL, + NULL, + NULL, + navigation_map_item_attr_get, + }; + + + static void + navigation_map_destroy(struct map_priv *priv) + { + g_free(priv); + } + + static struct map_rect_priv * + navigation_map_rect_new(struct map_priv *priv, struct map_selection *sel) + { + struct navigation *nav=priv->navigation; + struct map_rect_priv *ret=g_new0(struct map_rect_priv, 1); + ret->nav=nav; + ret->cmd_next=nav->cmd_first; + ret->itm_next=nav->first; + ret->item.meth=&navigation_map_item_methods; + ret->item.priv_data=ret; + return ret; + } + + static void + navigation_map_rect_destroy(struct map_rect_priv *priv) + { + g_free(priv); + } + + static struct item * + navigation_map_get_item(struct map_rect_priv *priv) + { + if (!priv->cmd_next) + return NULL; + priv->cmd=priv->cmd_next; + priv->itm=priv->itm_next; + priv->itm_next=priv->cmd->itm; + priv->cmd_next=priv->cmd->next; + + return &priv->item; + } + + static struct item * + navigation_map_get_item_byid(struct map_rect_priv *priv, int id_hi, int id_lo) + { + dbg(0,"stub"); + return NULL; + } + + static struct map_methods navigation_map_meth = { + projection_mg, + NULL, + navigation_map_destroy, + navigation_map_rect_new, + navigation_map_rect_destroy, + navigation_map_get_item, + navigation_map_get_item_byid, + NULL, + NULL, + NULL, + }; + + static struct map_priv * + navigation_map_new(struct map_methods *meth, struct attr **attrs) + { + struct map_priv *ret; + struct attr *navigation_attr; + + navigation_attr=attr_search(attrs, NULL, attr_navigation); + if (! navigation_attr) + return NULL; + ret=g_new0(struct map_priv, 1); + *meth=navigation_map_meth; + ret->navigation=navigation_attr->u.navigation; + + return ret; + } + + + void + navigation_init(void) + { + plugin_register_map_type("navigation", navigation_map_new); + } Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** attr_def.h 2 Jan 2008 00:16:25 -0000 1.24 --- attr_def.h 5 Jan 2008 20:04:22 -0000 1.25 *************** *** 102,104 **** --- 102,105 ---- ATTR(callback) ATTR(route) + ATTR(navigation) ATTR2(0x0008ffff,type_object_end) Index: popup.c =================================================================== RCS file: /cvsroot/navit/navit/src/popup.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** popup.c 26 Dec 2007 10:39:48 -0000 1.20 --- popup.c 5 Jan 2008 20:04:22 -0000 1.21 *************** *** 126,136 **** char *str; ! if (attr->type >= attr_type_int_begin && attr->type <= attr_type_int_end) ! popup_printf(menu, menu_type_menu, "%s: %d", attr_name, attr->u.num); ! else { ! str=map_convert_string(map, attr->u.str); ! popup_printf(menu, menu_type_menu, "%s: %s", attr_name, str); ! map_convert_free(str); ! } } --- 126,132 ---- char *str; ! str=attr_to_text(attr, map, 1); ! popup_printf(menu, menu_type_menu, "%s: %s", attr_name, str); ! g_free(str); } Index: main.c =================================================================== RCS file: /cvsroot/navit/navit/src/main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** main.c 4 Jan 2008 22:10:10 -0000 1.23 --- main.c 5 Jan 2008 20:04:22 -0000 1.24 *************** *** 20,23 **** --- 20,27 ---- #include "gui.h" #include "xmlconfig.h" + #include "item.h" + #include "coord.h" + #include "route.h" + #include "navigation.h" #define _(STRING) gettext(STRING) *************** *** 145,148 **** --- 149,153 ---- } route_init(); + navigation_init(); config_file=NULL; if (argc > 1) Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** navit.c 4 Jan 2008 20:18:15 -0000 1.70 --- navit.c 5 Jan 2008 20:04:22 -0000 1.71 *************** *** 777,789 **** { struct navigation *nav=this_->navigation; ! struct navigation_list *list; struct item *item; struct attr attr; ! list=navigation_list_new(nav); ! item=navigation_list_get_item(list); ! if (item_attr_get(item, attr_navigation_speech, &attr)) ! speech_say(this_->speech, attr.u.str); ! navigation_list_destroy(list); } --- 777,795 ---- { struct navigation *nav=this_->navigation; ! struct map *map=NULL; ! struct map_rect *mr=NULL; struct item *item; struct attr attr; ! if (nav) ! map=navigation_get_map(nav); ! if (map) ! mr=map_rect_new(map, NULL); ! if (mr) { ! item=map_rect_get_item(mr); ! if (item && item_attr_get(item, attr_navigation_speech, &attr)) ! speech_say(this_->speech, attr.u.str); ! map_rect_destroy(mr); ! } } *************** *** 792,796 **** { struct navigation *nav=this_->navigation; ! struct navigation_list *list; struct item *item; struct attr attr; --- 798,803 ---- { struct navigation *nav=this_->navigation; ! struct map *map=NULL; ! struct map_rect *mr=NULL; struct item *item; struct attr attr; *************** *** 798,836 **** int secs; ! dbg(1,"enter\n"); datawindow_mode(this_->roadbook_window, 1); ! list=navigation_list_new(nav); ! while ((item=navigation_list_get_item(list))) { ! attr.u.str=NULL; ! item_attr_get(item, attr_navigation_long, &attr); ! dbg(2, "Command='%s'\n", attr.u.str); ! param[0].name=_("Command"); ! param[0].value=g_strdup(attr.u.str); ! item_attr_get(item, attr_length, &attr); ! dbg(2, "Length=%d\n", attr.u.num); ! param[1].name=_("Length"); ! param[1].value=g_strdup_printf("%d m",attr.u.num); ! item_attr_get(item, attr_time, &attr); ! dbg(2, "Time=%d\n", attr.u.num); ! secs=attr.u.num/10; ! param[2].name=_("Time"); ! param[2].value=g_strdup_printf("%d:%d",secs / 60, secs % 60); ! item_attr_get(item, attr_destination_length, &attr); ! dbg(2, "Destlength=%d\n", attr.u.num); ! param[3].name=_("Destination Length"); ! param[3].value=g_strdup_printf("%d m",attr.u.num); ! item_attr_get(item, attr_destination_time, &attr); ! dbg(2, "Desttime=%d\n", attr.u.num); ! secs=attr.u.num/10; ! param[4].name=_("Destination Time"); ! param[4].value=g_strdup_printf("%d:%d",secs / 60, secs % 60); ! datawindow_add(this_->roadbook_window, param, 5); } - navigation_list_destroy(list); datawindow_mode(this_->roadbook_window, 0); } --- 805,851 ---- int secs; ! dbg(1,"enter\n"); datawindow_mode(this_->roadbook_window, 1); ! if (nav) ! map=navigation_get_map(nav); ! if (map) ! mr=map_rect_new(map, NULL); ! dbg(0,"nav=%p map=%p mr=%p\n", nav, map, mr); ! if (mr) { ! dbg(0,"while loop\n"); ! while ((item=map_rect_get_item(mr))) { ! dbg(0,"item=%p\n", item); ! attr.u.str=NULL; ! item_attr_get(item, attr_navigation_long, &attr); ! dbg(2, "Command='%s'\n", attr.u.str); ! param[0].name=_("Command"); ! param[0].value=g_strdup(attr.u.str); ! item_attr_get(item, attr_length, &attr); ! dbg(2, "Length=%d\n", attr.u.num); ! param[1].name=_("Length"); ! param[1].value=g_strdup_printf("%d m",attr.u.num); ! item_attr_get(item, attr_time, &attr); ! dbg(2, "Time=%d\n", attr.u.num); ! secs=attr.u.num/10; ! param[2].name=_("Time"); ! param[2].value=g_strdup_printf("%d:%d",secs / 60, secs % 60); ! item_attr_get(item, attr_destination_length, &attr); ! dbg(2, "Destlength=%d\n", attr.u.num); ! param[3].name=_("Destination Length"); ! param[3].value=g_strdup_printf("%d m",attr.u.num); ! item_attr_get(item, attr_destination_time, &attr); ! dbg(2, "Desttime=%d\n", attr.u.num); ! secs=attr.u.num/10; ! param[4].name=_("Destination Time"); ! param[4].value=g_strdup_printf("%d:%d",secs / 60, secs % 60); ! datawindow_add(this_->roadbook_window, param, 5); ! } ! map_rect_destroy(mr); } datawindow_mode(this_->roadbook_window, 0); } *************** *** 1074,1079 **** if (this_->tracking) tracking_set_mapset(this_->tracking, ms); ! if (this_->navigation) navigation_set_mapset(this_->navigation, ms); if (this_->menubar) { men=menu_add(this_->menubar, _("Map"), menu_type_submenu, NULL); --- 1089,1099 ---- if (this_->tracking) tracking_set_mapset(this_->tracking, ms); ! if (this_->navigation) { ! if ((map=navigation_get_map(this_->navigation))) { ! mapset_add(ms, map); ! map_set_active(map, 0); ! } navigation_set_mapset(this_->navigation, ms); + } if (this_->menubar) { men=menu_add(this_->menubar, _("Map"), menu_type_submenu, NULL); |
From: andi <bod...@us...> - 2008-01-05 19:40:41
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21564/src Added Files: config.h.in Log Message: Corrected build --- NEW FILE: config.h.in --- /* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `expat' library (-lexpat). */ #undef HAVE_LIBEXPAT /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `proj' library (-lproj). */ #undef HAVE_LIBPROJ /* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your <sys/time.h> declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc |
From: andi <bod...@us...> - 2008-01-05 19:40:41
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21564 Modified Files: configure.ac Log Message: Corrected build Index: configure.ac =================================================================== RCS file: /cvsroot/navit/navit/src/tools/gpx2navit_txt/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** configure.ac 5 Jan 2008 18:21:25 -0000 1.1 --- configure.ac 5 Jan 2008 19:40:43 -0000 1.2 *************** *** 26,29 **** --- 26,30 ---- # Checks for libraries. AC_CHECK_LIB(proj, pj_param) + AC_CHECK_LIB(proj, pj_init, [], [ echo "Error you need lib proj4" && exit -1]) AC_CHECK_LIB(expat, XML_SetUserData) AC_CHECK_LIB(m, cos) |
From: andi <bod...@us...> - 2008-01-05 18:21:27
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/man In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15298/man Added Files: Makefile.am gpx2navit_txt.1 Log Message: added gpx2navit --- NEW FILE: Makefile.am --- man_MANS = gpx2navit_txt.1 EXTRA_DIST = $(man_MANS) --- NEW FILE: gpx2navit_txt.1 --- .\" .TH "gpx2navit_txt" "1" "0.1" "bodenseepingu" "" .SH "NAME" gpx2navit_txt \- Convert GPX files to navit txt files .SH "SYNOPSIS" gpx2navit_txt [options] [\-o output file] gpxfile .SH "DESCRIPTION" gpx2navit_txt is a converter from GPX file to navit txt file The original gpx2shp was used for that program. This is a output of Metro Manila Transit Map Project by JOCV (Japan Overseas Cooperation Volunteers) program of JICA (Japan International Cooperation Agency) in 2004. It is provided you on GPL2. .SH "OPTIONS" .TP .B \-o, \-\-output Sets output basename. The default is (source file name) \- (extention name) .TP .B \-w, \-\-waypoints Converts only waypoints data from a gpx file. .TP .B \-t, \-\-trackpoints Converts only trackpoints data from a gpx file. .TP .B \-r, \-\-routes Converts only routes data from a gpx file. .TP .B \-a, \-\-all Converts all types of data from a gpx file.(default) .TP .B \-e, \-\-as\-edge Makes a separated output by each edges. .TP .B \-p, \-\-as\-point Makes a separated output by each points. .TP .B \-s, \-\-stats Shows simple statistics of the outputs. .TP .B \-b, \-\-basic\-columns Stores only basic data as attribures to reduce memory and storage usage. (ele, name, cmt, type, time, fix, sym and number). .TP .B \-L, \-\-no\-length Removes length column from a waypoint or trackpoint attribute table. .TP .B \-S, \-\-no\-speed Removes speed column from a waypoint or trackpoint attribute table. .TP .B \-T, \-\-no\-time Removes time column from an attribute table. .TP .B \-g, \-\-gpxline Adds line number of GPX file as attribures. .TP .B \-f, \-\-fast Make it faster without any checks. .TP .B \-3, \-\-3d Converts data using 3d format. (It's not compatible for Arcview 3.x.) .TP .B \-\-min\-points Sets path minimum points to convert for noise reduction. Default is 2. .TP .B \-\-min\-length Sets path minimum length to convert for noise reduction. Default is 0. .TP .B \-\-min\-time Sets path minimum time period to convert for noise reduction. Default is 0. .TP .B \-\-length\-unit Sets length unit from m,km,feet,mi and etc. The default is m. You can see the unit list from "geod \-lu" command. .TP .B \-\-time\-unit Sets time unit. The default is sec. You can set from day, hour, min and sec. .TP .B \-\-speed\-length\-unit Sets length unit for speed. The default is km. You can see the unit list from "geod \-lu" command. .TP .B \-\-speed\-time\-unit Sets time unit for speed calulation. Default is hour. You can set from day, hour, min and sec. .TP .B \-\-length\-ellipsoid Sets length ellipsoid like UGS84, clrk66. The default is UGS84. You can see the unit list from "geod \-le" command. .TP .B \-v, \-\-verbose Gives many messages. .TP .B \-\-version Shows version. .TP .B \-h, \-\-help Shows this list. .SH "AUTHORS" Toshihiro Hiraoka .br Petter Reinholdtsen .SH "BUGS or OPINIONS" Please e\-mail your bugs or opinions to .br washitoshi at yahoo.co.jp .SH "SEE ALSO" gpx2shp / gps2shp homepage .br http://gpx2shp.sourceforge.jp |
From: andi <bod...@us...> - 2008-01-05 18:21:27
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/develop In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15298/develop Added Files: structures.gif Log Message: added gpx2navit --- NEW FILE: structures.gif --- (This appears to be a binary file; contents omitted.) |
From: andi <bod...@us...> - 2008-01-05 18:21:26
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15298 Added Files: AUTHORS COPYING ChangeLog INSTALL Makefile.am NEWS README TODO config.guess config.sub configure.ac depcomp install-sh missing mkinstalldirs pinatest2.gpx Log Message: added gpx2navit --- NEW FILE: mkinstalldirs --- #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <fri...@pr...> # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here --- NEW FILE: COPYING --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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., 59 Temple Place - Suite 330, Boston, MA 02111 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. --- NEW FILE: missing --- #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pi...@ir...>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 --- NEW FILE: pinatest2.gpx --- <?xml version="1.0"?> <gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="Toshihiro Hiraoka" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> <metadata> <name>Manila to Mt. Pinatubo</name> <copyright>Toshihiro Hiraoka</copyright> <author>Toshihiro Hiraoka</author> <keyword>Manila Mt. Pinatubo gpx2shp</keyword> <link>http://gpx2shp.sourceforge.jp</link> <description>This is test data for gpx2shp.</description> <time>2004-12-29T08:23:55Z</time> </metadata> <trk> <name>07-SEP-04</name> <number>1</number> <trkseg> <trkpt lat="14.585381" lon="121.056118"> <ele>42.916016</ele> <time>2004-09-06T15:35:56Z</time> </trkpt> [...4751 lines suppressed...] <name>GRMPHX</name> <cmt>GRMPHX</cmt> <desc>GRMPHX</desc> <sym>Flag</sym> </wpt> <wpt lat="25.061783362" lon="121.640266674"> <ele>38.097656</ele> <name>GRMTWN</name> <cmt>GRMTWN</cmt> <desc>GRMTWN</desc> <sym>Flag</sym> </wpt> <wpt lat="14.636060139" lon="121.043607602"> <ele>8.296997</ele> <name>NEDA4</name> <cmt>NEDA4</cmt> <desc>NEDA4</desc> <sym>Residence</sym> </wpt> </gpx> --- NEW FILE: ChangeLog --- 0.1 new version gpx2navit_txt 0.69 by Petter Reinholdsen - Add configure option "--enable-coverage". - Add few check targets. - Patch for compile warning in DBFWriteAttribute(). - Patch for compile warning in createParseData(). by Toshihiro Hiraoka - Bug (Debian Bug #292514: Segfaults when called only with -v) fix - Delete few unused functions from utils.c 0.68-1 ====== by Petter Reinholdtsen - New debian package gpx2shp_0.68-1_i386.deb. - Update debian releted files. debian/watch, control, changelog - Delete src/configure.ac. - Delete libz check entry from configure.ac. --- NEW FILE: config.guess --- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. timestamp='2004-11-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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 [...1414 lines suppressed...] /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: config.sub --- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. timestamp='2004-11-30' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # 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 [...1527 lines suppressed...] -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: configure.ac --- # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(gpx2shp, 0.69, kogame at gmail.com) AM_INIT_AUTOMAKE(gpx2shp, 0.69) AC_CONFIG_SRCDIR(src/main.c) AM_CONFIG_HEADER(src/config.h) # Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET # Ask GCC to give us heaps of warnings if eval "test x$GCC = xyes"; then CFLAGS="$CFLAGS -W -Wall -Wcast-align -Wcast-qual" CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes" CFLAGS="$CFLAGS -Wstrict-prototypes -Wpointer-arith -Wreturn-type" AC_SUBST(CFLAGS) fi AC_ARG_ENABLE(coverage, [ --enable-coverage compile with coverage testing enabled], CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage") # Checks for libraries. AC_CHECK_LIB(proj, pj_param) AC_CHECK_LIB(expat, XML_SetUserData) AC_CHECK_LIB(m, cos) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(limits.h stdlib.h string.h unistd.h) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_STRUCT_TM # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_MKTIME AC_FUNC_REALLOC AC_CHECK_FUNCS(memset sqrt) AC_CONFIG_FILES(Makefile src/Makefile man/Makefile) AC_OUTPUT --- NEW FILE: Makefile.am --- SUBDIRS = src man EXTRA_DIST = gps2shp pinatest2.gpx debian develop debian-dist: dpkg-buildpackage -rfakeroot -d -tc -us -uc CLEANFILES = \ pinatest2_wpt.shx \ pinatest2_wpt.shp \ pinatest2_wpt.dbf \ pinatest2_trk.shx \ pinatest2_trk.shp \ pinatest2_trk.dbf \ pinatest2_rte.shx \ pinatest2_rte.shp \ pinatest2_rte.dbf \ pinatest2_meta.txt GPX2SHP=src/gpx2shp check: $(GPX2SHP) $(GPX2SHP) || true $(GPX2SHP) --version $(GPX2SHP) -s pinatest2.gpx $(GPX2SHP) -e pinatest2.gpx $(GPX2SHP) -p pinatest2.gpx $(GPX2SHP) -v pinatest2.gpx > /dev/null --- NEW FILE: depcomp --- #! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <ol...@dc...>. if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 --- NEW FILE: INSTALL --- Requirements ============== - proj >ver4.0 - expat >ver2.0 - gpsbabel If you want to convert from GPS to shp directory but the future is not stable yet. Installation ============== It's not special. Just type below like others. ./configure make su make install gpx2navit_txt image will be at /usr/local/bin. --- NEW FILE: NEWS --- 0.69 ==== by Petter Reinholdtsen - Add compile check options - Compile warning fixes by Toshihiro Hiraoka - Bug fix 0.68-1 ====== by Petter Reinholdtsen - Add debian files by Susumu Murakami - RPM package for Vine 3.1 0.68 ==== by Toshihiro Hiraoka - Change XML parser from libxml2 to expat for big file support - Remake almost all strucutes. - Rewrite almost all sources. - Add three path check options --min-points, --min-length and --min-time to reduce the noise. - Add -b, --basix-columns option - Add -g, --gpxline option - Add -f, --fast option - README - AUTHORS - Change comment style to javadoc style. - Structures flow - Error code 0.65-1 ====== by Petter Reinholdtsen - Add some debian missing files. - Added config.sub and config.guess. - debian package available now! by Toshihiro Hiraoka - Stop to use strange version number. 0.65a ===== by Petter Reinholdtsen - Add configure script etc. - Get rid of some warnings about loosing the 'const'-ness of the variable. - Remove unused include <math.h>. - Add include to find prototype for geod_set(). - Fix handling of output filename, to make sure it handles './foo.gpx' (used to give random filename). - Correct the prototype of closeFiles(). - Add files in debian/ to make debian package. This is just a framework, and need more work. The package description and a lot of the support files are from the dh-make package, and should be edited or removed. To build the package, run debuild from the devscripts package. - Solve some memory leaks and complaints. by Toshihiro Hiraoka - Restruct directory - Add many prototypes etc. --- NEW FILE: README --- ============== gpx2navit_txt README ============== bodenseepingu 4/01/2008 What's This =========== gpx2navit_txt is a converter from GPX file to Navit Text map format For gpx2navit_txt was the original code from gpx2shp used and modified. This is a output of Metro Manila Transit Map Project by JOCV (Japan Overseas Cooperation Volunteers) program of JICA (Japan International Cooperation Agency in 2004. It is provided you on GPL2. How to Use ========== - Basic There are three types of data on GPX that are waypoint, trkpoint and route. gpx2navit_txt converts the data to navit file(s) Please try to convert a sample file "pinatest2.gpx" in this archive. prompt> gpx2navit_txt pinatest2.gpx prompt> ls pinatest2.gpx (source gpx) pinatest2_meta.txt (meta data may be there) You can convert only a certain type of data like only waypoint or track point using option '-w' (waypoint), '-t' (trackpoint) or '-r' (route). prompt> gpx2navit_txt -r pinatest2.gpx - Convert path data to points and etc As default, track point and route data is converted as a arc data but you can convert it other ways using option '-p'(convert as point) and '-e' (as edge). The edge file has '_edg' in the filename and the point file has '_pnt' in the filename. prompt> gpx2navit_txt -p -e pinatest2.gpx - Statistics If you add '-s' option you can see a conversion summery. prompt> gpx2navit_txt -s pinatest2.gpx Track Points: track count: 4 point count: 658 total length: 156565.627989 unconverted: 0( 0.00%) Routes: route count: 1 point count: 323 total length: 9258.618971 unconverted: 0( 0.00%) Waypoints: point count: 118 - Noise reduction gpx2navit_txt has several thresholds to reduct the noise path data. The value can set as '--min-points', '--min-length' and '--min-time'. Please try a example below. prompt> gpx2navit_txt --min-points 6 -s pinatest2.gpx gpx2navit_txt:../pinatest3.gpx:3962 track was not converted because of less then 6 points. (<- this path is not converted because the path has only 5 points) Track Points: track count: 3 point count: 653 total length: 156439.490642 unconverted: 1(25.00%) Routes: route count: 1 point count: 323 total length: 9258.618971 unconverted: 0( 0.00%) Waypoints: point count: 118 - Length and time units You can choose any length related units that are supported by proj4 for attribute table using '--length-unit' (for length column, default: m), '--time-unit' (for time column, default: sec), '--speed-length-unit' (for speed column, default: km), '--speed-time-unit' (for speed column, default: hour) and '--length-ellipsoid' (for length calculation, default: UGS84). You can see the supported units by 'geod -lu' and 'geod -le' command. Supported time unit are 'sec', 'min', 'hour' and 'day'. - Other futures There are other futures in gpx2navit_txt. Please check the option list using gpx2navit_txt --help Problem or Suggestion ===================== Please let me know about your opinion in English by e-mail. bodenseepingu at users.sourceforge.net navit on sourceforge.net http://gpx2shp.sourceforge.jp/ for original gpx2shp todo for gpx2navit_txt Acknowledgments =============== NEDA (National Economic and Development Authority) Region IV-B office My generous counter part Yoshio Tanaka My project leader gpx2shp Petter Reinholdtsen Many support to develop this Frank Warmerdam and the team shapelib and proj4 bodenseepingu for modifications towards navit --- NEW FILE: install-sh --- #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 --- NEW FILE: AUTHORS --- AUTHORS ======== Toshihiro Hiraoka <washitoshi a... [truncated message content] |
From: andi <bod...@us...> - 2008-01-05 18:20:20
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14766 Added Files: Makefile.am elementControl.c emess.h errorcode.h geod_for.c geod_inv.c geod_set.c geodesic.h gpx2navit_txt.h main.c misc.c parser.c setmeta.c setpath.c setwpt.c utils.c Log Message: added gpx2navit --- NEW FILE: setpath.c --- #include "gpx2navit_txt.h" void initPathAttr(pathattr * pattr, g2sattr * attr); void setEdge(parsedata * pdata, double _x, double _y, double _z, double length, double interval, double speed); void setPathInterval(parsedata * pdata); void setPathData(pathattr * pattr, g2sattr * attr); void countUnconverted(parsedata * pdata); void countPath(parsedata * pdata); int checkPath(parsedata * pdata); void setPath( parsedata * pdata); /** * initialize a path attribute */ void initPathAttr(pathattr * pattr, g2sattr * attr) { strcpy(pattr->name, attr->name); strcpy(pattr->cmt, attr->cmt); strcpy(pattr->desc, attr->desc); strcpy(pattr->src, attr->src); strcpy(pattr->link, attr->link); pattr->number = attr->number; strcpy(pattr->type, attr->type); pattr->length = 0; pattr->interval = 0; pattr->speed = 0; pattr->count = 0; pattr->point = NULL; } /** * set edge data and store it */ void setEdge(parsedata * pdata, double _x, double _y, double _z, double length, double interval, double speed) { pathattr *pattr = pdata->pattr; static int isFirstTrkAsEdge = 1; static int isFirstRteAsEdge = 1; double x[2], y[2], z[2]; double _length, _interval, _speed; if (!strcmp(pdata->current->name, "trkpt")) { if (isFirstTrkAsEdge) { isFirstTrkAsEdge = 0; } } else { if (isFirstRteAsEdge) { isFirstRteAsEdge = 0; } } _length = pattr->length; _interval = pattr->interval; _speed = pattr->speed; pattr->length = length; pattr->interval = interval; pattr->speed = speed; x[0] = _x; y[0] = _y; z[0] = _z; x[1] = pdata->attr->lon; y[1] = pdata->attr->lat; z[1] = pdata->attr->ele; if (pdata->prop->is3d) { } else { } pattr->length = _length; pattr->interval = _interval; pattr->speed = _speed; } /** * sets interval data between two track points */ void setPathInterval(parsedata * pdata) { pathattr *pattr = pdata->pattr; g2sattr *attr = pdata->attr; g2sprop *prop = pdata->prop; static char _t[TIMELENGTH]; double intvl = 0; static double _x, _y, _z; double leng = 0; double spd; if (pattr->count == 1) { strcpy(_t, attr->time); } else { /* time interval */ intvl = getTimeInterval(_t, attr->time); pattr->interval = pattr->interval + intvl; strcpy(_t, attr->time); /* length interval */ leng = getDistance(_x, _y, attr->lon, attr->lat); pattr->length = pattr->length + leng; /* interval speed */ spd = getSpeed(leng, intvl, prop->speed2meter, prop->speed2sec); /* sets edge data */ if (prop->isEdge) { setEdge(pdata, _x, _y, _z, leng, intvl, spd); } } _x = attr->lon; _y = attr->lat; _z = attr->ele; } /** * sets each track point data in array. */ void setPathData(pathattr * pattr, g2sattr * attr) { const int reallocsize = 100; if (pattr->count == 0) { pattr->point = malloc(sizeof(double) * 3 * reallocsize); } if ((pattr->count % reallocsize) == 0) { pattr->point = realloc(pattr->point, sizeof(double) * 3 * (pattr->count + reallocsize)); } pattr->point[pattr->count * 3] = attr->lon; pattr->point[pattr->count * 3 + 1] = attr->lat; pattr->point[pattr->count * 3 + 2] = attr->ele; pattr->count++; } /** * counts paths that wasn't converted */ void countUnconverted(parsedata * pdata) { g2sstats *stats = pdata->prop->stats; if (!strcmp(pdata->current->name, "trkseg")) stats->trkunconverted++; else stats->rteunconverted++; } /** * counts paths */ void countPath(parsedata * pdata) { g2sstats *stats = pdata->prop->stats; pathattr *pattr = pdata->pattr; if (!strcmp(pdata->current->name, "trkseg")) { stats->trkcount++; stats->trklength += pattr->length; stats->trkpoints += pattr->count; } else { stats->rtecount++; stats->rtelength += pattr->length; stats->rtepoints += pattr->count; } } int checkPath(parsedata * pdata) { pathattr *pattr = pdata->pattr; g2sprop *prop = pdata->prop; /* check point count. */ if (pattr->count < prop->minpoints) { fprintf (stderr, "gpx2navit_txt:%s:%i track was not converted because of less then %d points. \n", prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser), prop->minpoints); countUnconverted(pdata); return 0; /* check path length */ } else if (pattr->length < prop->minlength * prop->length2meter) { fprintf (stderr, "gpx2navit_txt:%s:%i track was not converted because it is shorter than %dm.\n", prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser), prop->minlength); countUnconverted(pdata); return 0; /* check path time */ } else if (pattr->interval < prop->mintime * prop->time2sec) { fprintf (stderr, "gpx2navit_txt:%s:%i track was not converted because it is shorter than %d sed.\n", prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser), prop->mintime); countUnconverted(pdata); return 0; /* check path speed */ } else if (pattr->speed == .0) { fprintf (stderr, "gpx2navit_txt:%s:%i track was not converted because no move recorded.\n", prop->sourcefile, XML_GetCurrentLineNumber(pdata->parser)); countUnconverted(pdata); return 0; } return 1; } /** * saves path data into files. */ void setPath( parsedata * pdata) { pathattr *pattr = pdata->pattr; g2sprop *prop = pdata->prop; int isOk = 0; pattr->speed = getSpeed(pattr->length, pattr->interval, prop->speed2meter, prop->speed2sec); if (prop->isFast) { isOk = 1; } else { isOk = checkPath(pdata); } if (isOk) { double x[pattr->count]; double y[pattr->count]; double z[pattr->count]; int i; fprintf(pdata->fp,"type=track label=\"%s\" desc=\"%s\" type=\"%s\"\ length=\"%5.3f\" count=\"%5d\"\n" ,pdata->pattr->name,pdata->pattr->desc, pdata->pattr->type,pdata->pattr->length, pdata->pattr->count); for (i = 0; i < pattr->count; i++) { x[i] = pattr->point[i * 3]; y[i] = pattr->point[i * 3 + 1]; z[i] = pattr->point[i * 3 + 2]; fprintf(pdata->fp,"%3.6f %4.6f\n",x[i],y[i]); } if (pdata->prop->is3d) { } else { } countPath(pdata); } free(pattr->point); } --- NEW FILE: emess.h --- /* Error message processing header file */ #ifndef EMESS_H #define EMESS_H #ifndef lint /*static char EMESS_H_ID[] = "@(#)emess.h 4.1 93/03/08 GIE REL";*/ #endif struct EMESS { char *File_name, /* input file name */ *Prog_name; /* name of program */ int File_line; /* approximate line read where error occured */ }; #ifdef EMESS_ROUTINE /* use type */ /* for emess procedure */ struct EMESS emess_dat = { (char *)0, (char *)0, 0 }; #ifdef sun /* Archaic SunOs 4.1.1, etc. */ extern char *sys_errlist[]; #define strerror(n) (sys_errlist[n]) #endif #else /* for for calling procedures */ extern struct EMESS emess_dat; void emess(int, char *, ...); #endif /* use type */ #endif /* end EMESS_H */ --- NEW FILE: setwpt.c --- #include "gpx2navit_txt.h" void setWpt(parsedata * pdata); /** * save point objects in *_wpt or *_pnt file */ void setWpt( parsedata * pdata) { double x[1], y[1], z[1]; x[0] = pdata->attr->lon; y[0] = pdata->attr->lat; z[0] = pdata->attr->ele; if (pdata->prop->is3d) { //nothing at the moment } else { //do not know if i will change something here } // Write attributes to file first line waypoint-info, second line coords char poi_type[20]="poi_attraction"; if (!strcmp(pdata->attr->type,"Geocache|Traditional Cache")) strcpy(poi_type,"poi_gc_tradi"); if (!strcmp(pdata->attr->type,"Geocache|Multi-cache")) strcpy(poi_type,"poi_gc_multi"); if (!strcmp(pdata->attr->type,"Geocache|Unknown Cache")) strcpy(poi_type,"poi_gc_mystery"); if (!strcmp(pdata->attr->type,"Geocache|Event Cache")) strcpy(poi_type,"poi_gc_event"); if (!strcmp(pdata->attr->type,"Geocache")) //for OC strcpy(poi_type,"poi_gc_tradi"); if (!strcmp(pdata->attr->type,"Waypoint|Parking Area")) strcpy(poi_type,"poi_car_parking"); if (!strcmp(pdata->attr->type,"Waypoint|Question to Answer")) strcpy(poi_type,"poi_gc_question"); if (!strcmp(pdata->attr->type,"Waypoint|Reference Point")) strcpy(poi_type,"poi_gc_reference"); if (!strcmp(pdata->attr->type,"Waypoint|Stages of a Multicache")) strcpy(poi_type,"poi_gc_stages"); //generate the file fprintf(pdata->fp,"type=%s label=\"%s\" desc=\"%s\" gc_type=\"%s\"\n", poi_type,pdata->attr->name,pdata->attr->desc,pdata->attr->type); fprintf(pdata->fp,"%3.6f %4.6f\n",x[0],y[0]); //writeWptAttribute(hDBF, pdata, iShape); if (!strcmp(pdata->current->name, "wpt")) { pdata->prop->stats->wptpoints++; } return; } --- NEW FILE: misc.c --- #include "gpx2navit_txt.h" void failToWriteAttrRep(int iShape, int col, char *file, int line); void showStats(g2sprop * prop); void wipePathAttr(pathattr * pattr); pathattr *createPathAttr(void); void wipeAttr(g2sattr * attr); void setColsDefault(g2scolumns * cols); g2scolumns *createCols(void); g2sattr *createAttr(void); g2sprop *createProp(void); void closeProp(g2sprop * prop); //shphandles *createShps(void); //dbfhandles *createDbfs(void); parsedata *createParsedata(XML_Parser parser, g2sprop * prop); void closeParsedata(parsedata * pdata); /** * message when fail to write attribute */ void failToWriteAttrRep(int iShape, int col, char *file, int line) { printf("Fail to write a attribute at %s:%i. shapeid:%i col:%i\n", file, line, iShape, col); } /** * shows short statistics */ void showStats(g2sprop * prop) { g2sstats *stats = prop->stats; double ratio; if (prop->needsStats) { if (prop->parseTrk) { if (stats->trkunconverted != 0) { ratio = (double) stats->trkunconverted / (stats->trkcount + stats-> trkunconverted) * 100; } else { ratio = 0; } printf("Track Points:\n"); printf("\ttrack count:\t%i\n", stats->trkcount); printf("\tpoint count:\t%i\n", stats->trkpoints); if (!prop->isFast) { printf("\ttotal length:\t%f\n", stats->trklength); printf("\tunconverted:\t%i(%5.2f%%)\n", stats->trkunconverted, ratio); } } if (prop->parseRte) { if (stats->rteunconverted != 0) { ratio = (double) stats->rteunconverted / (stats->rtecount + stats-> rteunconverted) * 100; } else { ratio = 0; } printf("Routes:\n"); printf("\troute count:\t%i\n", stats->rtecount); printf("\tpoint count:\t%i\n", stats->rtepoints); if (!prop->isFast) { printf("\ttotal length:\t%f\n", stats->rtelength); printf("\tunconverted:\t%i(%5.2f%%)\n", stats->rteunconverted, ratio); } } if (prop->parseWpt) { printf("Waypoints:\n"); printf("\tpoint count:\t%i\n", stats->wptpoints); } } } /** * clears a path attribute structure */ void wipePathAttr(pathattr * pattr) { pattr->name[0] = '\0'; pattr->cmt[0] = '\0'; pattr->desc[0] = '\0'; pattr->src[0] = '\0'; pattr->link[0] = '\0'; pattr->number = 0; pattr->type[0] = '\0'; pattr->length = 0; pattr->interval = 0; pattr->speed = 0; //pattr->point = NULL; pattr->count = 0; } /** * creates a new path attribute */ pathattr *createPathAttr(void) { pathattr *pattr; pattr = (pathattr *) malloc(sizeof(pathattr)); wipePathAttr(pattr); return pattr; } /** * clears a element attribute structure */ void wipeAttr(g2sattr * attr) { attr->lon = 0; attr->lat = 0; attr->minlon = 0; attr->minlat = 0; attr->maxlon = 0; attr->maxlat = 0; attr->name[0] = '\0'; attr->cmt[0] = '\0'; attr->desc[0] = '\0'; attr->src[0] = '\0'; attr->link[0] = '\0'; attr->type[0] = '\0'; attr->time[0] = '\0'; attr->number = 0; attr->ele = 0; attr->magvar = 0; attr->geoidheight = 0; attr->sym[0] = '\0'; attr->fix[0] = '\0'; attr->sat = 0; attr->hdop = 0; attr->vdop = 0; attr->pdop = 0; attr->ageofdgpsdata = 0; attr->dgpsid = 0; attr->author[0] = '\0'; attr->keywords[0] = '\0'; attr->copyright[0] = '\0'; attr->year = 0; attr->license[0] = '\0'; attr->minlat = 0; attr->minlon = 0; attr->maxlat = 0; attr->maxlon = 0; } /** * sets default values to a column properties. */ void setColsDefault(g2scolumns * cols) { cols->name = 1; cols->cmt = 1; cols->desc = 1; cols->src = 1; cols->link = 1; cols->type = 1; cols->time = 1; cols->number = 1; cols->ele = 1; cols->magvar = 1; cols->geoidheight = 1; cols->sym = 1; cols->fix = 1; cols->sat = 1; cols->hdop = 1; cols->vdop = 1; cols->pdop = 1; cols->ageofdgpsdata = 1; cols->dgpsid = 1; cols->length = 1; cols->interval = 1; cols->speed = 1; cols->points = 1; cols->gpxline = 0; } /** * creates a column structure */ g2scolumns *createCols(void) { g2scolumns *cols; cols = (g2scolumns *) malloc(sizeof(g2scolumns)); setColsDefault(cols); return cols; } /** * creates a element attribute structure. */ g2sattr *createAttr(void) { g2sattr *attr; attr = (g2sattr *) malloc(sizeof(g2sattr)); wipeAttr(attr); return attr; } /** * creates a properties structure for gpx2shp */ g2sprop *createProp(void) { g2sprop *prop; g2sstats *stats; g2scolumns *cols; prop = malloc(sizeof(g2sprop)); stats = malloc(sizeof(g2sstats)); cols = createCols(); prop->stats = stats; prop->parseWpt = 0; prop->parseTrk = 0; prop->parseRte = 0; prop->minpoints = 2; prop->minlength = 0; prop->mintime = 0; prop->is3d = 0; prop->isEdge = 0; prop->isPoint = 0; prop->isFast = 0; prop->needsStats = 0; prop->verbose = 0; prop->output = NULL; prop->ellipsoid = NULL; prop->lengthUnit = NULL; prop->speedLengthUnit = NULL; prop->speedTimeUnit = NULL; prop->timeUnit = NULL; prop->stats->trkcount = 0; prop->stats->trkpoints = 0; prop->stats->trklength = 0; prop->stats->trkunconverted = 0; prop->stats->rtecount = 0; prop->stats->rtepoints = 0; prop->stats->rtelength = 0; prop->stats->rteunconverted = 0; prop->stats->wptpoints = 0; prop->cols = cols; return prop; } /** * close and free a propertires structure */ void closeProp(g2sprop * prop) { free(prop->stats); free(prop->sourcefile); free(prop->ellipsoid); free(prop->timeUnit); free(prop->speedLengthUnit); free(prop->speedTimeUnit); free(prop->lengthUnit); free(prop->output); free(prop->cols); free(prop); } /** * creates a shapehandles structure */ //shphandles *createShps(void) //{ // shphandles *shps; // shps = malloc(sizeof(shphandles)); // shps->trk = NULL; // shps->wpt = NULL; // shps->rte = NULL; // shps->trk_edg = NULL; // shps->rte_edg = NULL; // shps->trk_pnt = NULL; // shps->rte_pnt = NULL; // return shps; //} /** * creates a dbfhandles structure */ /* dbfhandles *createDbfs(void) { dbfhandles *dbfs; dbfs = malloc(sizeof(dbfhandles)); dbfs->trk = NULL; dbfs->wpt = NULL; dbfs->rte = NULL; dbfs->trk_edg = NULL; dbfs->rte_edg = NULL; dbfs->trk_pnt = NULL; dbfs->rte_pnt = NULL; return dbfs; } */ /** * creates a parse structure */ parsedata *createParsedata(XML_Parser parser, g2sprop * prop) { parsedata *pdata = (parsedata *) malloc(sizeof(parsedata)); pdata->fp = NULL; //shphandles *shps = createShps(); //dbfhandles *dbfs = createDbfs(); pathattr *pattr = createPathAttr(); g2sattr *attr = createAttr(); parent *p = (parent *) malloc(sizeof(parent)); parent *c = (parent *) malloc(sizeof(parent)); p->name = NULL; p->parentptr = NULL; c->name = "root"; c->parentptr = p; pdata->depth = 0; pdata->databuf = malloc(sizeof(char) * DATABUFSIZE); pdata->bufptr = NULL; pdata->failed = 0; pdata->failedid = 0; pdata->parser = parser; pdata->parent = p; pdata->current = c; //pdata->shps = shps; //pdata->dbfs = dbfs; pdata->prop = prop; pdata->pattr = pattr; pdata->attr = attr; return pdata; } /* * close and free resoures */ void closeParsedata(parsedata * pdata) { //free(pdata->shps); //free(pdata->dbfs); free(pdata->parent); free(pdata->current); free(pdata->databuf); free(pdata->attr); free(pdata->pattr); free(pdata); } --- NEW FILE: errorcode.h --- #ifndef ERRORCODE_H #define ERRORCODE_H /* os level */ #define ERR_OUTOFMEMORY 11 #define ERR_CANNOTOPEN 12 #define ERR_CREATEFILE 13 #define ERR_READERROR 14 #define ERR_FREEFAILED 15 /* option */ #define ERR_NOARGS 21 #define ERR_WRONGOPTION 22 #define ERR_OPTIONCONFRICT 23 /* parser */ #define ERR_ISNOTGPX 31 #define ERR_PARSEERROR 32 /* unit */ #define ERR_ELLPSUNIT 41 #define ERR_LENGTHUNIT 42 #define ERR_TIMEUNIT 43 #endif /* ERRORCODE_H */ --- NEW FILE: geod_inv.c --- #ifndef lint static const char SCCSID[] = "@(#)geod_inv.c 4.5 95/09/23 GIE REL"; #endif # include "projects.h" # include "geodesic.h" # define DTOL 1e-12 void geod_inv(void) { double th1, th2, thm, dthm, dlamm, dlam, sindlamm, costhm, sinthm, cosdthm, sindthm, L, E, cosd, d, X, Y, T, sind, tandlammp, u, v, D, A, B; if (ellipse) { th1 = atan(onef * tan(phi1)); th2 = atan(onef * tan(phi2)); } else { th1 = phi1; th2 = phi2; } thm = .5 * (th1 + th2); dthm = .5 * (th2 - th1); dlamm = .5 * (dlam = adjlon(lam2 - lam1)); if (fabs(dlam) < DTOL && fabs(dthm) < DTOL) { al12 = al21 = geod_S = 0.; return; } sindlamm = sin(dlamm); costhm = cos(thm); sinthm = sin(thm); cosdthm = cos(dthm); sindthm = sin(dthm); L = sindthm * sindthm + (cosdthm * cosdthm - sinthm * sinthm) * sindlamm * sindlamm; d = acos(cosd = 1 - L - L); if (ellipse) { E = cosd + cosd; sind = sin(d); Y = sinthm * cosdthm; Y *= (Y + Y) / (1. - L); T = sindthm * costhm; T *= (T + T) / L; X = Y + T; Y -= T; T = d / sind; D = 4. * T * T; A = D * E; B = D + D; geod_S = geod_a * sind * (T - f4 * (T * X - Y) + f64 * (X * (A + (T - .5 * (A - E)) * X) - Y * (B + E * Y) + D * X * Y)); tandlammp = tan(.5 * (dlam - .25 * (Y + Y - E * (4. - X)) * (f2 * T + f64 * (32. * T - (20. * T - A) * X - (B + 4.) * Y)) * tan(dlam))); } else { geod_S = geod_a * d; tandlammp = tan(dlamm); } u = atan2(sindthm, (tandlammp * costhm)); v = atan2(cosdthm, (tandlammp * sinthm)); al12 = adjlon(TWOPI + v - u); al21 = adjlon(TWOPI - v - u); } --- NEW FILE: setmeta.c --- #include "gpx2navit_txt.h" /** * store gpx metadata into text file */ void setMetadata(parsedata * pdata) { g2sprop *prop = pdata->prop; g2sattr *attr = pdata->attr; FILE *metafile; char *output = malloc(sizeof(char) * (strlen(prop->output) + 10)); strcpy(output, prop->output); strcat(output, "_meta.txt"); metafile = fopen(output, "w"); if (metafile == NULL) { fprintf(stderr, "Cannot create file: %s\n", output); exit(ERR_CREATEFILE); } if (attr->name) { fprintf(metafile, "name\t%s\n", attr->name); } if (attr->desc) { fprintf(metafile, "description\t%s\n", attr->desc); } if (attr->author) { fprintf(metafile, "author\t%s\n", attr->author); } if (attr->copyright) { fprintf(metafile, "copyright\t%s\n", attr->copyright); } if (attr->link) { fprintf(metafile, "link\t%s\n", attr->link); } if (attr->time) { fprintf(metafile, "time\t%s\n", attr->time); } if (attr->keywords) { fprintf(metafile, "keywords\t%s\n", attr->keywords); } if (attr->minlat) { fprintf(metafile, "min latitude\t%f\n", attr->minlat); } if (attr->minlon) { fprintf(metafile, "min longitude\t%f\n", attr->minlon); } if (attr->maxlat) { fprintf(metafile, "max latitude\t%f\n", attr->maxlat); } if (attr->maxlon) { fprintf(metafile, "max longitude\t%f\n", attr->maxlon); } fclose(metafile); free(output); } --- NEW FILE: geod_for.c --- #ifndef lint static const char SCCSID[] = "@(#)geod_for.c 4.6 95/09/23 GIE REL"; #endif # include "projects.h" # include "geodesic.h" # define MERI_TOL 1e-9 static double th1, costh1, sinth1, sina12, cosa12, M, N, c1, c2, D, P, s1; static int merid, signS; void geod_pre(void) { al12 = adjlon(al12); /* reduce to +- 0-PI */ signS = fabs(al12) > HALFPI ? 1 : 0; th1 = ellipse ? atan(onef * tan(phi1)) : phi1; costh1 = cos(th1); sinth1 = sin(th1); if ((merid = fabs(sina12 = sin(al12)) < MERI_TOL)) { sina12 = 0.; cosa12 = fabs(al12) < HALFPI ? 1. : -1.; M = 0.; } else { cosa12 = cos(al12); M = costh1 * sina12; } N = costh1 * cosa12; if (ellipse) { if (merid) { c1 = 0.; c2 = f4; D = 1. - c2; D *= D; P = c2 / D; } else { c1 = geod_f * M; c2 = f4 * (1. - M * M); D = (1. - c2) * (1. - c2 - c1 * M); P = (1. + .5 * c1 * M) * c2 / D; } } if (merid) s1 = HALFPI - th1; else { s1 = (fabs(M) >= 1.) ? 0. : acos(M); s1 = sinth1 / sin(s1); s1 = (fabs(s1) >= 1.) ? 0. : acos(s1); } } void geod_for(void) { double d, sind, u, V, X, ds, cosds, sinds, ss = 0, de; if (ellipse) { d = geod_S / (D * geod_a); if (signS) d = -d; u = 2. * (s1 - d); V = cos(u + d); X = c2 * c2 * (sind = sin(d)) * cos(d) * (2. * V * V - 1.); ds = d + X - 2. * P * V * (1. - 2. * P * cos(u)) * sind; ss = s1 + s1 - ds; } else { ds = geod_S / geod_a; if (signS) ds = -ds; } cosds = cos(ds); sinds = sin(ds); if (signS) sinds = -sinds; al21 = N * cosds - sinth1 * sinds; if (merid) { phi2 = atan(tan(HALFPI + s1 - ds) / onef); if (al21 > 0.) { al21 = PI; if (signS) de = PI; else { phi2 = -phi2; de = 0.; } } else { al21 = 0.; if (signS) { phi2 = -phi2; de = 0; } else de = PI; } } else { al21 = atan(M / al21); if (al21 > 0) al21 += PI; if (al12 < 0.) al21 -= PI; al21 = adjlon(al21); phi2 = atan(-(sinth1 * cosds + N * sinds) * sin(al21) / (ellipse ? onef * M : M)); de = atan2(sinds * sina12, (costh1 * cosds - sinth1 * sinds * cosa12)); if (ellipse) { if (signS) de += c1 * ((1. - c2) * ds + c2 * sinds * cos(ss)); else de -= c1 * ((1. - c2) * ds - c2 * sinds * cos(ss)); } } lam2 = adjlon(lam1 + de); } --- NEW FILE: utils.c --- #include "gpx2navit_txt.h" #include "projects.h" #include "geodesic.h" double getDistanceCore(char *p1, char *l1, char *p2, char *l2); void checkEllpsUnit(char *unit); double checkLengthUnit(char *unit); int checkTimeUnit(char *unit); double getTimeInterval(char *_t, char *t); double getSpeed(double length, double ti, double to_meter, int to_sec); double getDistance(double _x, double _y, double x, double y); // todo void closeShpFiles(shphandles * shps); // todo void closeDbfFiles(dbfhandles * dbfs); void *myMallocRep(size_t size, const char *fileName, int line); void checkEllpsUnit(char *unit) { /* * checks ellipse unit can be used by proj4 */ int isOK = 0; struct PJ_ELLPS *el; /* project.h of proj4 */ for (el = pj_ellps; el->id; ++el) { if (!strcmp(el->id, unit)) { isOK = 1; } } if (!isOK) { fputs ("The ellipse argument is not correct or supported by libproj\n", stderr); fputs("You can choose the argument from a list below.\n\n", stderr); for (el = pj_ellps; el->id; el++) { printf("%10s\t%s\n", el->id, el->name); } exit(ERR_ELLPSUNIT); } } double checkLengthUnit(char *unit) { /* * checks length unit can be used by proj4 * then returns unit value to meter */ int isOK = 0; double to_meter = 0; struct PJ_UNITS *ut; /* project.h of proj4 */ for (ut = pj_units; ut->id; ut++) { if (!strcmp(ut->id, unit)) { isOK = 1; to_meter = atof(ut->to_meter); } } if (!isOK) { fputs ("The length unit argument is not correct or supported by libproj.\n", stderr); fputs("You can choose the argument from a list below.\n\n", stderr); for (ut = pj_units; ut->id; ut++) { printf("%s\t%s\n", ut->id, ut->name); } exit(ERR_LENGTHUNIT); } return to_meter; } int checkTimeUnit(char *unit) { char *u[8] = { "sec", "s", "min", "m", "hour", "h", "day", "d" }; int p[8] = { 1, 1, 60, 60, 3600, 3600, 86400, 86400 }; int i, to_sec = 0; for (i = 0; i < 8; i++) { if (!strcmp(u[i], unit)) { to_sec = p[i]; } } if (!to_sec) { fputs("The time unit argument is not correct.\n", stderr); fputs("You can choose the argument from sec, min, hour or day.\n", stderr); exit(ERR_TIMEUNIT); } return to_sec; } double getTimeInterval(char *_t, char *t) { /* * Returns a time interval between _t and t. * The arguments should be "YYYY-MM-DDThh:mm:ssZ" (xml schema * datetime format without time zone) format. */ double ti; struct tm _tt; struct tm tt; time_t _tmt, tmt; memset(&_tt, 0, sizeof(_tt)); memset(&tt, 0, sizeof(tt)); sscanf(_t, "%d-%d-%dT%d:%d:%dZ", &_tt.tm_year, &_tt.tm_mon, &_tt.tm_mday, &_tt.tm_hour, &_tt.tm_min, &_tt.tm_sec); _tt.tm_year -= 1900; _tt.tm_mon -= 1; sscanf(t, "%d-%d-%dT%d:%d:%d", &tt.tm_year, &tt.tm_mon, &tt.tm_mday, &tt.tm_hour, &tt.tm_min, &tt.tm_sec); tt.tm_year -= 1900; tt.tm_mon -= 1; _tmt = mktime(&_tt); tmt = mktime(&tt); ti = difftime(tmt, _tmt); return ti; } double getSpeed(double length, double ti, double to_meter, int to_sec) { /* * Culculates speed from length and time. */ double speed; if (!length || !ti) speed = 0; else speed = (length / to_meter) / (ti / to_sec); return speed; } double getDistanceCore(char *p1, char *l1, char *p2, char *l2) { /* * Culculates a geodesic length between two points * using geod_*.c */ phi1 = dmstor(p1, &p1); lam1 = dmstor(l1, &l1); phi2 = dmstor(p2, &p2); lam2 = dmstor(l2, &l2); geod_inv(); return geod_S; } double getDistance(double _x, double _y, double x, double y) { /* * Culculates a geodesic length between two points */ double length; char p1[17], l1[17], p2[17], l2[17]; sprintf(p1, "%f", _x); sprintf(l1, "%f", _y); sprintf(p2, "%f", x); sprintf(l2, "%f", y); length = getDistanceCore(p1, l1, p2, l2); return length; } //todo void closeShpFiles(shphandles * shps) //{ /* * Closes all SHP files if they opened */ // if (shps->wpt) // SHPClose(shps->wpt); // if (shps->trk) // SHPClose(shps->trk); // if (shps->trk_edg) // SHPClose(shps->trk_edg); // if (shps->trk_pnt) // SHPClose(shps->trk_pnt); // if (shps->rte) // SHPClose(shps->rte); // if (shps->rte_edg) // SHPClose(shps->rte_edg); // if (shps->rte_pnt) // SHPClose(shps->rte_pnt); //} //todo void closeDbfFiles(dbfhandles * dbfs) //{ /* * Closes all DBF files if they opened */ // if (dbfs->wpt) // DBFClose(dbfs->wpt); // if (dbfs->trk) // DBFClose(dbfs->trk); // if (dbfs->trk_edg) // DBFClose(dbfs->trk_edg); // if (dbfs->trk_pnt) // DBFClose(dbfs->trk_pnt); // if (dbfs->rte) // DBFClose(dbfs->rte); // if (dbfs->rte_edg) // DBFClose(dbfs->rte_edg); // if (dbfs->rte_pnt) // DBFClose(dbfs->rte_pnt); //} --- NEW FILE: parser.c --- #include "gpx2navit_txt.h" void charHandle(void *userdata, const XML_Char * data, int length); void startElement(void *userdata, const char *element, const char **attr); void endElement(void *userdata, const char *element); void parseMain(g2sprop * prop); /** * a handler to parse charctor data on expat */ void charHandle(void *userdata, const XML_Char * data, int length) { static int bufsize = DATABUFSIZE; parsedata *pdata = (parsedata *) userdata; if (bufsize < length) { pdata->databuf = realloc(pdata->databuf, sizeof(char) * (length + 1)); bufsize = length; } strncpy(pdata->databuf, data, length); pdata->bufptr = pdata->databuf; pdata->bufptr += length; *pdata->bufptr = '\0'; } /** * a handler when a element starts */ void startElement(void *userdata, const char *element, const char **attr) { parsedata *pdata = (parsedata *) userdata; pdata->parent = pdata->current; pdata->current = malloc(sizeof(parent)); pdata->current->name = malloc(sizeof(char) * (strlen(element) + 1)); strcpy(pdata->current->name, element); pdata->current->parentptr = pdata->parent; startElementControl(pdata, element, attr); if (pdata->prop->verbose) { int i; for (i = 0; i < pdata->depth; i++) printf(" "); printf("<%s>: ", element); for (i = 0; attr[i]; i += 2) { printf(" %s='%s'", attr[i], attr[i + 1]); } printf("\n"); } pdata->depth++; } /** * a handler when a element ends */ void endElement(void *userdata, const char *element) { parsedata *pdata = (parsedata *) userdata; endElementControl(pdata, element); pdata->depth--; if (pdata->prop->verbose) { int i; for (i = 0; i < pdata->depth; i++) printf(" "); printf("</%s>:%s\n ", element,pdata->parent->name); } free(pdata->current->name); free(pdata->current); pdata->current = pdata->parent; pdata->parent = pdata->parent->parentptr; } void parseMain(g2sprop * prop) { FILE *fp; char buff[BUFFSIZE]; XML_Parser parser; parsedata *pdata; fp = fopen(prop->sourcefile, "r"); if (fp == NULL) { fprintf(stderr, "Cannot open gpx file: %s\n", prop->sourcefile); exit(ERR_CANNOTOPEN); } parser = XML_ParserCreate(NULL); if (!parser) { fprintf(stderr, "Couldn't allocate memory for parser\n"); exit(ERR_OUTOFMEMORY); } pdata = createParsedata(parser, prop); char *output_wpt = (char *) malloc(sizeof(char) * (strlen(pdata->prop->output) + 9)); strcpy(output_wpt, pdata->prop->output); strcat(output_wpt, "_nav.txt"); pdata->fp = fopen(output_wpt,"w"); if (pdata->fp == NULL) { //todo fprintf(stderr,"Failure opening File %s for writing",output_wpt); exit(1); } free(output_wpt); XML_SetUserData(parser, pdata); XML_SetElementHandler(parser, startElement, endElement); XML_SetCharacterDataHandler(parser, charHandle); for (;;) { int done; int len; fgets(buff, BUFFSIZE, fp); len = (int) strlen(buff); if (ferror(fp)) { fprintf(stderr, "Read error file: %s\n", prop->sourcefile); exit(ERR_READERROR); } done = feof(fp); if (done) break; if (!XML_Parse(parser, buff, len, done)) { fprintf(stderr, "Parse error at line %d:\n%s\n", XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser))); exit(ERR_PARSEERROR); } } fclose(pdata->fp); //close out file closeParsedata(pdata); } --- NEW FILE: Makefile.am --- bin_PROGRAMS = gpx2navit_txt gpx2navit_txt_SOURCES = \ emess.h \ geod_for.c \ geod_inv.c \ geod_set.c \ geodesic.h \ gpx2navit_txt.h \ main.c \ misc.c \ utils.c \ parser.c \ elementControl.c\ setwpt.c \ setpath.c \ setmeta.c \ errorcode.h INCLUDES= -I$(srcdir) AM_CFLAGS = -g debian-dist: dpkg-buildpackage -rfakeroot -d -tc -us -uc --- NEW FILE: gpx2navit_txt.h --- #ifndef GPX2SHP_H_INCLUDED #define GPX2SHP_H_INCLUDED #define PROG gpx2navit_txt #define FILENAMELENGTH 255 /* 255 is max length for dbf string column */ #define COMMENTLENGTH 255 /* 255 is max length for dbf string column */ #define NAMELENGTH 32 #define TIMELENGTH 32 #define TYPELENGTH 16 #define BUFFSIZE 8192 #define DATABUFSIZE 16 #define failToWriteAttr(S, T) failToWriteAttrRep((S), (T),__FILE__, __LINE__ ) #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <libgen.h> #include <getopt.h> #include <time.h> #include <assert.h> #include <expat.h> #include "errorcode.h" //#include "shapefil.h" #define DEBUG 0 /** * make xml parent and child list */ typedef struct parent { char *name; /** element name */ struct parent *parentptr; /** parent pointer */ } parent; /** * set attribute columns on/off */ typedef struct g2scolumns { /** * each member corresponds to attribute column of attribute table */ int name; int cmt; int desc; int src; int link; int type; int time; int number; int ele; int magvar; int geoidheight; int sym; int fix; int sat; int hdop; int vdop; int pdop; int ageofdgpsdata; int dgpsid; int length; int interval; int speed; int points; int gpxline; } g2scolumns; /** * store each path attribute values for trackpoint and route. */ typedef struct pathattr { char name[NAMELENGTH]; char cmt[COMMENTLENGTH]; char desc[COMMENTLENGTH]; char src[COMMENTLENGTH]; char link[FILENAMELENGTH]; int number; char type[TYPELENGTH]; double length; double interval; double speed; /* double *x; double *y; double *z; */ double *point; int count; } pathattr; /** * store each point attribute values. */ typedef struct g2sattr { /** * the structure cames from GPX1.1 format */ double lon; double lat; double minlon; double minlat; double maxlon; double maxlat; char name[NAMELENGTH]; char cmt[COMMENTLENGTH]; char desc[COMMENTLENGTH]; char src[COMMENTLENGTH]; char link[FILENAMELENGTH]; char type[TYPELENGTH]; char time[TIMELENGTH]; int number; double ele; double magvar; double geoidheight; char sym[NAMELENGTH]; char fix[NAMELENGTH]; int sat; double hdop; double vdop; double pdop; double ageofdgpsdata; int dgpsid; char author[NAMELENGTH]; char keywords[NAMELENGTH]; char copyright[NAMELENGTH]; int year; char license[NAMELENGTH]; } g2sattr; /** * statistics structure */ typedef struct g2sstats { int trkpoints; /** track point total count */ int trkcount; /** track path total count */ double trklength; /** track total length */ int rtepoints; /** route point total count */ int rtecount; /** route path totol count */ double rtelength; /** route total length */ int wptpoints; /** way point total count */ int trkunconverted; /** unconverted track path count */ int rteunconverted; /** unconverted route path count */ } g2sstats; /** * cluster of all dbfhandles */ //typedef struct dbfhandles { // DBFHandle trk; /** for track */ // DBFHandle wpt; /** for waypoint */ // DBFHandle rte; /** for route */ // DBFHandle trk_edg; /** for track each edge */ // DBFHandle trk_pnt; /** for track each point */ // DBFHandle rte_edg; /** for route each edge */ // DBFHandle rte_pnt; /** for route each point */ //} dbfhandles; /** * cluster of all shphandles */ //typedef struct shphandles { // SHPHandle trk; /** for track */ // SHPHandle wpt; /** for waypoint */ // SHPHandle rte; /** for route */ // SHPHandle trk_edg; /** for track each edge */ // SHPHandle trk_pnt; /** for track each point */ // SHPHandle rte_edg; /** for route each edge */ // SHPHandle rte_pnt; /** for route each point */ //} shphandles; /** * propaties structure for gpx2navit_txt */ typedef struct g2sprop { int parseWpt; /** convert waypoint data or not */ int parseTrk; /** convert track data or not */ int parseRte; /** convert route data or not */ int is3d; /** using 3D mode */ int isEdge; /** convert path data as each separated path */ int isPoint; /** convert path data as point */ int isFast; /** fast mode that skips path check */ int needsStats; /** shows statistics at last */ int minpoints; /** minimum points to convert as a path */ int minlength; /** minimum length to convert as a path */ int mintime; /** minimum time to convert as a path */ int verbose; /** verbose mode on/off */ char *sourcefile; /** source .gpx file */ char *output; /** output file base name */ char *ellipsoid; /** ellipsoid type to calculate length */ char *lengthUnit; /** length unit for attributes*/ double length2meter;/** meter value of lenght unit */ char *timeUnit; /** time unit for attributes */ double time2sec; /** value to convert time unit to second */ char *speedLengthUnit; /** lenght unit to calculate speed*/ double speed2meter; /** meter value of speedLengthUnit */ char *speedTimeUnit;/** time unit to calculate speed */ int speed2sec; /** value to convert speedTimeUnit to seconde */ g2sstats *stats; /** convert statistics */ g2scolumns *cols; /** attribute table column switch */ } g2sprop; /** * userdata structure between expat methods */ typedef struct parsedata { int depth; /** xml path depth */ char *databuf; /** character buffer in tags */ char *bufptr; /** pointer to databuf to add '\0' to databuf */ int failed; /** xml parse failed flag */ int failedid; /** xml parse failed id */ XML_Parser parser; /** xml parser itself*/ parent *parent; /** pointer to parent node */ parent *current; /** pointer to current node */ FILE *fp; /** File handle to write out data points*/ // shphandles *shps; /** .shp file cluster that is used in this program */ // dbfhandles *dbfs; /** .dbf file cluster that is used in this program */ g2sattr *attr; /** each point attributes */ pathattr *pattr; /** each path attributes */ g2sprop *prop; /** propaties for this program */ } parsedata; /* utils.c */ void checkEllpsUnit(char *unit); double checkLengthUnit(char *unit); int checkTimeUnit(char *unit); double getTimeInterval(char *_t, char *t); double getSpeed(double length, double ti, double to_meter, int to_sec); double getDistance(double _x, double _y, double x, double y); //void closeShpFiles(shphandles * shps); //void closeDbfFiles(dbfhandles * dbfs); void *myMallocRep(size_t size, const char *fileName, int line); /* misc.c */ void failToWriteAttrRep(int iShape, int col, char *file, int line); void showStats(g2sprop * prop); void wipePathAttr(pathattr * pattr); pathattr *createPathAttr(void); void wipeAttr(g2sattr * attr); void setColsDefault(g2scolumns * cols); g2scolumns *createCols(void); g2sattr *createAttr(void); g2sprop *createProp(void); void closeProp(g2sprop * prop); //shphandles *createShps(void); //dbfhandles *createDbfs(void); parsedata *createParsedata(XML_Parser parser, g2sprop * prop); void closeParsedata(parsedata * pdata); /* parser.c */ void parseMain(g2sprop * pr); /* elementControl.c */ void startElementControl(parsedata * pdata, const char *element, const char **attr); void endElementControl(parsedata * pdata, const char *element); /* setwpt.c */ void setWpt( parsedata * pdata); /* setpath.c */ void initPathAttr(pathattr * pattr, g2sattr * attr); void setPathInterval(parsedata *pdata); void setPathData(pathattr * parrt, g2sattr * attr); void setPath( parsedata * pdata); /* setmetadata.c */ void setMetadata(parsedata * pdata); #endif --- NEW FILE: geod_set.c --- #ifndef lint /* * static const char SCCSID[]="@(#)geod_set.c 4.8 95/09/23 GIE REL"; */ #endif #define _IN_GEOD_SET #include <string.h> #include "projects.h" #include "geodesic.h" #include "emess.h" void geod_set(int argc, char **argv) { paralist *start = 0, *curr = NULL; /* added NULL */ double es; char *name; int i; /* * put arguments into internal linked list */ if (argc <= 0) emess(1, "no arguments in initialization list"); for (i = 0; i < argc; ++i) if (i) curr = curr->next = pj_mkparam(argv[i]); else start = curr = pj_mkparam(argv[i]); /* * set elliptical parameters */ if (pj_ell_set(start, &geod_a, &es)) emess(1, "ellipse setup failure"); /* * set units */ if ((name = pj_param(start, "sunits").s)) { /* added parentheses */ char *s; for (i = 0; (s = pj_units[i].id) && strcmp(name, s); ++i); if (!s) emess(1, "%s unknown unit conversion id", name); fr_meter = 1. / (to_meter = atof(pj_units[i].to_meter)); } else to_meter = fr_meter = 1.; if ((ellipse = es != 0.)) { /* added parentheses */ onef = sqrt(1. - es); geod_f = 1 - onef; f2 = geod_f / 2; f4 = geod_f / 4; f64 = geod_f * geod_f / 64; } else { onef = 1.; geod_f = f2 = f4 = f64 = 0.; } /* * check if line or arc mode */ if (pj_param(start, "tlat_1").i) { double del_S; #undef f phi1 = pj_param(start, "rlat_1").f; lam1 = pj_param(start, "rlon_1").f; if (pj_param(start, "tlat_2").i) { phi2 = pj_param(start, "rlat_2").f; lam2 = pj_param(start, "rlon_2").f; geod_inv(); geod_pre(); } else if ((geod_S = pj_param(start, "dS").f)) { /* added * parentheses */ al12 = pj_param(start, "rA").f; geod_pre(); geod_for(); } else emess(1, "incomplete geodesic/arc info"); if ((n_alpha = pj_param(start, "in_A").i) > 0) { if (!(del_alpha = pj_param(start, "rdel_A").f)) emess(1, "del azimuth == 0"); } else if ((del_S = fabs(pj_param(start, "ddel_S").f))) { /* added * parentheses */ n_S = geod_S / del_S + .5; } else if ((n_S = pj_param(start, "in_S").i) <= 0) emess(1, "no interval divisor selected"); } /* * free up linked list */ for (; start; start = curr) { curr = start->next; pj_dalloc(start); } } --- NEW FILE: main.c --- #include "gpx2navit_txt.h" #include "geodesic.h" void version(void); void usage(char **argv); void setDefault(g2sprop * prop); void setOptions(int argc, char **argv, g2sprop * prop); /** * Shows a version */ void version(void) { fprintf(stdout, "gpx2navit_txt 0.1\n"); fprintf(stdout, "\n"); fprintf(stdout, "by Toshihiro Hiraoka\n"); fprintf(stdout, " Petter Reinholdtsen\n"); } /** * Shows a usage message */ void usage(char **argv) { fprintf(stdout, "Usage: %s gpxfile [options] [-o output basename]\n", argv[0]); fprintf(stdout, "-o, --output Sets output basename. The default is (source file\n"); fprintf(stdout, " name) - (extention name)\n"); fprintf (stdout, "-w, --waypoints Converts only waypoints data from a gpx file.\n"); fprintf(stdout, "-t, --trackpoints Converts only trackpoints data from a gpx file.\n"); fprintf(stdout, "-r, --routes Converts only routes data from a gpx file.\n"); fprintf(stdout, "-a, --all Converts all types of data from a gpx file.(default)\n"); fprintf(stdout, "-e, --as-edge Makes a separated output by each edges.\n"); fprintf(stdout, "-p, --as-point Makes a separated output by each points.\n"); fprintf(stdout, "-s, --stats Shows simple statistics of the outputs.\n"); fprintf(stdout, "-b, --basic-columns Stores only basic data as attribures to \n"); fprintf(stdout, " reduce memory and storage usage.\n"); fprintf(stdout, " (ele, name, cmt, type, time, fix, sym and number).\n"); fprintf(stdout, "-L, --no-length Removes length column from a waypoint or trackpoint\n"); fprintf(stdout, " attribute table.\n"); fprintf (stdout, "-S, --no-speed Removes speed column from a waypoint or trackpoint\n"); fprintf(stdout, " attribute table.\n"); fprintf (stdout, "-T, --no-time Removes time column from an attribute table.\n"); fprintf(stdout, "-g, --gpxline Adds line number of GPX file as attribures.\n"); fprintf (stdout, "-f, --fast Make it faster without any checks.\n"); fprintf(stdout, "-3, --3d Converts data using 3d format. (It's not compatible\n"); fprintf(stdout, " for Arcview 3.x.)\n"); fprintf(stdout, " --min-points Sets path minimum points to convert for noise reduction.\n"); fprintf(stdout, " Default is 2.\n"); fprintf(stdout, " --min-length Sets path minimum length to convert for noise reduction.\n"); fprintf(stdout, " Default is 0.\n"); fprintf(stdout, " --min-time Sets path minimum time period to convert for noise\n"); fprintf(stdout, " reduction.\n"); fprintf(stdout, " Default is 0.\n"); fprintf(stdout, " --length-unit Sets length unit from m,km,feet,mi and etc.\n"); fprintf(stdout, " The default is m.\n"); fprintf(stdout, " You can see the unit list from \"geod -lu\" command.\n"); fprintf (stdout, " --time-unit Sets time unit. The default is sec.\n"); fprintf(stdout, " You can set from day, hour, min and sec.\n"); fprintf(stdout, " --speed-length-unit Sets length unit for speed.\n"); fprintf(stdout, " The default is km.\n"); fprintf(stdout, " You can see the unit list from \"geod -lu\" command.\n"); fprintf(stdout, " --speed-time-unit Sets time unit for speed calulation. Default is hour.\n"); fprintf(stdout, " You can set from day, hour, min and sec.\n"); fprintf(stdout, " --length-ellipsoid Sets length ellipsoid like UGS84, clrk66. The default is\n"); fprintf(stdout, " UGS84.\n"); fprintf (stdout, " You can see the unit list from \"geod -le\" command.\n"); fprintf(stdout, "-v, --verbose Gives many messages.\n"); fprintf(stdout, " --version Shows version.\n"); fprintf(stdout, "-h, --help Shows this list.\n"); } /** * Sets default values to the properties when there is no user setting. */ void setDefault(g2sprop * prop) { char *pargv[2]; int pargc = 2; char *ellps; /* if there are no options like -p,-w,-e, sets as -a */ if (!(prop->parseWpt | prop->parseTrk | prop->parseRte)) { prop->parseWpt = 1; prop->parseTrk = 1; prop->parseRte = 1; } /* if there is no output setting, sets it as [sourcefile name] - ".gpx" */ if (prop->output == NULL) { char *dot = strrchr(prop->sourcefile, '.'); prop->output = (char *) malloc(sizeof(char) * strlen(prop->sourcefile) + 1); if (0 == strcmp(dot, ".gpx")) { int len = dot - prop->sourcefile; strncpy(prop->output, prop->sourcefile, len); prop->output[len] = 0; } else { fprintf(stderr, "The source file doesn't have .gpx extension.\n"); exit(ERR_ISNOTGPX); } } /* sets ellipsoid "WGS84" */ if (prop->ellipsoid == NULL) { prop->ellipsoid = (char *) malloc(sizeof(char) * 7); strcpy(prop->ellipsoid, "WGS84"); } /* sets lengthUnit "m" */ if (prop->lengthUnit == NULL) { prop->lengthUnit = (char *) malloc(sizeof(char) * 2); strcpy(prop->lengthUnit, "m"); } /* sets timeUnit "sec" */ if (prop->timeUnit == NULL) { prop->timeUnit = (char *) malloc(sizeof(char) * 4); strcpy(prop->timeUnit, "sec"); } /* sets speedLengthUnit "km" */ if (prop->speedLengthUnit == NULL) { prop->speedLengthUnit = (char *) malloc(sizeof(char) * 3); strcpy(prop->speedLengthUnit, "km"); } /* sets speedTimeUnit "hour" */ if (prop->speedTimeUnit == NULL) { prop->speedTimeUnit = (char *) malloc(sizeof(char) * 5); strcpy(prop->speedTimeUnit, "hour"); } /* sets ellipsoid setting to geod* programs */ ellps = malloc(sizeof(char) * (strlen(prop->ellipsoid) + 8)); strcpy(ellps, "+ellps="); strcat(ellps, prop->ellipsoid); pargv[0] = ellps; pargv[1] = prop->lengthUnit; checkEllpsUnit(prop->ellipsoid); prop->length2meter = checkLengthUnit(prop->lengthUnit); prop->time2sec = checkTimeUnit(prop->timeUnit); prop->speed2meter = checkLengthUnit(prop->speedLengthUnit); prop->speed2sec = checkTimeUnit(prop->speedTimeUnit); geod_set(pargc, pargv); if (prop->verbose) { printf("source filename:\t%s\n", prop->sourcefile); printf("output file base name:\t%s\n", prop->output); } free(ellps); } /** * Set options from command arguments */ void setOptions(int argc, char **argv, g2sprop * prop) { int result; /* option struct for getopt_long */ struct option const long_options[] = { {"waypoints", no_argument, 0, 'w'}, {"trackpoints", no_argument, 0, 't'}, {"routes", no_argument, 0, 'r'}, {"output", required_argument, 0, 'o'}, {"as-edge", no_argument, 0, 'e'}, {"as-point", no_argument, 0, 'p'}, {"min-points", required_argument, 0, 'P'}, {"min-length", required_argument, 0, 'l'}, {"min-time", required_argument, 0, 'm'}, {"stats", no_argument, 0, 's'}, {"basic-columns", no_argument, 0, 'b'}, {"fast", no_argument, 0, 'f'}, {"length-unit", required_argument, 0, '4'}, {"time-unit", required_argument, 0, '8'}, {"length-ellipsoid", required_argument, 0, '7'}, {"speed-length-unit", required_argument, 0, '5'}, {"speed-time-unit", required_argument, 0, '6'}, {"no-speed", no_argument, 0, 'S'}, {"no-length", no_argument, 0, 'L'}, {"no-time", no_argument, 0, 'T'}, {"verbose", no_argument, 0, 'v'}, {"gpxline", no_argument, 0, 'g'}, {"all", no_argument, 0, 'a'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, '?'}, {0, no_argument, 0, '0'}, }; if (argc <= 1) { fprintf(stderr, "There is no argument.\n"); usage(argv); exit(ERR_NOARGS); } /* set option attributes */ while ((result = getopt_long(argc, argv, "3wtrao:epfP:l:m:bS4:5:6:7:8:LTSsvg0", long_options, NULL)) != -1) { switch (result) { case '3': /* 3d output */ prop->is3d = 1; break; case 'w': /* converts only waypoint */ prop->parseWpt = 1; break; case 't': /* converts only trackpoint */ prop->parseTrk = 1; break; case 'r': /* converts only route */ prop->parseRte = 1; break; case 'a': /* converts all */ prop->parseWpt = 1; prop->parseTrk = 1; prop->parseRte = 1; break; case 'o': /* sets basename of output file */ prop->output = (char *) malloc(sizeof(char) * strlen(optarg) + 1); strcpy(prop->output, optarg); break; case 'e': /* make output by each edges */ if (prop->isEdge) { fprintf(stderr, "option -e cannot use with -f\n"); exit(ERR_OPTIONCONFRICT); } prop->isEdge = 1; break; case 'p': /* make output by each edges */ prop->isPoint = 1; break; case 'f': /* make it faster */ if (prop->isEdge) { fprintf(stderr, "option -f cannot use with -e\n"); exit(ERR_OPTIONCONFRICT); } prop->isFast = 1; prop->cols->desc = 0; prop->cols->src = 0; prop->cols->link = 0; prop->cols->magvar = 0; prop->cols->geoidheight = 0; prop->cols->sat = 0; prop->cols->hdop = 0; prop->cols->vdop = 0; prop->cols->pdop = 0; prop->cols->ageofdgpsdata = 0; prop->cols->dgpsid = 0; prop->cols->length = 0; prop->cols->interval = 0; prop->cols->speed = 0; break; case 'P': /* sets minimun points as a path */ prop->minpoints = atoi(optarg); break; case 'l': /* sets minimun length as a path */ prop->minlength = atoi(optarg); break; case 'm': /* sets minimun time as a path */ prop->mintime = atoi(optarg); break; case 'b': /* use only some columns */ prop->cols->desc = 0; prop->cols->src = 0; prop->cols->link = 0; prop->cols->magvar = 0; prop->cols->geoidheight = 0; prop->cols->sat = 0; prop->cols->hdop = 0; prop->cols->vdop = 0; prop->cols->pdop = 0; prop->cols->ageofdgpsdata = 0; prop->cols->dgpsid = 0; prop->cols->length = 0; prop->cols->interval = 0; prop->cols->speed = 0; break; case 'S': /* doesn't make speed column */ prop->cols->speed = 0; break; case '4': /* sets length unit */ prop->lengthUnit = malloc(sizeof(char) * (strlen(optarg) + 1)); strcpy(prop->lengthUnit, optarg); break; case '5': /* sets length unit for calculating speed */ prop->speedLengthUnit = malloc(sizeof(char) * (strlen(optarg) + 1)); strcpy(prop->speedLengthUnit, optarg); break; case '6': /* sets time unit for calculating speed */ prop->speedTimeUnit = malloc(sizeof(char) * (strlen(optarg) + 1)); strcpy(prop->speedTimeUnit, optarg); break; case '7': /* sets ellipsoid for calculating length */ prop->ellipsoid = malloc(sizeof(char) * (strlen(optarg) + 1)); strcpy(prop->ellipsoid, optarg); break; case '8': /* sets time unit */ prop->timeUnit = malloc(sizeof(char) * (strlen(optarg) + 1)); strcpy(prop->timeUnit, optarg); break; case 'L': /* doesn't make length column */ prop->cols->length = 0; break; case 'T': /* doesn't make time column */ prop->cols->interval = 0; break; case 's': /* shows source file stats */ prop->needsStats = 1; break; case 'v': /* verbose mode */ prop->verbose = 1; break; case 'V': /* shows version */ version(); exit(EXIT_SUCCESS); break; case 'g': /* adds gpx line number column */ prop->cols->gpxline = 1; break; case ':': usage(argv); exit(ERR_WRONGOPTION); break; case '0': usage(argv); exit(ERR_WRONGOPTION); break; default: usage(argv); exit(ERR_WRONGOPTION); break; } } /* gets a source file name */ if(argv[optind] == NULL) { fprintf(stderr, "There is no gpxfile description.\n"); usage(argv); exit(ERR_WRONGOPTION); } prop->sourcefile = malloc(sizeof(char) * (strlen(argv[optind]) + 1)); /** @note needs to change here to support * a several files convertion */ strcpy(prop->sourcefile, argv[optind]); setDefault(prop); } /** * Main */ int main(int argc, char **argv) { g2sprop *prop; prop = createProp(); setOptions(argc, argv, prop); parseMain(prop); if (prop->needsStats) showStats(prop); closeProp(prop); return (0); } --- NEW FILE: elementControl.c --- #include "gpx2navit_txt.h" void startElementControl(parsedata * pdata, const char *element, const char **attr); void endElementControl(parsedata * pdata, const char *element); /* * This method controls tag start event. * It corrects attributes. */ void startElementControl(parsedata * pdata, const char *element, const char **attr) { int i; static int isFirstTrk = 1; static int isFirstRte = 1; static int isFirstPathpt = 1; for (i = 0; attr[i]; i += 2) { if (!strcmp(attr[i], "lon")) { pdata->attr->lon = atof(attr[i + 1]); } if (!strcmp(attr[i], "lat")) { pdata->attr->lat = atof(attr[i + 1]); } if (!strcmp(attr[i], "minlon")) { pdata->attr->minlon = atof(attr[i + 1]); } if (!strcmp(attr[i], "minlat")) { pdata->attr->minlat = atof(attr[i + 1]); } if (!strcmp(attr[i], "maxlon")) { pdata->attr->maxlon = atof(attr[i + 1]); } if (!strcmp(attr[i], "maxlat")) { pdata->attr->maxlat = atof(attr[i + 1]); } if (!strcmp(attr[i], "author")) { strcpy(pdata->attr->author, attr[i + 1]); } } if (pdata->prop->parseTrk) { if (!strcmp(element, "trk")) { if (isFirstTrk) { isFirstTrk = 0; } } if (!strcmp(element, "trkseg")) { isFirstPathpt = 1; } if (!strcmp(element, "trkpt")) { if (isFirstPathpt) { initPathAttr(pdata->pattr, pdata->attr); isFirstPathpt = 0; } } } if (pdata->prop->parseRte) { if (!strcmp(element, "rte")) { if (isFirstRte) { isFirstRte = 0; isFirstPathpt = 1; } } if (!strcmp(element, "rtept")) { if (isFirstPathpt) { initPathAttr(pdata->pattr, pdata->attr); isFirstPathpt = 0; } } } } /** * This method is kicked by tag end event. * It corrects char elements when the element tag has some data, * then start to convert when tag is top level tag like <wpt>. */ void endElementControl(parsedata * pdata, const char *element) { static int isFirstWpt = 1; static int isFirstTrkAsPoint = 1; static int isFirstRteAsPoint = 1; /* common elements */ if (!strcmp(element, "name")) { strcpy(pdata->attr->name, pdata->databuf); } if (!strcmp(element, "cmt")) { strcpy(pdata->attr->cmt, pdata->databuf); } if (!strcmp(element, "desc")) { strcpy(pdata->attr->desc, pdata->databuf); } if (!strcmp(element, "src")) { strcpy(pdata->attr->src, pdata->databuf); } if (!strcmp(element, "link")) { strcpy(pdata->attr->link, pdata->databuf); } if (!strcmp(element, "type")) { strcpy(pdata->attr->type, pdata->databuf); } /* waypoint and metadata elements */ if (!strcmp(element, "time")) { strcpy(pdata->attr->time, pdata->databuf); } /* route and track point elements */ if (!strcmp(element, "number")) { pdata->attr->number = atoi(pdata->databuf); } /* waypoint elements */ if (!strcmp(element, "ele")) { pdata->attr->ele = atof(pdata->databuf); } if (!strcmp(element, "magvar")) { pdata->attr->magvar = atof(pdata->databuf); } if (!strcmp(element, "geoidheight")) { pdata->attr->geoidheight = atof(pdata->databuf); } if (!strcmp(element, "sym")) { strcpy(pdata->attr->sym, pdata->databuf); } if (!strcmp(element, "fix")) { strcpy(pdata->attr->fix, pdata->databuf); } if (!strcmp(element, "sat")) { pdata->attr->sat = atoi(pdata->databuf); } if (!strcmp(element, "hdop")) { pdata->attr->hdop = atof(pdata->databuf); } if (!strcmp(element, "vdop")) { pdata->attr->vdop = atof(pdata->databuf); } if (!strcmp(element, "pdop")) { pdata->attr->pdop = atof(pdata->databuf); } if (!strcmp(element, "ageofdgpsdata")) { pdata->attr->ageofdgpsdata = atof(pdata->databuf); } /* metadata elements */ if (!strcmp(element, "author")) { strcpy(pdata->attr->author, pdata->databuf); } if (!strcmp(element, "keywords")) { strcpy(pdata->attr->keywords, pdata->databuf); } if (!strcmp(element, "copyright")) { strcpy(pdata->attr->copyright, pdata->databuf); } if (!strcmp(element, "year")) { pdata->attr->year = atoi(pdata->databuf); } if (!strcmp(element, "license")) { strcpy(pdata->attr->license, pdata->databuf); } if (!strcmp(element, "bounds")) { /* none */ } /* top elements */ /* set waypoint data */ if (!strcmp(element, "wpt")) { if (pdata->prop->parseWpt) { if (isFirstWpt) { isFirstWpt = 0; } //todo if (DEBUG) { fprintf(stderr,"\neectrl wpt %s %s", pdata->attr->desc,pdata->attr->name); } setWpt(pdata); wipeAttr(pdata->attr); } } /* set trackpoint data */ if (!strcmp(element, "trkpt")) { if (pdata->prop->parseTrk) { setPathData(pdata->pattr, pdata->attr); if (!pdata->prop->isFast) setPathInterval(pdata); } /* set trackpoint data as point */ if (pdata->prop->isPoint) { if (isFirstTrkAsPoint) { isFirstTrkAsPoint = 0; } setWpt(pdata); } wipeAttr(pdata->attr); } /* write trackpoint */ if (!strcmp(element, "trkseg")) { if (pdata->prop->parseTrk) { setPath( pdata); } } /* set route data */ if (!strcmp(element, "rtept")) { if (pdata->prop->parseRte) { setPathData(pdata->pattr, pdata->attr); if (!pdata->prop->isFast) setPathInterval(pdata); } /* set route data as point */ if (pdata->prop->isPoint) { if (isFirstRteAsPoint) { isFirstRteAsPoint = 0; } setWpt( pdata); } wipeAttr(pdata->attr); } /* write route */ if (!strcmp(element, "rte")) { if (pdata->prop->parseRte) { setPath( pdata); } } if (!strcmp(element, "metadata")) { setMetadata(pdata); wipeAttr(pdata->attr); } } --- NEW FILE: geodesic.h --- #ifndef lint /*static char GEODESIC_H_ID[] = "@(#)geodesic.h 4.3 95/08/19 GIE REL... [truncated message content] |
From: andi <bod...@us...> - 2008-01-05 18:15:57
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12811/src Log Message: Directory /cvsroot/navit/navit/src/tools/gpx2navit_txt/src added to the repository |
From: andi <bod...@us...> - 2008-01-05 18:15:56
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/develop In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12811/develop Log Message: Directory /cvsroot/navit/navit/src/tools/gpx2navit_txt/develop added to the repository |
From: andi <bod...@us...> - 2008-01-05 18:15:56
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt/man In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12811/man Log Message: Directory /cvsroot/navit/navit/src/tools/gpx2navit_txt/man added to the repository |
From: andi <bod...@us...> - 2008-01-05 18:13:31
|
Update of /cvsroot/navit/navit/src/tools/gpx2navit_txt In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11801/gpx2navit_txt Log Message: Directory /cvsroot/navit/navit/src/tools/gpx2navit_txt added to the repository |
From: andi <bod...@us...> - 2008-01-05 18:03:19
|
Update of /cvsroot/navit/navit/src/tools In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7252/tools Log Message: Directory /cvsroot/navit/navit/src/tools added to the repository |
From: andi <bod...@us...> - 2008-01-05 18:01:33
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6320 Modified Files: navit.xml Log Message: Add track definition in navit.xml Index: navit.xml =================================================================== RCS file: /cvsroot/navit/navit/src/navit.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** navit.xml 5 Jan 2008 16:12:19 -0000 1.23 --- navit.xml 5 Jan 2008 18:01:36 -0000 1.24 *************** *** 437,440 **** --- 437,444 ---- <circle color="#000000" radius="3" label_size="15" /> </item> + <item type="track" order="0-"> + <polyline color="#3f3f3f" width="1" /> + </item> + <item type="poi_airport" order="0-"> <icon src="airport.xpm" /> |
From: andi <bod...@us...> - 2008-01-05 16:12:20
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23697 Modified Files: item_def.h navit.xml Log Message: added Geocaching icons Index: item_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/item_def.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** item_def.h 5 Jan 2008 12:56:58 -0000 1.14 --- item_def.h 5 Jan 2008 16:12:19 -0000 1.15 *************** *** 198,201 **** --- 198,208 ---- ITEM(point_unkn) ITEM(traffic_signals) + ITEM(poi_gc_multi) + ITEM(poi_gc_tradi) + ITEM(poi_gc_event) + ITEM(poi_gc_mystery) + ITEM(poi_gc_question) + ITEM(poi_gc_stages) + ITEM(poi_gc_reference) /* Line */ ITEM2(0x80000000,line) Index: navit.xml =================================================================== RCS file: /cvsroot/navit/navit/src/navit.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** navit.xml 2 Jan 2008 00:16:25 -0000 1.22 --- navit.xml 5 Jan 2008 16:12:19 -0000 1.23 *************** *** 785,788 **** --- 785,812 ---- <icon src="picnic.xpm" /> </item> + <item type="poi_gc_multi" order="0-"> + <icon src="gc_multi.xpm" /> + </item> + <item type="poi_gc_tradi" order="0-"> + <icon src="gc_tradi.xpm" /> + </item> + <item type="poi_gc_event" order="0-"> + <icon src="gc_event.xpm" /> + </item> + <item type="poi_gc_mystery" order="0-"> + <icon src="gc_mystery.xpm" /> + </item> + <item type="poi_gc_question" order="0-"> + <icon src="gc_question.xpm" /> + </item> + <item type="poi_gc_stages" order="0-"> + <icon src="gc_stages.xpm" /> + </item> + <item type="poi_gc_reference" order="0-"> + <icon src="gc_reference.xpm" /> + </item> + <item type="poi_gc_webcam" order="0-"> + <icon src="gc_webcam.xpm" /> + </item> <item type="flats,scrub,military_zone,marine_poly,plantation,tundra" order="0-"> <polygon color="#a0a0a0" /> |