You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
| 2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
| 2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
| 2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
| 2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
|
From: Paul F. <pg...@us...> - 2009-03-30 13:57:05
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19740 Modified Files: buildmap_osm_main.c Log Message: print errno when pclose() fails Index: buildmap_osm_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_osm_main.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** buildmap_osm_main.c 15 Mar 2009 07:49:46 -0000 1.16 --- buildmap_osm_main.c 30 Mar 2009 13:56:56 -0000 1.17 *************** *** 32,35 **** --- 32,36 ---- #include <sys/types.h> #include <ctype.h> + #include <errno.h> #include "roadmap.h" *************** *** 221,225 **** if (pclose(fdata) != 0) { ! buildmap_error(0, "problem fetching data"); ret = -1; } --- 222,226 ---- if (pclose(fdata) != 0) { ! buildmap_error(0, "problem fetching data (%s)", strerror(errno)); ret = -1; } |
|
From: Danny B. <dan...@us...> - 2009-03-29 18:30:58
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8510 Modified Files: buildmap_shapefile.c Log Message: Fix Joshua's problem Index: buildmap_shapefile.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shapefile.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** buildmap_shapefile.c 18 Nov 2007 15:38:05 -0000 1.14 --- buildmap_shapefile.c 29 Mar 2009 18:30:52 -0000 1.15 *************** *** 497,501 **** to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point); SHPDestroyObject(shp); --- 497,502 ---- to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); SHPDestroyObject(shp); *************** *** 750,754 **** to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point); SHPDestroyObject(shp); --- 751,756 ---- to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); SHPDestroyObject(shp); *************** *** 984,988 **** to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point); SHPDestroyObject(shp); --- 986,991 ---- to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); SHPDestroyObject(shp); *************** *** 1150,1154 **** to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point); } --- 1153,1158 ---- to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); } *************** *** 1312,1316 **** to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point); } --- 1316,1321 ---- to_point = buildmap_point_add (tolong, tolat); ! line = buildmap_line_add (tlid, cfcc, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); } |
|
From: Danny B. <dan...@us...> - 2009-03-29 16:31:45
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9931 Modified Files: buildmap_line.c roadmap_line.c Log Message: Save space in the line/bypoint2 table: don't store points with no adjacent lines at all, instead represent them by NULL entries in line/bypoint1. See comments on the mailing list. Index: buildmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_line.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** buildmap_line.c 29 Mar 2009 11:51:49 -0000 1.22 --- buildmap_line.c 29 Mar 2009 16:31:33 -0000 1.23 *************** *** 1072,1075 **** --- 1072,1081 ---- b = p2 = (int *)q2; + /* + * With this NULL header, we know that no pointer in LineByPoint1 + * can be 0. We'll use this in roadmap_line_point_adjacent(). + */ + *(p2++) = 0; + for (i=0; i<max_line_by_point; i++) { /* *************** *** 1085,1094 **** tmp = realloc((void *)tmp, sz1 * sizeof(int)); } - p1[ix] = (int)(p2 - b); ! for (j=0; j<lbp[i].num; j++) { ! *(p2++) = buildmap_line_get_sorted(lbp[i].ptr[j]); } - *(p2++) = 0; } --- 1091,1106 ---- tmp = realloc((void *)tmp, sz1 * sizeof(int)); } ! /* Avoid storing NULL lists */ ! if (lbp[i].num == 0) { ! p1[ix] = 0; /* Catch this in roadmap_line_point_adjacent() */ ! } else { ! p1[ix] = (int)(p2 - b); ! ! for (j=0; j<lbp[i].num; j++) { ! *(p2++) = buildmap_line_get_sorted(lbp[i].ptr[j]); ! } ! *(p2++) = 0; } } *************** *** 1103,1113 **** { int i; ! int cnt = 0; for (i=0; i<max_line_by_point; i++) { cnt += lbp[i].num; } *LineByPoint1Count = max_line_by_point; ! *LineByPoint2Count = max_line_by_point + cnt; } --- 1115,1127 ---- { int i; ! int cnt = 1; /* Count the initial NULL */ for (i=0; i<max_line_by_point; i++) { cnt += lbp[i].num; + if (lbp[i].num) + cnt++; /* Count the NULL terminator */ } *LineByPoint1Count = max_line_by_point; ! *LineByPoint2Count = cnt; } Index: roadmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_line.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** roadmap_line.c 29 Mar 2009 13:28:14 -0000 1.18 --- roadmap_line.c 29 Mar 2009 16:31:33 -0000 1.19 *************** *** 42,45 **** --- 42,46 ---- #include "roadmap_square.h" #include "roadmap_layer.h" + #include "roadmap_locator.h" static char *RoadMapLineType = "RoadMapLineContext"; *************** *** 215,219 **** } ! #if 0 /* Get sizes */ { --- 216,220 ---- } ! #if 1 /* Get sizes */ { *************** *** 569,572 **** --- 570,582 ---- p = (int *)RoadMapLineActive->LineByPoint2; + + /* + * A NULL pointer in LineByPoint1 means an empty list, so we + * can avoid storing an almost meaningless NULL. + */ + if (*q == 0) { + return 0; + } + p += *q; |
|
From: Danny B. <dan...@us...> - 2009-03-29 13:28:19
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10034 Modified Files: roadmap_dbread.c roadmap_line.c Log Message: Remove dead code. Add the debug code that created the map sizes just published on the list. Index: roadmap_dbread.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_dbread.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** roadmap_dbread.c 28 Mar 2009 15:58:05 -0000 1.19 --- roadmap_dbread.c 29 Mar 2009 13:28:14 -0000 1.20 *************** *** 606,609 **** --- 606,611 ---- return 0; } + roadmap_log (ROADMAP_DEBUG, "roadmap_db_get_size(%s) : %d", + section->head->name, section->head->size); return (unsigned) (section->head->size); } Index: roadmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_line.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** roadmap_line.c 29 Mar 2009 12:08:57 -0000 1.17 --- roadmap_line.c 29 Mar 2009 13:28:14 -0000 1.18 *************** *** 197,205 **** if (by_point1_table && by_point2_table) { - roadmap_log(ROADMAP_DEBUG, "***** This map has line by point *****"); context->LineByPoint1 = (RoadMapLineByPoint1 *) roadmap_db_get_data (by_point1_table); context->LineByPoint1Count = roadmap_db_get_count (by_point1_table); - roadmap_log(ROADMAP_DEBUG, "***** This map has line by point1 (%d) *****", - context->LineByPoint1Count); if (roadmap_db_get_size (by_point1_table) != --- 197,202 ---- *************** *** 211,216 **** context->LineByPoint2 = (RoadMapLineByPoint2 *) roadmap_db_get_data (by_point2_table); context->LineByPoint2Count = roadmap_db_get_count (by_point2_table); - roadmap_log(ROADMAP_DEBUG, "***** This map has line by point2 (%d) *****", - context->LineByPoint2Count); if (roadmap_db_get_size (by_point2_table) != --- 208,211 ---- *************** *** 219,222 **** --- 214,245 ---- goto roadmap_line_map_abort; } + + #if 0 + /* Get sizes */ + { + int i, j, counters[20], lost; + int *p, *q; + + for (j=0; j<20; j++) counters[j] = 0; + lost = 0; + for (i=0; i<context->LineByPoint1Count; i++) { + q = (int *)context->LineByPoint1; + q += i; + + p = (int *)context->LineByPoint2; + p += *q; + + for (j=0; p[j]; j++) + ; + if (j < 20) + counters[j]++; + else + lost++; + } + for (j=0; j<20; j++) + roadmap_log(ROADMAP_DEBUG, "stats(%d) -> %d", j, counters[j]); + roadmap_log(ROADMAP_DEBUG, "lost stats(>= 20) -> %d", lost); + } + #endif } else { context->LineByPoint1 = 0; *************** *** 448,501 **** /** - * @brief OLD, TO BE REMOVED EXCEPT FOR BACKWARDS COMPATIBILITY - * determine the layer that some line is in - * note: rewritten completely, I guess Ehud's data model is different from trunk - * @param line_id the line whose layer we want to query - * @return the layer - */ - int roadmap_line_get_layer_old (int line_id) - { - int *index; - int first, last, layer, i; - int square; - RoadMapPosition pos; - int last_road_layer; - - /* - * This is hacked for now, we can't call roadmap_layer_() functions from here - * because this would pull roadmap_canvas_() functions into executables that - * aren't linked with that (e.g. roadgps). - */ - #define roadmap_layer_road_last() 11 - #warning Hack for roadmap_layer_road_last - - last_road_layer = roadmap_layer_road_last(); - - if (RoadMapLineActive == NULL) - return 0; /* No line. */ - - roadmap_point_position(RoadMapLineActive->Line[line_id].from, &pos); - square = roadmap_square_search (&pos); - - square = roadmap_square_index(square); - if (square < 0) { - return 0; /* This square is empty. */ - } - - index = RoadMapLineActive->LineByLayer1 + RoadMapLineActive->LineBySquare1[square].first; - - for (layer = 1; layer < last_road_layer; layer++) { - first = index[layer-1]; - last = index[layer]-1; - - for (i=first; i<last; i++) - if (i == line_id) { - return layer; - } - } - return 0; - } - - /** * @brief determine the layer that some line is in * @param line_id the line whose layer we want to query --- 471,474 ---- *************** *** 517,531 **** } ! return roadmap_line_get_layer_old(line); } - #if 0 - /* debug */ - int ol = roadmap_line_get_layer_old(line), - nl = RoadMapLineActive->Line2[line].layer; - if (ol != nl) - roadmap_log (ROADMAP_WARNING, "roadmap_line_get_layer(%d) old %d new %d", - line, ol, nl); - #endif return RoadMapLineActive->Line2[line].layer; } --- 490,496 ---- } ! return 0; } return RoadMapLineActive->Line2[line].layer; } *************** *** 548,552 **** } - #if defined(HAVE_NAVIGATE_PLUGIN) /** * @brief look up the point that a line is coming "from" --- 513,516 ---- *************** *** 577,581 **** return RoadMapLineActive->Line[line].to; } - #endif /** --- 541,544 ---- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:37
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/rdmghost In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/rdmghost Removed Files: rdmghost.vcp Log Message: These are ancient and not useful in their current state. --- rdmghost.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:36
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/libguiroadgps In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/libguiroadgps Removed Files: libguiroadgps.vcp Log Message: These are ancient and not useful in their current state. --- libguiroadgps.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:32
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/libroadmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/libroadmap Removed Files: libroadmap.vcp Log Message: These are ancient and not useful in their current state. --- libroadmap.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:32
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/libwinceguiroadmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/libwinceguiroadmap Removed Files: libwinceguiroadmap.vcp Log Message: These are ancient and not useful in their current state. --- libwinceguiroadmap.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:32
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/libosroadmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/libosroadmap Removed Files: libosroadmap.vcp Log Message: These are ancient and not useful in their current state. --- libosroadmap.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:31
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/libguiroadmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/libguiroadmap Removed Files: libguiroadmap.vcp Log Message: These are ancient and not useful in their current state. --- libguiroadmap.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:31
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341 Removed Files: Roadmap.vcw Log Message: These are ancient and not useful in their current state. --- Roadmap.vcw DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:31
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/RoadGPS In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/RoadGPS Removed Files: RoadGPS.vcp Log Message: These are ancient and not useful in their current state. --- RoadGPS.vcp DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:29:31
|
Update of /cvsroot/roadmap/roadmap/src/win32/wince_env/Roadmap In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19341/Roadmap Removed Files: Roadmap.vcp Log Message: These are ancient and not useful in their current state. --- Roadmap.vcp DELETED --- |
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19051 Removed Files: roadmap_db_line_route.h roadmap_db_line_speed.h roadmap_line_route.c roadmap_line_route.h roadmap_line_speed.c roadmap_line_speed.h Log Message: Remove files we no longer need. --- roadmap_line_speed.c DELETED --- --- roadmap_line_speed.h DELETED --- --- roadmap_line_route.h DELETED --- --- roadmap_line_route.c DELETED --- --- roadmap_db_line_speed.h DELETED --- --- roadmap_db_line_route.h DELETED --- |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:27:16
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18815 Modified Files: roadmap_point.c Log Message: Implement an additional function called by the roadmap_turns code. Index: roadmap_point.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_point.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_point.c 11 Jun 2008 03:47:39 -0000 1.6 --- roadmap_point.c 29 Mar 2009 12:27:09 -0000 1.7 *************** *** 1,4 **** ! /* roadmap_point.c - Manage the points that define tiger lines. ! * * LICENSE: * --- 1,3 ---- ! /* * LICENSE: * *************** *** 20,30 **** * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * SYNOPSYS: ! * ! * int roadmap_point_in_square (int square, int *first, int *last); ! * void roadmap_point_position (int point, RoadMapPosition *position); ! * ! * These functions are used to retrieve the points that make the lines. */ --- 19,27 ---- * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! ! /** ! * @file ! * @brief Manage the points that define lines. */ *************** *** 41,57 **** #include "roadmap_point.h" ! typedef struct { ! char *type; ! RoadMapPoint *Point; ! int PointCount; ! RoadMapPointBySquare *BySquare; ! int BySquareCount; ! unsigned short *PointToSquare2; ! int *PointToSquare4; } RoadMapPointContext; --- 38,56 ---- #include "roadmap_point.h" ! /** ! * @brief ! */ typedef struct { ! char *type; /**< */ ! RoadMapPoint *Point; /**< */ ! int PointCount; /**< */ ! RoadMapPointBySquare *BySquare; /**< */ ! int BySquareCount; /**< */ ! unsigned short *PointToSquare2; /**< */ ! int *PointToSquare4; /**< */ } RoadMapPointContext; *************** *** 61,66 **** static RoadMapPosition RoadMapPointPositionLastMin; ! ! static void *roadmap_point_map (roadmap_db *root) { --- 60,68 ---- static RoadMapPosition RoadMapPointPositionLastMin; ! /** ! * @brief ! * @param root ! * @return ! */ static void *roadmap_point_map (roadmap_db *root) { *************** *** 99,102 **** --- 101,109 ---- } + /** + * @brief + * @param context + * @return + */ static void roadmap_point_activate (void *context) { *************** *** 111,114 **** --- 118,126 ---- } + /** + * @brief + * @param context + * @return + */ static void roadmap_point_unmap (void *context) { *************** *** 128,131 **** --- 140,146 ---- } + /** + * @brief + */ roadmap_db_handler RoadMapPointHandler = { "point", *************** *** 135,140 **** }; ! ! static void roadmap_point_retrieve_square (void) { --- 150,156 ---- }; ! /** ! * @brief ! */ static void roadmap_point_retrieve_square (void) { *************** *** 195,199 **** } ! int roadmap_point_in_square (int square, int *first, int *last) { --- 211,221 ---- } ! /** ! * @brief query the number of points (and the first and last ones) in a square ! * @param square ! * @param first ! * @param last ! * @return ! */ int roadmap_point_in_square (int square, int *first, int *last) { *************** *** 211,215 **** } ! void roadmap_point_position (int point, RoadMapPosition *position) { --- 233,241 ---- } ! /** ! * @brief query the position of a point ! * @param point ! * @param position ! */ void roadmap_point_position (int point, RoadMapPosition *position) { *************** *** 257,258 **** --- 283,297 ---- } + #ifdef HAVE_NAVIGATE_PLUGIN + /** + * @brief queries the total number of points + * @return the total number of points + */ + int roadmap_point_count(void) + { + if (RoadMapPointActive == NULL) + return 0; /* No line */ + + return RoadMapPointActive->PointCount; + } + #endif |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:09:04
|
Update of /cvsroot/roadmap/roadmap/src/navigate In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14769/navigate Modified Files: navigate.c navigate_cost.c navigate_instr.c navigate_simple.c navigate_visual.c Log Message: Cleanup roadmap_line_street/roadmap_line_route stuff. Implement oneway street support in roadmap_line and its callers. Index: navigate_visual.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/navigate/navigate_visual.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** navigate_visual.c 15 Feb 2009 16:47:49 -0000 1.1 --- navigate_visual.c 29 Mar 2009 12:08:58 -0000 1.2 *************** *** 35,40 **** #include "roadmap.h" #include "roadmap_line.h" ! #include "roadmap_line_route.h" ! #include "roadmap_line_speed.h" #include "roadmap_lang.h" #include "roadmap_layer.h" --- 35,40 ---- #include "roadmap.h" #include "roadmap_line.h" ! // #include "roadmap_line_route.h" ! // #include "roadmap_line_speed.h" #include "roadmap_lang.h" #include "roadmap_layer.h" Index: navigate_cost.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/navigate/navigate_cost.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** navigate_cost.c 23 Mar 2009 20:41:28 -0000 1.2 --- navigate_cost.c 29 Mar 2009 12:08:58 -0000 1.3 *************** *** 36,41 **** #include "roadmap_lang.h" #include "roadmap_start.h" ! #include "roadmap_line_route.h" ! #include "roadmap_line_speed.h" #include "roadmap_layer.h" #include "roadmap_dialog.h" --- 36,41 ---- #include "roadmap_lang.h" #include "roadmap_start.h" ! // #include "roadmap_line_route.h" ! // #include "roadmap_line_speed.h" #include "roadmap_layer.h" #include "roadmap_dialog.h" *************** *** 207,210 **** --- 207,213 ---- if (node_id != -1) penalty = calc_penalty (line_id, layer, prev_line); + #if 1 + #warning need to replace roadmap_line_speed + #else cross_time = roadmap_line_speed_get_cross_time_at (line_id, is_reversed, start_time + cur_cost); *************** *** 212,215 **** --- 215,219 ---- if (!cross_time) cross_time = roadmap_line_speed_get_avg_cross_time (line_id, is_reversed); + #endif switch (penalty) { Index: navigate_simple.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/navigate/navigate_simple.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** navigate_simple.c 23 Mar 2009 20:41:28 -0000 1.6 --- navigate_simple.c 29 Mar 2009 12:08:58 -0000 1.7 *************** *** 41,45 **** #include "roadmap_dialog.h" #include "roadmap_main.h" ! #include "roadmap_line_route.h" #include "roadmap_street.h" #include "roadmap_fuzzy.h" --- 41,45 ---- #include "roadmap_dialog.h" #include "roadmap_main.h" ! // #include "roadmap_line_route.h" #include "roadmap_street.h" #include "roadmap_fuzzy.h" *************** *** 56,63 **** #include "navigate_route.h" ! #define maxblacklist 30 static int blacklist[maxblacklist]; int nblacklist = 0; /** * @brief add this line to the blacklist : never to be visited --- 56,65 ---- #include "navigate_route.h" ! #define maxblacklist 300 static int blacklist[maxblacklist]; int nblacklist = 0; + static int NavigateEndAtThisDistance = 50; /**< If we're this close, we're there. */ + /** * @brief add this line to the blacklist : never to be visited *************** *** 218,221 **** --- 220,231 ---- } + /* Oneway street ? */ + if (roadmap_line_get_oneway(lines[i].line_id) == ROADMAP_LINE_DIRECTION_ONEWAY) { + roadmap_log (ROADMAP_WARNING, "Not taking oneway street %d (%s)", + lines[i].line_id, + roadmap_street_get_full_name(&prop)); + continue; + } + /* Use the turns DB : is this turn allowed ? */ if (roadmap_turns_find_restriction (s->from_point, *************** *** 351,355 **** roadmap_log (ROADMAP_DEBUG, "Distance is now %d", dist); ! if (dist < 30) return 1; return 0; /* Keep going */ --- 361,365 ---- roadmap_log (ROADMAP_DEBUG, "Distance is now %d", dist); ! if (dist < NavigateEndAtThisDistance) return 1; return 0; /* Keep going */ Index: navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/navigate/navigate.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** navigate.c 23 Mar 2009 20:41:28 -0000 1.2 --- navigate.c 29 Mar 2009 12:08:57 -0000 1.3 *************** *** 48,52 **** #include "roadmap_navigate.h" #include "roadmap_screen.h" ! #include "roadmap_line_route.h" #include "roadmap_math.h" #include "roadmap_point.h" --- 48,52 ---- #include "roadmap_navigate.h" #include "roadmap_screen.h" ! // #include "roadmap_line_route.h" #include "roadmap_math.h" #include "roadmap_point.h" *************** *** 414,420 **** } void navigate_format_messages(void) { ! // roadmap_log (ROADMAP_WARNING, "navigate_format_messages -> navigate_update(NULL, NULL);"); navigate_update(NULL, NULL); } --- 414,432 ---- } + /** + * @brief gets called after every GPS input, choose when to do something + */ void navigate_format_messages(void) { ! static int counter = 0; ! ! counter++; ! ! /* Don't call this so often */ ! if (counter < 10) ! return; ! ! counter = 0; ! roadmap_log (ROADMAP_WARNING, "navigate_format_messages -> navigate_update(NULL, NULL);"); navigate_update(NULL, NULL); } *************** *** 614,617 **** --- 626,631 ---- roadmap_skin_register (navigate_init_pens); + #if 0 + /* FIX ME need to figure out why this causes roadmap to stop */ if (roadmap_config_get_integer (&NavigateConfigNavigating)) { RoadMapPosition pos; *************** *** 622,625 **** --- 636,640 ---- navigate_calc_route (); } + #endif } Index: navigate_instr.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/navigate/navigate_instr.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** navigate_instr.c 15 Feb 2009 16:47:49 -0000 1.1 --- navigate_instr.c 29 Mar 2009 12:08:58 -0000 1.2 *************** *** 31,35 **** #include "roadmap.h" #include "roadmap_line.h" ! #include "roadmap_line_route.h" #include "roadmap_math.h" #include "roadmap_point.h" --- 31,35 ---- #include "roadmap.h" #include "roadmap_line.h" ! // #include "roadmap_line_route.h" #include "roadmap_math.h" #include "roadmap_point.h" |
|
From: Danny B. <dan...@us...> - 2009-03-29 12:09:04
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14769 Modified Files: roadmap_line.c roadmap_plugin.c roadmap_screen.c roadmap_turns.c Log Message: Cleanup roadmap_line_street/roadmap_line_route stuff. Implement oneway street support in roadmap_line and its callers. Index: roadmap_turns.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_turns.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_turns.c 23 Mar 2009 20:41:28 -0000 1.3 --- roadmap_turns.c 29 Mar 2009 12:08:57 -0000 1.4 *************** *** 290,294 **** * @param from_line * @param to_line ! * @return */ int roadmap_turns_find_restriction (int node, int from_line, int to_line) { --- 290,294 ---- * @param from_line * @param to_line ! * @return 1 if there's a restriction (if this move is not allowed), 0 otherwise. */ int roadmap_turns_find_restriction (int node, int from_line, int to_line) { Index: roadmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_line.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** roadmap_line.c 18 Mar 2009 18:18:24 -0000 1.16 --- roadmap_line.c 29 Mar 2009 12:08:57 -0000 1.17 *************** *** 54,57 **** --- 54,58 ---- RoadMapLine *Line; int LineCount; + RoadMapLine2 *Line2; RoadMapLineBySquare *LineBySquare1; *************** *** 87,90 **** --- 88,92 ---- roadmap_db *line_table; + roadmap_db *line2_table; roadmap_db *index2_table; roadmap_db *square1_table; *************** *** 105,108 **** --- 107,111 ---- line_table = roadmap_db_get_subsection (root, "data"); + line2_table = roadmap_db_get_subsection (root, "data2"); square1_table = roadmap_db_get_subsection (root, "bysquare1"); layer1_table = roadmap_db_get_subsection (root, "bylayer1"); *************** *** 122,125 **** --- 125,137 ---- goto roadmap_line_map_abort; } + /* Backwards compatibility : cope with data2 absence */ + if (line2_table) { + context->Line2 = (RoadMapLine2 *) roadmap_db_get_data (line2_table); + if (roadmap_db_get_size (line2_table) != + context->LineCount * sizeof(RoadMapLine2)) { + roadmap_log (ROADMAP_ERROR, "invalid line/data2 structure"); + goto roadmap_line_map_abort; + } + } context->LineBySquare1 = *************** *** 185,192 **** if (by_point1_table && by_point2_table) { ! roadmap_log(ROADMAP_WARNING, "***** This map has line by point *****"); context->LineByPoint1 = (RoadMapLineByPoint1 *) roadmap_db_get_data (by_point1_table); context->LineByPoint1Count = roadmap_db_get_count (by_point1_table); ! roadmap_log(ROADMAP_WARNING, "***** This map has line by point1 (%d) *****", context->LineByPoint1Count); --- 197,204 ---- if (by_point1_table && by_point2_table) { ! roadmap_log(ROADMAP_DEBUG, "***** This map has line by point *****"); context->LineByPoint1 = (RoadMapLineByPoint1 *) roadmap_db_get_data (by_point1_table); context->LineByPoint1Count = roadmap_db_get_count (by_point1_table); ! roadmap_log(ROADMAP_DEBUG, "***** This map has line by point1 (%d) *****", context->LineByPoint1Count); *************** *** 199,203 **** context->LineByPoint2 = (RoadMapLineByPoint2 *) roadmap_db_get_data (by_point2_table); context->LineByPoint2Count = roadmap_db_get_count (by_point2_table); ! roadmap_log(ROADMAP_WARNING, "***** This map has line by point2 (%d) *****", context->LineByPoint2Count); --- 211,215 ---- context->LineByPoint2 = (RoadMapLineByPoint2 *) roadmap_db_get_data (by_point2_table); context->LineByPoint2Count = roadmap_db_get_count (by_point2_table); ! roadmap_log(ROADMAP_DEBUG, "***** This map has line by point2 (%d) *****", context->LineByPoint2Count); *************** *** 436,445 **** /** ! * @brief determine the layer that some line is in * note: rewritten completely, I guess Ehud's data model is different from trunk * @param line_id the line whose layer we want to query * @return the layer */ ! int roadmap_line_get_layer (int line_id) { int *index; --- 448,458 ---- /** ! * @brief OLD, TO BE REMOVED EXCEPT FOR BACKWARDS COMPATIBILITY ! * determine the layer that some line is in * note: rewritten completely, I guess Ehud's data model is different from trunk * @param line_id the line whose layer we want to query * @return the layer */ ! int roadmap_line_get_layer_old (int line_id) { int *index; *************** *** 484,487 **** --- 497,551 ---- } + /** + * @brief determine the layer that some line is in + * @param line_id the line whose layer we want to query + * @return the layer + */ + int roadmap_line_get_layer (int line) + { + #ifdef ROADMAP_INDEX_DEBUG + if (line < 0 || line >= RoadMapLineActive->LineCount) { + roadmap_log (ROADMAP_FATAL, "illegal line index %d", line); + } + #endif + if (RoadMapLineActive->Line2 == 0) { + static int once = 1; + + if (once) { + once = 0; + roadmap_log (ROADMAP_WARNING, "Map without data2 -> no layer info"); + + } + return roadmap_line_get_layer_old(line); + } + + #if 0 + /* debug */ + int ol = roadmap_line_get_layer_old(line), + nl = RoadMapLineActive->Line2[line].layer; + if (ol != nl) + roadmap_log (ROADMAP_WARNING, "roadmap_line_get_layer(%d) old %d new %d", + line, ol, nl); + #endif + return RoadMapLineActive->Line2[line].layer; + } + + /** + * @brief determine the layer that some line is in + * @param line_id the line whose layer we want to query + * @return the layer + */ + int roadmap_line_get_oneway (int line) + { + #ifdef ROADMAP_INDEX_DEBUG + if (line < 0 || line >= RoadMapLineActive->LineCount) { + roadmap_log (ROADMAP_FATAL, "illegal line index %d", line); + } + #endif + if (RoadMapLineActive->Line2 == 0) + return 0; + return RoadMapLineActive->Line2[line].oneway; + } + #if defined(HAVE_NAVIGATE_PLUGIN) /** Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** roadmap_screen.c 6 Nov 2008 20:31:02 -0000 1.135 --- roadmap_screen.c 29 Mar 2009 12:08:57 -0000 1.136 *************** *** 1,4 **** ! /* roadmap_screen.c - Draw the map on the screen. ! * * LICENSE: * --- 1,3 ---- ! /* * LICENSE: * *************** *** 20,27 **** * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * SYNOPSYS: ! * ! * See roadmap_screen.h. */ --- 19,27 ---- * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! ! /** ! * @file ! * @brief Draw the map on the screen. */ *************** *** 340,344 **** } ! static void roadmap_screen_draw_line (const RoadMapPosition *from, const RoadMapPosition *to, --- 340,356 ---- } ! /** ! * @brief draw a line, including non-straight ones ! * @param from ! * @param to ! * @param fully_visible ! * @param shape_start ! * @param first_shape ! * @param last_shape ! * @param pen ! * @param total_length_ptr ! * @param middle ! * @param angle ! */ static void roadmap_screen_draw_line (const RoadMapPosition *from, const RoadMapPosition *to, *************** *** 942,947 **** /* Check if a plugin wants to override the pen. */ ! if (! roadmap_plugin_override_pen ! (line, layer, pen_index, fips, &pen)) { pen = layer_pen; } --- 954,958 ---- /* Check if a plugin wants to override the pen. */ ! if (! roadmap_plugin_override_pen (line, layer, pen_index, fips, &pen)) { pen = layer_pen; } *************** *** 1004,1008 **** */ if (!roadmap_plugin_override_line (line, layer, fips)) { - if (roadmap_screen_draw_one_line(line, layer, pen_index, layer_pen, fips, --- 1015,1018 ---- *************** *** 1079,1083 **** if (!roadmap_plugin_override_line (line, layer, fips)) { - if (roadmap_screen_draw_one_line(line, layer, pen_index, layer_pen, fips, --- 1089,1092 ---- *************** *** 1187,1191 **** if (!roadmap_plugin_override_line (line, layer, fips)) { - if (roadmap_screen_draw_one_line(line, layer, pen_index, layer_pen, fips, --- 1196,1199 ---- *************** *** 1574,1581 **** --- 1582,1596 ---- roadmap_screen_flush_polygons (); roadmap_object_iterate_sprite (roadmap_screen_draw_sprite_object); + + roadmap_plugin_format_messages (); roadmap_trip_format_messages (); + roadmap_landmark_display (); roadmap_features_display (); + #ifdef HAVE_TRIP_PLUGIN + roadmap_trip_display(); /* trip_display (); */ + #else roadmap_trip_display (); + #endif roadmap_track_display (); roadmap_screen_obj_draw (); *************** *** 1593,1596 **** --- 1608,1614 ---- roadmap_canvas_refresh (); + /* After the refresh, but after what exactly ? */ + roadmap_plugin_after_refresh (); + out: if (!RoadMapScreenDragging) *************** *** 1643,1647 **** --- 1661,1669 ---- } + #ifdef HAVE_TRIP_PLUGIN + roadmap_trip_set_point ("Selection", &position); /* trip_set_point ("Selection", &position); */ + #else roadmap_trip_set_point ("Selection", &position); + #endif roadmap_screen_refresh (); *************** *** 2266,2267 **** --- 2288,2311 ---- #endif // ROADMAP_DBG_TIME + + #if defined(HAVE_TRIP_PLUGIN) || defined(HAVE_NAVIGATE_PLUGIN) + /** + * @brief + * @param dy + */ + void roadmap_screen_move_center (int dy) + { + // RoadMapScreenCenterDelta += dy; + } + #endif + + #ifdef HAVE_TRIP_PLUGIN + /** + * @brief simplistic version + * @return + */ + int roadmap_screen_height(void) + { + return RoadMapScreenHeight; + } + #endif Index: roadmap_plugin.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_plugin.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_plugin.c 15 Feb 2009 15:32:27 -0000 1.6 --- roadmap_plugin.c 29 Mar 2009 12:08:57 -0000 1.7 *************** *** 37,43 **** #include "roadmap_library.h" #include "roadmap_plugin.h" - #ifdef HAVE_NAVIGATE_PLUGIN - #include "roadmap_line_route.h" - #endif #include "roadmap_messagebox.h" --- 37,40 ---- *************** *** 311,316 **** } } - void roadmap_plugin_line_from (const PluginLine *line, RoadMapPosition *pos) { --- 308,317 ---- } } + /** + * @brief + * @param line + * @param pos + */ void roadmap_plugin_line_from (const PluginLine *line, RoadMapPosition *pos) { *************** *** 340,344 **** } ! void roadmap_plugin_line_to (const PluginLine *line, RoadMapPosition *pos) { --- 341,349 ---- } ! /** ! * @brief ! * @param line ! * @param pos ! */ void roadmap_plugin_line_to (const PluginLine *line, RoadMapPosition *pos) { *************** *** 368,372 **** } ! int roadmap_plugin_override_line (int line, int layer, int fips) { --- 373,383 ---- } ! /** ! * @brief ! * @param line ! * @param layer ! * @param fips ! * @return ! */ int roadmap_plugin_override_line (int line, int layer, int fips) { *************** *** 390,393 **** --- 401,413 ---- + /** + * @brief + * @param line + * @param layer + * @param pen_type + * @param fips + * @param override_pen + * @return + */ int roadmap_plugin_override_pen (int line, int layer, *************** *** 623,626 **** --- 643,650 ---- int roadmap_plugin_get_direction (PluginLine *line, int who) { + #if 1 + #warning implement roadmap_plugin_get_direction + return 0; + #else if (line->plugin_id == ROADMAP_PLUGIN_ID) { *************** *** 643,647 **** return 0; } ! } #endif --- 667,671 ---- return 0; } ! #endif } #endif |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:57:13
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11776 Modified Files: buildmap_tiger.c Log Message: Use the extra parameter to buildmap_line_add here too. Note that I've not done an effort to fill it with a sensible value. Index: buildmap_tiger.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_tiger.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** buildmap_tiger.c 19 Nov 2007 17:32:45 -0000 1.20 --- buildmap_tiger.c 29 Mar 2009 11:57:07 -0000 1.21 *************** *** 1,7 **** ! /* buildmap_tiger.c - a module to read the original Tiger files. ! * * LICENSE: * * Copyright 2002 Pascal F. Martin * * This file is part of RoadMap. --- 1,7 ---- ! /* * LICENSE: * * Copyright 2002 Pascal F. Martin + * Copyright (c) 2009, Danny Backx * * This file is part of RoadMap. *************** *** 20,32 **** * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * SYNOPSYS: - * - * This module decodes (and converts to the RoadMap format) the TIGER/Line - * data. - * - * See buildmap-tiger.h */ #include <stdio.h> #include <stdlib.h> --- 20,29 ---- * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /** + * @file + * @brief a module to read the original Tiger files. + */ #include <stdio.h> #include <stdlib.h> *************** *** 44,47 **** --- 41,45 ---- #include "roadmap_math.h" #include "roadmap_path.h" + #include "roadmap_line.h" #include "buildmap.h" *************** *** 487,491 **** BuildMapTigerLayerStatistics[cfcc].line_count += 1; ! line = buildmap_line_add (tlid, cfcc, from_point, to_point); if (cursor[55] == 'A') { /* Roads. */ --- 485,490 ---- BuildMapTigerLayerStatistics[cfcc].line_count += 1; ! line = buildmap_line_add (tlid, cfcc, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); if (cursor[55] == 'A') { /* Roads. */ *************** *** 646,650 **** } - /* Table 2: shapes. */ --- 645,648 ---- |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:54:55
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11277 Modified Files: buildmap_street.c Log Message: Documentation Index: buildmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_street.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** buildmap_street.c 4 Aug 2008 17:44:07 -0000 1.8 --- buildmap_street.c 29 Mar 2009 11:54:47 -0000 1.9 *************** *** 90,94 **** /** ! * @brief */ static void buildmap_street_initialize (void) { --- 90,94 ---- /** ! * @brief initialize the buildmap street module */ static void buildmap_street_initialize (void) { *************** *** 104,115 **** /** ! * @brief ! * @param cfcc ! * @param fedirp ! * @param fename ! * @param fetype ! * @param fedirs ! * @param line ! * @return */ int buildmap_street_add --- 104,115 ---- /** ! * @brief Add a street to the buildmap street module ! * @param cfcc the layer ! * @param fedirp directory ! * @param fename name ! * @param fetype type ! * @param fedirs huh ? ! * @param line line number ! * @return the number of the newly created street */ int buildmap_street_add *************** *** 134,138 **** if (StreetByName == NULL) buildmap_street_initialize(); - StreetAddCount += 1; --- 134,137 ---- |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:54:32
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11165 Modified Files: buildmap_square.c Log Message: Change error messages so it is clear where they come from. Index: buildmap_square.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_square.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** buildmap_square.c 4 Aug 2008 17:44:07 -0000 1.13 --- buildmap_square.c 29 Mar 2009 11:54:26 -0000 1.14 *************** *** 302,306 **** if ((squareid < 0) || (squareid > SquareTableSize)) { ! buildmap_fatal (0, "invalid square index %d", squareid); } --- 302,306 ---- if ((squareid < 0) || (squareid > SquareTableSize)) { ! buildmap_fatal (0, "buildmap_square_get_sorted : invalid square index %d", squareid); } *************** *** 331,335 **** if ((square < 0) || (square > SquareCount)) { ! buildmap_fatal (0, "invalid square index %d", square); } --- 331,335 ---- if ((square < 0) || (square > SquareCount)) { ! buildmap_fatal (0, "buildmap_square_get_reference_sorted : invalid square index %d", square); } |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:54:02
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv11027 Modified Files: buildmap_shape.c Log Message: Add small amount of documentation Index: buildmap_shape.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shape.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** buildmap_shape.c 4 Aug 2008 17:44:07 -0000 1.12 --- buildmap_shape.c 29 Mar 2009 11:53:56 -0000 1.13 *************** *** 25,38 **** * @brief Build a shape table & index for RoadMap. * ! * SYNOPSYS: ! * ! * int buildmap_shape_add ! * (int line, int sequence, int longitude, int latitude); * ! * These functions are used to build a table of shape points from ! * the Tiger maps. The objective is double: (1) reduce the size of ! * the Tiger data by sharing all duplicated information and ! * (2) produce the index data to serve as the basis for a fast ! * search mechanism for areas in roadmap. */ --- 25,32 ---- * @brief Build a shape table & index for RoadMap. * ! * Shapes are definitions of the points that make up a non-straight line. * ! * Remember : a line is a non-interrupted thing (e.g. no intersections in between), ! * but this makes it possible for it to have another shape than straight. */ *************** *** 99,103 **** /** ! * @brief * @param line * @param irec --- 93,97 ---- /** ! * @brief Add a shape entry * @param line * @param irec *************** *** 108,114 **** * @return */ ! int buildmap_shape_add ! (int line, int irec, int uid, int sequence, int longitude, int latitude) { ! int index; int line_exists; --- 102,107 ---- * @return */ ! int buildmap_shape_add (int line, int irec, int uid, int sequence, int longitude, int latitude) ! { int index; int line_exists; *************** *** 117,124 **** BuildMapShape *this_shape; - if (ShapeByLine == NULL) buildmap_shape_initialize (); - ShapeAddCount += 1; --- 110,115 ---- |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:53:26
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10908 Modified Files: buildmap_main.c Log Message: Add documentation stubs Index: buildmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_main.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** buildmap_main.c 21 Dec 2007 22:51:52 -0000 1.19 --- buildmap_main.c 29 Mar 2009 11:53:19 -0000 1.20 *************** *** 1,4 **** ! /* buildmap_main.c - The main function of the map builder tool. ! * * LICENSE: * --- 1,3 ---- ! /* * LICENSE: * *************** *** 22,25 **** --- 21,29 ---- */ + /** + * @file + * @brief The main function of the map builder tool. + */ + #include <string.h> #include <stdio.h> |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:53:08
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10812 Modified Files: buildmap_layer.c Log Message: Add documentation stubs. Index: buildmap_layer.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_layer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** buildmap_layer.c 5 Feb 2006 23:14:33 -0000 1.1 --- buildmap_layer.c 29 Mar 2009 11:52:57 -0000 1.2 *************** *** 1,4 **** ! /* buildmap_layer.c - Layer management: list, identify. ! * * LICENSE: * --- 1,3 ---- ! /* * LICENSE: * *************** *** 20,31 **** * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * SYNOPSYS: ! * ! * See buildmap_layer.h. ! * ! * This module is only concerned about retrieving which layers are ! * defined for a given class. It is used by the data source decoders ! * to filter out unwanted layers from the data source. */ --- 19,31 ---- * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + /** + * @file + * @brief Layer management: list, identify. * ! * This module is only concerned with retrieving which layers are ! * defined for a given class. It is used by the data source decoders ! * to filter out unwanted layers from the data source. */ *************** *** 47,51 **** static int BuildMapPolygonLayerCount = 0; ! int buildmap_layer_get (const char *name) { --- 47,55 ---- static int BuildMapPolygonLayerCount = 0; ! /** ! * @brief look up the layer number, for a given layer name ! * @param name a layer name (string) ! * @return numeric representation of a layer ! */ int buildmap_layer_get (const char *name) { *************** *** 69,73 **** /* Initialization code. ------------------------------------------- */ ! static int buildmap_layer_split (char *text, char *field[], int max) { --- 73,83 ---- /* Initialization code. ------------------------------------------- */ ! /** ! * @brief ! * @param text ! * @param field ! * @param max ! * @return ! */ static int buildmap_layer_split (char *text, char *field[], int max) { *************** *** 89,92 **** --- 99,110 ---- } + /** + * @brief + * @param config + * @param id + * @param args + * @param max + * @return + */ static int buildmap_layer_decode (const char *config, const char *id, char**args, int max) { *************** *** 118,122 **** } ! void buildmap_layer_load (const char *class_file) { --- 136,143 ---- } ! /** ! * @brief load a class file into memory ! * @param class_file path to the class file to load, usually "default/All" . ! */ void buildmap_layer_load (const char *class_file) { |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:51:55
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10510 Modified Files: buildmap_empty.c buildmap_line.c buildmap_osm_binary.c buildmap_osm_text.c Log Message: Changes to create the additional table in the lines/ map. Index: buildmap_osm_text.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_osm_text.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** buildmap_osm_text.c 13 Mar 2009 16:45:00 -0000 1.12 --- buildmap_osm_text.c 29 Mar 2009 11:51:49 -0000 1.13 *************** *** 47,50 **** --- 47,51 ---- #include "roadmap_file.h" #include "roadmap_osm.h" + #include "roadmap_line.h" #include "buildmap.h" *************** *** 80,83 **** --- 81,86 ---- the table flags */ static int WayInvalid = 0; /**< this way contains invalid nodes */ + static int WayIsOneWay = ROADMAP_LINE_DIRECTION_BOTH; + /**< is this way one direction only */ /** *************** *** 193,196 **** --- 196,200 ---- WayFlags = 0; WayInvalid = 0; + WayIsOneWay = ROADMAP_LINE_DIRECTION_BOTH; } *************** *** 453,458 **** for (i=0; i<nc[row].max; i++) ! if (node == nc[row].row[i].node) return nc[row].row[i].count; buildmap_fatal(0, "NodeReportUse %d", node); return -1; --- 457,463 ---- for (i=0; i<nc[row].max; i++) ! if (node == nc[row].row[i].node) { return nc[row].row[i].count; + } buildmap_fatal(0, "NodeReportUse %d", node); return -1; *************** *** 510,513 **** --- 515,519 ---- return 0; } + /** * @brief *************** *** 603,618 **** buildmap_osm_text_tag(char *data) { ! static char *tag = 0, *value = 0; ! int i, found; ! layer_info_t *list; ! int ret = 0; ! if (! in_way) { ! /* Deal with tags outside ways */ ! return buildmap_osm_text_node_tag(data); ! } ! if (! tag) tag = malloc(512); ! if (! value) value = malloc(512); sscanf(data, "tag k=%*[\"']%[^\"']%*[\"'] v=%*[\"']%[^\"']%*[\"']", --- 609,670 ---- buildmap_osm_text_tag(char *data) { ! static char *tag = 0, *value = 0; ! int i, found; ! layer_info_t *list; ! int ret = 0; ! if (! in_way) { ! /* Deal with tags outside ways */ ! return buildmap_osm_text_node_tag(data); ! } ! if (! tag) tag = malloc(512); ! if (! value) value = malloc(512); ! ! sscanf(data, "tag k=%*[\"']%[^\"']%*[\"'] v=%*[\"']%[^\"']%*[\"']", tag, value); ! ! /* street names */ ! if (strcmp(tag, "name") == 0) { ! if (WayStreetName) ! free(WayStreetName); ! WayStreetName = FromXmlAndDup(value); ! return 0; /* FIX ME ?? */ ! } else if (strcmp(tag, "landuse") == 0) { ! WayLandUseNotInteresting = 1; ! // buildmap_info("discarding way %d, landuse %s", in_way, data); ! } else if (strcmp(tag, "oneway") == 0 && strcmp(value, "yes") == 0) { ! WayIsOneWay = ROADMAP_LINE_DIRECTION_ONEWAY; ! } ! ! /* Scan list_info ! * ! * This will map tags such as highway and cycleway. ! */ ! found = 0; ! for (i=1; found == 0 && list_info[i].name != 0; i++) { ! if (strcmp(tag, list_info[i].name) == 0) { ! list = list_info[i].list; ! found = 1; ! break; ! } ! } ! ! if (found) { ! if (list) { ! for (i=1; list[i].name; i++) { ! if (strcmp(value, list[i].name) == 0) { ! WayFlags = list[i].flags; ! if (list[i].layerp) ! ret = *(list[i].layerp); ! } ! } ! } else { ! /* */ ! } ! } ! ! /* FIX ME When are we supposed to do this */ ! if (ret) ! WayLayer = ret; sscanf(data, "tag k=%*[\"']%[^\"']%*[\"'] v=%*[\"']%[^\"']%*[\"']", *************** *** 682,686 **** if (WayLandUseNotInteresting) { ! // buildmap_info("discarding way %d, landuse %s", in_way, data); WayLandUseNotInteresting = 0; buildmap_osm_text_reset_way(); --- 734,740 ---- if (WayLandUseNotInteresting) { ! #if 0 ! buildmap_info("discarding way %d, landuse %s", in_way, data); ! #endif WayLandUseNotInteresting = 0; buildmap_osm_text_reset_way(); *************** *** 725,754 **** LineId++; line = buildmap_line_add ! (LineId, WayLayer, prevpoint, point); ! #if 0 ! buildmap_verbose ! ("%d <- buildmap_line_add(%d,%d,%d,%d)" ! " - nodes %d %d", ! line, LineId, WayLayer, prevpoint, point, ! WayNodes[j-1], WayNodes[j]); ! #endif ! ! #if 0 ! /* This will break on some polygons */ ! buildmap_polygon_add_line ! (cenid, polyid, LineId, POLYGON_SIDE_RIGHT); ! #endif ! ! #if 0 ! int lon1 = buildmap_point_get_longitude(prevpoint); ! int lat1 = buildmap_point_get_latitude(prevpoint); ! int lon2 = buildmap_point_get_longitude(point); ! int lat2 = buildmap_point_get_latitude(point); ! buildmap_verbose("Poly %d add line %d %d %d" ! " points prev %d (%d,%d) cur %d (%d,%d)", ! nPolygons, cenid, polyid, LineId, ! WayNodes[j-1], lon1, lat1, ! WayNodes[j], lon2, lat2); ! #endif } } else { --- 779,784 ---- LineId++; line = buildmap_line_add ! (LineId, WayLayer, prevpoint, point, ! ROADMAP_LINE_DIRECTION_BOTH); } } else { *************** *** 805,809 **** LineId++; line = buildmap_line_add( ! LineId, WayLayer, from_point, to_point); street = buildmap_street_add(WayLayer, --- 835,840 ---- LineId++; line = buildmap_line_add( ! LineId, WayLayer, from_point, to_point, ! WayIsOneWay); street = buildmap_street_add(WayLayer, *************** *** 883,887 **** LineId++; line = buildmap_line_add(LineId, ! WayLayer, from_point, to_point); street = buildmap_street_add(WayLayer, --- 914,918 ---- LineId++; line = buildmap_line_add(LineId, ! WayLayer, from_point, to_point, WayIsOneWay); street = buildmap_street_add(WayLayer, *************** *** 949,953 **** LineId++; line = buildmap_line_add(LineId, ! WayLayer, from_point, to_point); street = buildmap_street_add(WayLayer, --- 980,984 ---- LineId++; line = buildmap_line_add(LineId, ! WayLayer, from_point, to_point, WayIsOneWay); street = buildmap_street_add(WayLayer, Index: buildmap_osm_binary.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_osm_binary.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** buildmap_osm_binary.c 27 Feb 2009 14:50:42 -0000 1.10 --- buildmap_osm_binary.c 29 Mar 2009 11:51:49 -0000 1.11 *************** *** 3,6 **** --- 3,7 ---- * * Copyright 2007 Paul Fox + * Copyright (c) 2009, Danny Backx. * * This file is part of RoadMap. *************** *** 54,57 **** --- 55,59 ---- #include "roadmap_file.h" #include "roadmap_osm.h" + #include "roadmap_line.h" #include "buildmap.h" *************** *** 385,389 **** to_point = buildmap_point_add(tolong, tolat); ! line = buildmap_line_add(++lineid, layer, from_point, to_point); buildmap_verbose("from: %d, %d to: %d, %d lineid %d", --- 387,392 ---- to_point = buildmap_point_add(tolong, tolat); ! line = buildmap_line_add(++lineid, layer, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); buildmap_verbose("from: %d, %d to: %d, %d lineid %d", *************** *** 402,406 **** from_point = buildmap_point_add(frlong, frlat); to_point = buildmap_point_add(tolong, tolat); ! line = buildmap_line_add(++lineid, layer, from_point, to_point); buildmap_verbose("from: %d, %d to: %d, %d lineid %d", --- 405,410 ---- from_point = buildmap_point_add(frlong, frlat); to_point = buildmap_point_add(tolong, tolat); ! line = buildmap_line_add(++lineid, layer, from_point, to_point, ! ROADMAP_LINE_DIRECTION_BOTH); buildmap_verbose("from: %d, %d to: %d, %d lineid %d", Index: buildmap_empty.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_empty.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** buildmap_empty.c 15 Nov 2005 05:05:12 -0000 1.1 --- buildmap_empty.c 29 Mar 2009 11:51:49 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- * * Copyright 2005 Ehud Shabtai + * Copyright (c) 2009, Danny Backx * * This file is part of RoadMap. *************** *** 35,38 **** --- 36,40 ---- #include "roadmap_types.h" #include "roadmap_path.h" + #include "roadmap_line.h" #include "buildmap.h" *************** *** 87,94 **** p4 = buildmap_point_add (points[0], points[3]); ! buildmap_line_add (1, cfcc, p1, p2); ! buildmap_line_add (2, cfcc, p2, p3); ! buildmap_line_add (3, cfcc, p3, p4); ! buildmap_line_add (4, cfcc, p4, p1); buildmap_dictionary_open ("prefix"); --- 89,96 ---- p4 = buildmap_point_add (points[0], points[3]); ! buildmap_line_add (1, cfcc, p1, p2, ROADMAP_LINE_DIRECTION_BOTH); ! buildmap_line_add (2, cfcc, p2, p3, ROADMAP_LINE_DIRECTION_BOTH); ! buildmap_line_add (3, cfcc, p3, p4, ROADMAP_LINE_DIRECTION_BOTH); ! buildmap_line_add (4, cfcc, p4, p1, ROADMAP_LINE_DIRECTION_BOTH); buildmap_dictionary_open ("prefix"); Index: buildmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_line.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** buildmap_line.c 25 Mar 2009 20:38:19 -0000 1.21 --- buildmap_line.c 29 Mar 2009 11:51:49 -0000 1.22 *************** *** 49,52 **** --- 49,53 ---- typedef struct { RoadMapLine record; + RoadMapLine2 data2; int tlid; int sorted; *************** *** 193,199 **** * @param from point 1 * @param to point 2 * @return the number of lines we know */ ! int buildmap_line_add (int tlid, int layer, int from, int to) { int block; --- 194,201 ---- * @param from point 1 * @param to point 2 + * @param oneway indicates one way streets * @return the number of lines we know */ ! int buildmap_line_add (int tlid, int layer, int from, int to, int oneway) { int block; *************** *** 226,234 **** --- 228,241 ---- buildmap_fatal (0, "invalid layer %d in line #%d", layer, tlid); } + this_line->tlid = tlid; this_line->layer = layer; + this_line->record.from = from; this_line->record.to = to; + this_line->data2.oneway = oneway; + this_line->data2.layer = layer; + roadmap_hash_add (LineById, tlid, LineCount); *************** *** 608,612 **** /** ! * @brief */ static void buildmap_line_save (void) { --- 615,619 ---- /** ! * @brief a collection of actions for everything all tables in the "line" database */ static void buildmap_line_save (void) { *************** *** 628,631 **** --- 635,639 ---- int *db_index2; RoadMapLine *db_lines; + RoadMapLine2 *db_lines2; RoadMapLineBySquare *db_square1; RoadMapLineBySquare *db_square2; *************** *** 634,637 **** --- 642,646 ---- buildmap_db *root; buildmap_db *data_table; + buildmap_db *data2_table; buildmap_db *square1_table; buildmap_db *layer1_table; *************** *** 769,772 **** --- 778,785 ---- buildmap_db_add_data (data_table, LineCount, sizeof(RoadMapLine)); + data2_table = buildmap_db_add_section (root, "data2"); + if (data2_table == NULL) buildmap_fatal (0, "Can't add a new section"); + buildmap_db_add_data (data2_table, LineCount, sizeof(RoadMapLine2)); + square1_table = buildmap_db_add_section (root, "bysquare1"); if (square1_table == NULL) buildmap_fatal (0, "Can't add a new section"); *************** *** 807,810 **** --- 820,824 ---- db_lines = (RoadMapLine *) buildmap_db_get_data (data_table); + db_lines2 = (RoadMapLine2 *) buildmap_db_get_data (data2_table); db_square1 = (RoadMapLineBySquare *) buildmap_db_get_data (square1_table); db_layer1 = (int *) buildmap_db_get_data (layer1_table); *************** *** 828,831 **** --- 842,846 ---- db_lines[i] = one_line->record; + db_lines2[i] = one_line->data2; square = one_line->square_from; *************** *** 981,985 **** buildmap_line_reset }; ! /** * @brief --- 996,1000 ---- buildmap_line_reset }; ! /** * @brief |
|
From: Danny B. <dan...@us...> - 2009-03-29 11:50:11
|
Update of /cvsroot/roadmap/roadmap/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10118 Modified Files: buildmap_line.h Log Message: This actually contains the buildmap_line_add definition :-) Index: buildmap_line.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_line.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buildmap_line.h 7 Jun 2007 16:03:54 -0000 1.3 --- buildmap_line.h 29 Mar 2009 11:50:05 -0000 1.4 *************** *** 4,7 **** --- 4,8 ---- * * Copyright 2002 Pascal F. Martin + * Copyright (c) 2009, Danny Backx * * This file is part of RoadMap. *************** *** 25,29 **** #define INCLUDED__BUILDMAP_LINE__H ! int buildmap_line_add (int tlid, int cfcc, int from, int to); int buildmap_line_find_sorted (int tlid); --- 26,30 ---- #define INCLUDED__BUILDMAP_LINE__H ! int buildmap_line_add (int tlid, int layer, int from, int to, int oneway); int buildmap_line_find_sorted (int tlid); *************** *** 39,42 **** --- 40,45 ---- void buildmap_line_test_long (int line, int longitude, int latitude); + void buildmap_line_oneway(int way, int oneway); + void buildmap_line_layer(int way, int layer); #endif // INCLUDED__BUILDMAP_LINE__H |